mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Co-authored-by: Ignacio Palacios <ignacio.palacios.santos@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: sudo.Sudid
|
- name: sudo.Sudid
|
||||||
attributes:
|
attribute:
|
||||||
type: Result<Null, SpRuntimeDispatchError>
|
type: Result<Null, SpRuntimeDispatchError>
|
||||||
value: Ok
|
value: Ok
|
||||||
- name: xcmPallet.SupportedVersionChanged
|
- name: xcmPallet.SupportedVersionChanged
|
||||||
@@ -82,7 +82,7 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: sudo.Sudid
|
- name: sudo.Sudid
|
||||||
attributes:
|
attribute:
|
||||||
type: Result<Null, SpRuntimeDispatchError>
|
type: Result<Null, SpRuntimeDispatchError>
|
||||||
value: Ok
|
value: Ok
|
||||||
- name: xcmPallet.SupportedVersionChanged
|
- name: xcmPallet.SupportedVersionChanged
|
||||||
|
|||||||
@@ -200,10 +200,10 @@ tests:
|
|||||||
- name: polkadotXcm.Sent
|
- name: polkadotXcm.Sent
|
||||||
- name: ump.ExecutedUpward
|
- name: ump.ExecutedUpward
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 4,000,000
|
value: 1,160,892,000
|
||||||
- name: hrmp.OpenChannelRequested
|
- name: hrmp.OpenChannelRequested
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
- queries:
|
- queries:
|
||||||
@@ -394,9 +394,9 @@ tests:
|
|||||||
- name: polkadotXcm.Sent
|
- name: polkadotXcm.Sent
|
||||||
- name: ump.ExecutedUpward
|
- name: ump.ExecutedUpward
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 4,000,000
|
value: 1,160,892,000
|
||||||
- name: hrmp.OpenChannelAccepted
|
- name: hrmp.OpenChannelAccepted
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
|
|||||||
@@ -165,16 +165,16 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: polkadotXcm.Attempted
|
- name: polkadotXcm.Attempted
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 1,000,000,000
|
value: 1,000,000,000
|
||||||
- name: assets.Transferred
|
- name: assets.Transferred
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- name: assets.Transferred
|
- name: assets.Transferred
|
||||||
attributes:
|
attribute:
|
||||||
type: u128
|
type: u128
|
||||||
value: *amount_to_send
|
value: *amount_to_send
|
||||||
|
|
||||||
@@ -212,16 +212,16 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: polkadotXcm.Attempted
|
- name: polkadotXcm.Attempted
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 1,000,000,000
|
value: 1,000,000,000
|
||||||
- name: balances.Endowed
|
- name: balances.Endowed
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- name: balances.Endowed
|
- name: balances.Endowed
|
||||||
attributes:
|
attribute:
|
||||||
type: u128
|
type: u128
|
||||||
value: *amount
|
value: *amount
|
||||||
|
|
||||||
@@ -278,17 +278,17 @@ tests:
|
|||||||
- name: polkadotXcm.Sent
|
- name: polkadotXcm.Sent
|
||||||
- name: assets.Burned
|
- name: assets.Burned
|
||||||
chain: *assets_parachain
|
chain: *assets_parachain
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- name: assets.Issued
|
- name: assets.Issued
|
||||||
chain: *assets_parachain
|
chain: *assets_parachain
|
||||||
attributes:
|
attribute:
|
||||||
type: u32
|
type: u32
|
||||||
value: *asset_id
|
value: *asset_id
|
||||||
- name: system.Remarked
|
- name: system.Remarked
|
||||||
chain: *assets_parachain
|
chain: *assets_parachain
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- queries:
|
- queries:
|
||||||
@@ -348,6 +348,6 @@ tests:
|
|||||||
events:
|
events:
|
||||||
- name: xcmpQueue.Fail
|
- name: xcmpQueue.Fail
|
||||||
chain: *assets_parachain
|
chain: *assets_parachain
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsError
|
type: XcmV2TraitsError
|
||||||
value: FailedToTransactAsset
|
value: FailedToTransactAsset
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: sudo.Sudid
|
- name: sudo.Sudid
|
||||||
attributes:
|
attribute:
|
||||||
type: Result<Null, SpRuntimeDispatchError>
|
type: Result<Null, SpRuntimeDispatchError>
|
||||||
value: Ok
|
value: Ok
|
||||||
- name: xcmPallet.SupportedVersionChanged
|
- name: xcmPallet.SupportedVersionChanged
|
||||||
@@ -82,7 +82,7 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: sudo.Sudid
|
- name: sudo.Sudid
|
||||||
attributes:
|
attribute:
|
||||||
type: Result<Null, SpRuntimeDispatchError>
|
type: Result<Null, SpRuntimeDispatchError>
|
||||||
value: Ok
|
value: Ok
|
||||||
- name: xcmPallet.SupportedVersionChanged
|
- name: xcmPallet.SupportedVersionChanged
|
||||||
|
|||||||
@@ -198,10 +198,10 @@ tests:
|
|||||||
- name: polkadotXcm.Sent
|
- name: polkadotXcm.Sent
|
||||||
- name: ump.ExecutedUpward
|
- name: ump.ExecutedUpward
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 4,000,000
|
value: 4,000,000,000
|
||||||
- name: hrmp.OpenChannelRequested
|
- name: hrmp.OpenChannelRequested
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
- queries:
|
- queries:
|
||||||
@@ -392,9 +392,9 @@ tests:
|
|||||||
- name: polkadotXcm.Sent
|
- name: polkadotXcm.Sent
|
||||||
- name: ump.ExecutedUpward
|
- name: ump.ExecutedUpward
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 4,000,000
|
value: 4,000,000,000
|
||||||
- name: hrmp.OpenChannelAccepted
|
- name: hrmp.OpenChannelAccepted
|
||||||
chain: *relay_chain
|
chain: *relay_chain
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ settings:
|
|||||||
suff_asset_fungible: &ap_suff_asset_fungible { id: *suff_asset, fun: { fungible: *weight_at_most }}
|
suff_asset_fungible: &ap_suff_asset_fungible { id: *suff_asset, fun: { fungible: *weight_at_most }}
|
||||||
suff_asset_fungible_fail: &ap_suff_asset_fungible_fail { id: *suff_asset_fail, fun: { fungible: *weight_at_most }}
|
suff_asset_fungible_fail: &ap_suff_asset_fungible_fail { id: *suff_asset_fail, fun: { fungible: *weight_at_most }}
|
||||||
penpal_parachain:
|
penpal_parachain:
|
||||||
sovereign_account: &pp_sovereign_sibl FBeL7EAeUroLWXW1yfKboiqTqVfbRBcsUKd6QqVf4kGBySS
|
sovereign_account: &pp_sovereign_sibl 13cKp89Msu7M2PiaCuuGr1BzAsD5V3vaVbDMs3YtjMZHdGwR
|
||||||
signer: &pp_signer //Alice
|
signer: &pp_signer //Alice
|
||||||
penpal_parachain_account: &pp_acc '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
|
penpal_parachain_account: &pp_acc '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
|
||||||
decodedCalls:
|
decodedCalls:
|
||||||
@@ -164,16 +164,16 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: polkadotXcm.Attempted
|
- name: polkadotXcm.Attempted
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 1,000,000,000
|
value: 1,000,000,000
|
||||||
- name: assets.Transferred
|
- name: assets.Transferred
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- name: assets.Transferred
|
- name: assets.Transferred
|
||||||
attributes:
|
attribute:
|
||||||
type: u128
|
type: u128
|
||||||
value: *amount_to_send
|
value: *amount_to_send
|
||||||
|
|
||||||
@@ -211,142 +211,15 @@ tests:
|
|||||||
]
|
]
|
||||||
events:
|
events:
|
||||||
- name: polkadotXcm.Attempted
|
- name: polkadotXcm.Attempted
|
||||||
attributes:
|
attribute:
|
||||||
type: XcmV2TraitsOutcome
|
type: XcmV2TraitsOutcome
|
||||||
isComplete: true
|
isComplete: true
|
||||||
value: 1,000,000,000
|
value: 1,000,000,000
|
||||||
- name: balances.Endowed
|
- name: balances.Endowed
|
||||||
attributes:
|
attribute:
|
||||||
type: AccountId32
|
type: AccountId32
|
||||||
value: *pp_sovereign_sibl
|
value: *pp_sovereign_sibl
|
||||||
- name: balances.Endowed
|
- name: balances.Endowed
|
||||||
attributes:
|
attribute:
|
||||||
type: u128
|
type: u128
|
||||||
value: *amount
|
value: *amount
|
||||||
|
|
||||||
- name: polkadotXcm.send( system.remarkWithEvent() ) | Penpal Parachain -> Assets Parachain
|
|
||||||
before:
|
|
||||||
- name: Get the asset balance of the Penpal Parachain Sovereign account in Assets Parachain
|
|
||||||
actions:
|
|
||||||
- queries:
|
|
||||||
assets_balance_pp_sovereign_before:
|
|
||||||
chain: *assets_parachain
|
|
||||||
pallet: assets
|
|
||||||
call: account
|
|
||||||
args: [
|
|
||||||
*asset_id,
|
|
||||||
*pp_sovereign_sibl
|
|
||||||
]
|
|
||||||
its:
|
|
||||||
- name: Penpal Parachain should be able to send XCM message paying its fee with sufficient asset[2] in Assets Parachain
|
|
||||||
actions:
|
|
||||||
- extrinsics:
|
|
||||||
- chain: *penpal_parachain
|
|
||||||
signer: *pp_signer
|
|
||||||
sudo: true
|
|
||||||
pallet: polkadotXcm
|
|
||||||
call: send
|
|
||||||
args: [
|
|
||||||
*ap_dest_routed, # destination
|
|
||||||
{
|
|
||||||
v2: [ #message
|
|
||||||
{
|
|
||||||
WithdrawAsset: [*ap_suff_asset_fungible]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
BuyExecution: {
|
|
||||||
fees: *ap_suff_asset_fungible,
|
|
||||||
weightLimit: Unlimited
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Transact: {
|
|
||||||
originType: SovereignAccount,
|
|
||||||
requireWeightAtMost: *weight_at_most,
|
|
||||||
call: $system_remark_with_event
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
events:
|
|
||||||
- name: sudo.Sudid
|
|
||||||
attribute:
|
|
||||||
type: Result<Null, SpRuntimeDispatchError>
|
|
||||||
value: Ok
|
|
||||||
- name: polkadotXcm.Sent
|
|
||||||
- name: assets.Burned
|
|
||||||
chain: *assets_parachain
|
|
||||||
attributes:
|
|
||||||
type: AccountId32
|
|
||||||
value: *pp_sovereign_sibl
|
|
||||||
- name: assets.Issued
|
|
||||||
chain: *assets_parachain
|
|
||||||
attributes:
|
|
||||||
type: u32
|
|
||||||
value: *asset_id
|
|
||||||
- name: system.Remarked
|
|
||||||
chain: *assets_parachain
|
|
||||||
attributes:
|
|
||||||
type: AccountId32
|
|
||||||
value: *pp_sovereign_sibl
|
|
||||||
- queries:
|
|
||||||
assets_balance_pp_sovereign_after:
|
|
||||||
chain: *assets_parachain
|
|
||||||
pallet: assets
|
|
||||||
call: account
|
|
||||||
args: [
|
|
||||||
*asset_id,
|
|
||||||
*pp_sovereign_sibl
|
|
||||||
]
|
|
||||||
|
|
||||||
- name: Should reduce the asset[2] balance of the Penpal Parachain's SovereignAccount in the Assets Parachain
|
|
||||||
actions:
|
|
||||||
- asserts:
|
|
||||||
assetsDecreased:
|
|
||||||
args: [
|
|
||||||
{
|
|
||||||
balances: {
|
|
||||||
before: $assets_balance_pp_sovereign_before,
|
|
||||||
after: $assets_balance_pp_sovereign_after,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
- name: Penpal Parachain SHOULD NOT be able to send XCM message paying its fee with sufficient asset[3] if not balance
|
|
||||||
actions:
|
|
||||||
- extrinsics:
|
|
||||||
- chain: *penpal_parachain
|
|
||||||
signer: *pp_signer
|
|
||||||
sudo: true
|
|
||||||
pallet: polkadotXcm
|
|
||||||
call: send
|
|
||||||
args: [
|
|
||||||
*ap_dest_routed, # destination
|
|
||||||
{
|
|
||||||
v2: [ #message
|
|
||||||
{
|
|
||||||
WithdrawAsset: [*ap_suff_asset_fungible_fail]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
BuyExecution: {
|
|
||||||
fees: *ap_suff_asset_fungible_fail,
|
|
||||||
weightLimit: Unlimited
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Transact: {
|
|
||||||
originType: SovereignAccount,
|
|
||||||
requireWeightAtMost: *weight_at_most,
|
|
||||||
call: $system_remark_with_event
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
events:
|
|
||||||
- name: xcmpQueue.Fail
|
|
||||||
chain: *assets_parachain
|
|
||||||
attributes:
|
|
||||||
type: XcmV2TraitsError
|
|
||||||
value: FailedToTransactAsset
|
|
||||||
|
|||||||
Reference in New Issue
Block a user