Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statemint integration tests to cover USDT bidirectional reserve transfer Pendulum <-> Statemint #196

Conversation

RustNinja
Copy link
Contributor

PR related to issue #174

  • add dependency of statemint-runtime from parity cumulus.
  • configure statemint runtime for MockNet.
  • register asset with id 1984 to simulate USDT as sufficient on system parachain.
  • cover bidirectional transfer from Statemint to Pendulum and back.
  • unit test to check transfer DOT from pendulum to relay chain

@RustNinja RustNinja self-assigned this Apr 3, 2023
@@ -43,10 +48,21 @@ decl_test_parachain! {
}
}

decl_test_parachain! {
pub struct Statemine {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be called Statemint on Polkadot I suppose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.!!
You are right.
I use correct runtime: statemint_runtime but gave a incorrect name for Struct.
Thanks.

Done

}

#[test]
fn statemine_transfer_asset_to_statemint() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name seems wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Sure.
Statemint!!!
Done

@RustNinja RustNinja requested a review from ebma April 4, 2023 09:30
@RustNinja RustNinja merged commit 75b0c81 into add-statemint-as-trustable-chain-for-pendulum Apr 4, 2023
@RustNinja RustNinja deleted the statemint-integration-tests branch April 4, 2023 14:34
RustNinja added a commit that referenced this pull request Apr 7, 2023
* update pendulum runtime to support XCM reserve transfer for USDT

* add pendulum integration tests for XCM (#190)

add pendulum integration tests

* add polkadot runtime to integration tests

* add xcm test configuration

* fix type XcmConfig instead of XCMConfig

* add relay chain + parachain base integration tests

* add Pendulum parachain to decl_test_network in xcm integration tests

* Configure pendulum runtime for xcm simulator (#193)

configure pendulum runtime for xcm simulator

* Add xcm tests for pendulum (#195)

* finished configuration of polkadot + pendulum TestNet

* add transfer_ksm_from_relay_chain_to_pendulum

* add unit tests to integration

* use xcm emulator instead of xcm simulator from polkadot repo. (#194)

* transfer_polkadot_from_relay_chain_to_pendulum works

* added test for transfer polkadot_from_pendulum_to_relay_chain

* Statemint integration tests to cover USDT bidirectional reserve transfer Pendulum <-> Statemint (#196)

* add statemint-runtime to integration tests

* add Statemint to RelayNet as system chain 1000

* add statemine_transfer_asset_to_pendulum unit tests

* check BOB balance in statemine_transfer_asset_to_pendulum test

* add statemine_transfer_asset_to_statemint

* rename statemine to statemint. because this is tests for polkadot net

* add statemint_transfer_incorrect_asset_to_pendulum_fails

* move pendulum and statemint configuration from lib.rs to setup.rs

* move test from lib.rs to test.rs

* move polkadot net configuration to polkadot_test_net

* split tests, setup and polkadot_test_net to different files

* remove unused import in all files

* rename to pendulum-runtime-integration-tests

* Revert "rename to pendulum-runtime-integration-tests"

This reverts commit 2f18be6.

* rename to runtime-integration-tests

* Final refactor xcm integration tests (#198)

* rename dot function ot one

* refactor setup rs file

* add #[cfg(test)] attribute for all modules

* add comments about fees and rename TEN to TEN_UNITS

* update comment and constants name to show what is it

* wrap Parachain into X1 to have the same approach everywhere

* update transfer_dot_from_pendulum_to_relay_chain assert statement

* add. comment statemint_transfer_incorrect_asset_to_pendulum_should_fails

* add comment statemint_transfer_asset_to_statemint

* move use pendulum_runtime::{RuntimeEvent, System}; to top of the file

* move comment up function statemint_transfer_incorrect_asset_to_pendulum

* renamed to renamed to fn units(amount)

* wrap AccountId32 to X1 when call reserve_transfer_assets

* make Foucoco xcm config identical to pendulum runtime (#199)

make foucoco xcm config identical to pendulum runtime

* remove duplicate of "runtime/development"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants