-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test for multiple events of same type
- Loading branch information
Frank Bell
committed
Oct 28, 2022
1 parent
f1178fe
commit 8dea2aa
Showing
2 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
settings: | ||
chains: | ||
relay_chain: &relay_chain | ||
wsPort: 9900 | ||
reserve_parachain: | ||
wsPort: 9910 | ||
paraId: &reserve_parachain_id 1000 | ||
variables: | ||
common: | ||
amount_to_send: &amount_to_send 1000000000000000 | ||
chains: | ||
relay_chain: | ||
alice_signer: &relay_chain_signer //Alice | ||
alice_account: &relay_chain_account 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY | ||
reserve_parachain: | ||
bob_account: &reserve_parachain_account '0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48' | ||
|
||
tests: | ||
- name: Tests | ||
describes: | ||
- name: Multiple events of same type | ||
its: | ||
- name: Tests should support multiple events of the same type | ||
actions: | ||
- extrinsics: | ||
- chain: *relay_chain | ||
signer: *relay_chain_signer | ||
pallet: xcmPallet | ||
call: limitedTeleportAssets | ||
args: [ | ||
{ # destination | ||
v1: { | ||
parents: 0, | ||
interior: { | ||
x1: { | ||
Parachain: *reserve_parachain_id | ||
} | ||
} | ||
} | ||
}, | ||
{ # beneficiary | ||
v1: { | ||
parents: 0, | ||
interior: { | ||
x1: { | ||
AccountId32: { | ||
network: Any, | ||
id: *reserve_parachain_account | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ # assets | ||
v1: [ | ||
{ | ||
id: { | ||
Concrete: { | ||
parents: 0, | ||
interior: Here | ||
} | ||
}, | ||
fun: { | ||
Fungible: *amount_to_send | ||
} | ||
} | ||
] | ||
}, | ||
0, # feeAssetItem | ||
Unlimited # weightLimit | ||
] | ||
events: | ||
- name: balances.Withdraw | ||
attributes: | ||
- type: AccountId32 | ||
value: *relay_chain_account | ||
- type: u128 | ||
value: *amount_to_send | ||
- name: balances.Withdraw | ||
attributes: | ||
- type: AccountId32 | ||
value: *relay_chain_account | ||
- type: u128 | ||
threshold: [10, 10] | ||
value: 148,804,953 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[settings] | ||
timeout = 1000 | ||
|
||
[relaychain] | ||
chain = "rococo-local" | ||
default_command = "./bin/polkadot" | ||
|
||
[[relaychain.nodes]] | ||
name = "alice" | ||
validator = true | ||
ws_port = 9900 | ||
extra_args = [ "-lparachain=debug" ] | ||
|
||
[[relaychain.nodes]] | ||
name = "bob" | ||
validator = true | ||
extra_args = [ "-lparachain=debug" ] | ||
|
||
[[relaychain.nodes]] | ||
name = "charlie" | ||
validator = true | ||
extra_args = [ "-lparachain=debug" ] | ||
|
||
[[parachains]] | ||
id = 1000 | ||
add_to_genesis = true | ||
cumulus_based = true | ||
chain = "statemine-local" | ||
|
||
[[parachains.collators]] | ||
name = "statemine-collator01" | ||
command = "./bin/polkadot-parachain" | ||
ws_port = 9910 | ||
args = ["--log=xcm=trace,pallet-assets=trace"] | ||
|
||
[[parachains.collators]] | ||
name = "statemine-collator02" | ||
command = "./bin/polkadot-parachain" | ||
ws_port = 9911 | ||
args = ["--log=xcm=trace,pallet-assets=trace"] | ||
|
||
[types.Header] | ||
number = "u64" | ||
parent_hash = "Hash" | ||
post_state = "Hash" |