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

Update test fixture to send WETH to a non-existent account on AssetHub #1174

Closed
wants to merge 9 commits into from

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Apr 12, 2024

Update test fixture to send WETH to a non-existent account on AssetHub to verify the change in Snowfork/polkadot-sdk#137 did resolve the ED issue.

Requires: Snowfork/polkadot-sdk#137

@@ -85,13 +85,24 @@ config_xcm_version() {
send_governance_transact_from_relaychain $ASSET_HUB_PARAID "$call"
}

config_penpal() {
# System::set_storage(CustomizableAssetFromSystemAssetHub,Ethereum)
local call=0x00040440770800eb78be69c327d8334d0927607220020109079edaa802
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's why we print the key value in Snowfork/polkadot-sdk#137 (comment)

@yrong yrong changed the title Fix emulated test sending token to penpal Update test fixture to send WETH to a non-existent account on AssetHub Apr 16, 2024
Copy link
Contributor

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

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

+1

From the xcm log we can see that both the asset and the fee deposited to the beneficiary.

```
2024-04-16T02:50:18.942245Z TRACE xcm::barriers: AllowTopLevelPaidExecutionFrom origin: Location { parents: 1, interior: X1([Parachain(1013)]) }, instructions: [ReceiveTeleportedAsset(Assets([Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(10000000000) }])), BuyExecution { fees: Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(10000000000) }, weight_limit: Unlimited }, DescendOrigin(X1([PalletInstance(80)])), UniversalOrigin(GlobalConsensus(Ethereum { chain_id: 11155111 })), ReserveAssetDeposited(Assets([Asset { id: AssetId(Location { parents: 2, interior: X2([GlobalConsensus(Ethereum { chain_id: 11155111 }), AccountKey20 { network: None, key: [135, 209, 247, 253, 254, 231, 246, 81, 250, 188, 139, 252, 182, 224, 134, 194, 120, 183, 122, 125] }]) }), fun: Fungible(1000000000000000000) }])), ClearOrigin, DepositAsset { assets: Wild(All), beneficiary: Location { parents: 0, interior: X1([AccountId32 { network: None, id: [40, 72, 212, 220, 228, 167, 56, 124, 15, 56, 249, 50, 168, 47, 27, 78, 215, 131, 99, 62, 18, 255, 115, 240, 65, 108, 201, 130, 181, 216, 41, 48] }]) } }], max_weight: Weight { ref_time: 14541642000, proof_size: 362278 }, properties: Properties { weight_credit: Weight { ref_time: 0, proof_size: 0 }, message_id: Some([200, 234, 242, 47, 44, 176, 123, 172, 70, 121, 223, 10, 102, 14, 113, 21, 237, 135, 252, 253, 78, 50, 172, 38, 159, 101, 64, 38, 91, 187, 210, 111]) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just add the xcm program instead instead of all logs.

origin: Location { parents: 1, interior: X1([Parachain(1013)]) },
instructions: [
    ReceiveTeleportedAsset(
        Assets([Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(10000000000) }])
    ), 
    BuyExecution { fees: Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(10000000000) }, weight_limit: Unlimited },
    DescendOrigin(X1([PalletInstance(80)])),
    UniversalOrigin(GlobalConsensus(Ethereum { chain_id: 11155111 })),
    ReserveAssetDeposited(Assets([Asset { id: AssetId(Location { parents: 2, interior: X2([GlobalConsensus(Ethereum { chain_id: 11155111 }), AccountKey20 { network: None, key: [135, 209, 247, 253, 254, 231, 246, 81, 250, 188, 139, 252, 182, 224, 134, 194, 120, 183, 122, 125] }]) }), fun: Fungible(1000000000000000000) }])),
    ClearOrigin,
    DepositAsset { assets: Wild(All), beneficiary: Location { parents: 0, interior: X1([AccountId32 { network: None, id: [40, 72, 212, 220, 228, 167, 56, 124, 15, 56, 249, 50, 168, 47, 27, 78, 215, 131, 99, 62, 18, 255, 115, 240, 65, 108, 201, 130, 181, 216, 41, 48] }]) } }
],
max_weight: Weight { ref_time: 14541642000, proof_size: 362278 },
properties: Properties { 
  weight_credit: Weight { ref_time: 0, proof_size: 0 },
  message_id: Some([200, 234, 242, 47, 44, 176, 123, 172, 70, 121, 223, 10, 102, 14, 113, 21, 237, 135, 252, 253, 78, 50, 172, 38, 159, 101, 64, 38, 91, 187, 210, 111])
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

local call=0x3301020209079edaa802030087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d00d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0104
send_governance_transact_from_relaychain $PENPAL_PARAID "$call"
}

configure_substrate() {
set_gateway
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
set_gateway
config_penpal &
set_gateway

Copy link
Contributor Author

@yrong yrong Apr 23, 2024

Choose a reason for hiding this comment

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

Penpal is not allowed to execute sudo operation through xcm, it's a test chain which itself has the sudo pallet.

Explicit the call here but not execute, only for a hint.

@yrong yrong closed this May 31, 2024
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