Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/statemine/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[relaychain]
default_command = "./bin/polkadot"
default_args = [ "-lparachain=debug" ]
default_args = [ "-lparachain=debug", "-lxcm=trace" ]
chain = "kusama-local"

[[relaychain.nodes]]
Expand Down Expand Up @@ -32,11 +32,13 @@ cumulus_based = true
name = "collator1"
ws_port = 9910
command = "./bin/polkadot-parachain"
args = [ "-lxcm=trace" ]

[[parachains.collators]]
name = "collator2"
ws_port = 9911
command = "./bin/polkadot-parachain"
args = [ "-lxcm=trace" ]

[[parachains]]
id = 2000
Expand All @@ -47,11 +49,13 @@ cumulus_based = true
name = "collator3"
ws_port = 9920
command = "./bin/polkadot-parachain"
args = [ "-lxcm=trace" ]

[[parachains.collators]]
name = "collator4"
ws_port = 9921
command = "./bin/polkadot-parachain"
args = [ "-lxcm=trace" ]

# [[hrmpChannels]]
# sender = 1000
Expand Down
20 changes: 15 additions & 5 deletions examples/statemine/xcm/0_init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ settings:
paraId: &pp_id 2000
variables:
common:
xcm_version: &xcm_version '2'
require_weight_at_most: &weight_at_most 1000000000
xcm_version: &xcm_version '3'
require_weight_at_most: &weight_at_most {refTime: 1000000000, proofSize: 200000}
chains:
relay_chain:
signer: &rc_signer //Alice
assets_parachain_destination: &ap_dest { v1: { 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_destination: &ap_dest { v3: { 0, interior: { x1: { parachain: *ap_id }}}}
penpal_parachain:
signer: &pp_signer //Alice
decodedCalls:
Expand Down Expand Up @@ -98,10 +98,20 @@ tests:
args: [
*ap_dest, # destination
{
v2: [ #message
v3: [ #message
{
UnpaidExecution: {
weightLimit: {
limited: {
refTime: 2200000000,
proofSize: 200000
}
}
}
},
{
Transact: {
originType: Superuser,
originKind: Superuser,
requireWeightAtMost: *weight_at_most,
call: $ap_force_xcm_version
}
Expand Down
54 changes: 32 additions & 22 deletions examples/statemine/xcm/1_dmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ settings:
relay_chain:
signer: &rc_signer //Alice
wallet: &rc_wallet HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F
assets_parachain_destination: &ap_dest { v1: { parents: 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_destination: &ap_dest { v3: { parents: 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_account: &ap_acc '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
assets_parachain_beneficiary: &ap_benf {v1: { parents: 0, interior: { x1: { accountId32: { network: { any: true }, id: *ap_acc }}}}}
assets_parachain_beneficiary: &ap_benf {v3: { parents: 0, interior: { x1: { accountId32: { id: *ap_acc }}}}}
ksm: &rc_ksm { concrete: { parents: 0, interior: { here: true }}}
amount: &amount 1000000000000
ksm_fungible: &rc_ksm_fungible { id: *rc_ksm, fun: { fungible: *amount }}
require_weight_at_most: &rc_weight_at_most 1000000000
require_weight_at_most: &rc_weight_at_most {refTime: 1000000000, proofSize: 200000}
assets_parachain_account:
wallet: &ap_wallet HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F
asset_id: &asset_id 1
Expand Down Expand Up @@ -63,22 +63,22 @@ tests:
args: [
*ap_dest, # destination
*ap_benf, # beneficiary
{ v1: [ *rc_ksm_fungible ] }, # assets
{ v3: [ *rc_ksm_fungible ] },
0, # feeAssetItem
{ unlimited: true } # weightLimit
]
events:
- name: xcmPallet.Attempted
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,973,000
# threshold: [10, 10]
value: {"refTime":"1,010,034,000","proofSize":"0"}
- queries:
balance_rc_sender_after:
chain: *relay_chain
Expand Down Expand Up @@ -131,10 +131,15 @@ tests:
args: [
*ap_dest, # destination
{
v2: [ #message
v3: [ #message
{
UnpaidExecution: {
weightLimit: Unlimited
}
},
{
Transact: {
originType: Superuser,
originKind: Superuser,
requireWeightAtMost: *rc_weight_at_most,
call: $force_create_asset
}
Expand All @@ -147,10 +152,10 @@ tests:
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,258,000
# threshold: [10, 10]
value: {"refTime":"1,014,103,000","proofSize":"200,000"}
- queries:
forced_created_asset:
chain: *assets_parachain
Expand All @@ -173,10 +178,15 @@ tests:
args: [
*ap_dest, # destination
{
v2: [ #message
v3: [ #message
{
UnpaidExecution: {
weightLimit: Unlimited
}
},
{
Transact: {
originType: Native,
originKind: Native,
requireWeightAtMost: *rc_weight_at_most,
call: $force_create_asset
}
Expand All @@ -203,23 +213,23 @@ tests:
args: [
*ap_dest, # destination
*ap_benf, # beneficiary
{ v1: [ *rc_ksm_fungible ] }, # assets
{ v3: [ *rc_ksm_fungible ] }, # assets
0, # feeAssetItem
{ unlimited: true } # weightLimit
]
events:
- name: xcmPallet.Attempted
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 750,645,000
# threshold: [10, 10]
value: {"refTime":"750,645,000","proofSize":"0"}
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attributes:
- type: XcmV2TraitsOutcome
xcmOutcome: Error
value: "WeightNotComputable"
- type: XcmV3TraitsOutcome
xcmOutcome: Incomplete
value: [{"refTime":"1,000,000,000","proofSize":"0"},"UntrustedReserveLocation"]
- queries:
balance_rc_sender_after:
chain: *relay_chain
Expand Down
48 changes: 27 additions & 21 deletions examples/statemine/xcm/2_ump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ settings:
variables:
common:
amount: &amount 1000000000000
require_weight_at_most: &weight_at_most 1000000000
require_weight_at_most: &weight_at_most {refTime: 1000000000, proofSize: 0}
relay_chain:
signer: &rc_signer //Alice
wallet: &rc_wallet HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F #Alice
assets_parachain_destination: &ap_dest { v1: { 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_destination: &ap_dest { v3: { 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_account: &ap_acc '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
assets_parachain_beneficiary: &ap_benf {v1: { parents: 0, interior: { x1: { accountId32: { network: { any: true }, id: *ap_acc }}}}}
assets_parachain_beneficiary: &ap_benf {v3: { parents: 0, interior: { x1: { accountId32: { id: *ap_acc }}}}}
ksm: &rc_ksm { concrete: { 0, interior: { here: true }}}
ksm_fungible: &rc_ksm_fungible { id: *rc_ksm, fun: { fungible: *amount }}
assets_parachain_account:
signer: &ap_signer //Alice
wallet: &ap_wallet HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F
relay_chain_destination: &rc_dest { v1: { parents: 1, interior: { here: true }}}
relay_chain_destination: &rc_dest { v3: { parents: 1, interior: { here: true }}}
assets_parachain_account: &rc_acc '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d' #Alice
relay_chain_beneficiary: &rc_benf {v1: { parents: 0, interior: { x1: { accountId32: { network: { any: true }, id: *rc_acc }}}}}
relay_chain_beneficiary: &rc_benf {v3: { parents: 0, interior: { x1: { accountId32: { id: *rc_acc }}}}}
ksm: &ap_ksm { concrete: { parents: 1, interior: { here: true }}}
ksm_fungible: &ap_ksm_fungible { id: *ap_ksm, fun: { fungible: *amount }}
decodedCalls:
Expand All @@ -48,22 +48,23 @@ tests:
args: [
*ap_dest, # destination
*ap_benf, # beneficiary
{ v1: [ *rc_ksm_fungible ] }, # assets
{ v3: [ *rc_ksm_fungible ] }, # assets
0, # feeAssetItem
{ unlimited: true } # weightLimit
]
events:
- name: xcmPallet.Attempted
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
value: {"refTime":"761,173,000","proofSize":"0"}
- name: dmpQueue.ExecutedDownward
chain: *assets_parachain
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 1,021,973,000
# threshold: [10, 10]
value: {"refTime":"1,010,034,000","proofSize":"0"}

- name: Get the balances of the Assets Parachain's sender & Relay Chain's receiver
actions:
Expand All @@ -89,24 +90,24 @@ tests:
args: [
*rc_dest, # destination
*rc_benf, # beneficiary
{ v1: [ *ap_ksm_fungible ] }, # assets
{ v3: [ *ap_ksm_fungible ] }, # assets
0, # feeAssetItem
{ unlimited: true } # weightLimit
]
events:
- name: polkadotXcm.Attempted
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 360,315,000
# threshold: [10, 10]
value: {"refTime":"345,357,000","proofSize":"0"}
- name: ump.ExecutedUpward
chain: *relay_chain
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Complete
threshold: [10, 10]
value: 297,578,000
# threshold: [10, 10]
value: {"refTime":"298,716,000","proofSize":"0"}
- queries:
balance_ap_sender_after:
chain: *assets_parachain
Expand Down Expand Up @@ -158,10 +159,15 @@ tests:
args: [
*rc_dest, # destination
{
v2: [ #message
v3: [ #message
{
UnpaidExecution: {
weightLimit: Unlimited
}
},
{
Transact: {
originType: Native,
originKind: Native,
requireWeightAtMost: *weight_at_most,
call: $system_remark
}
Expand All @@ -187,13 +193,13 @@ tests:
args: [
*rc_dest, # destination
*rc_benf, # beneficiary
{ v1: [ *ap_ksm_fungible ] }, # assets
{ v3: [ *ap_ksm_fungible ] }, # assets
0, # feeAssetItem
{ unlimited: true } # weightLimit
]
events:
- name: polkadotXcm.Attempted
attributes:
- type: XcmV2TraitsOutcome
- type: XcmV3TraitsOutcome
xcmOutcome: Error
value: Barrier
Loading