1

We ran into an issue when trying to create a pool on the relay-chain from a contract on the parachain.

The issue is that when an interior location of a parachain (a contract account on Shibuya) sends an XCM transaction to the relay chain (Westend in this case), the origin is a descended origin MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { ... }}. There is no location converter in Westend that supports this type of conversion. (EDIT: tested in a Zombienet setup)

This basically means a smart contract account would never be able to do a transaction on relay chain. Is that assumption true? Are there plans to allow a parachain interior account to send XCM transact instructions to relay chain?

If I add this line to Westend XCM config, it works:

https://gitlab.com/okalice/polkadot-sdk/-/blob/7d3040952117bb471a9a6d40744088c111e670d4/polkadot/xcm/xcm-builder/src/location_conversion.rs#L311

  - xcm::process_instruction: === WithdrawAsset(MultiAssets([MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }]))
  - xcm::currency_adapter: withdraw_asset what: MultiAsset { id: Concrete(MultiLocation { parents: 0, interior: Here }), fun: Fungible(10000000000000) }, who: MultiLocation { parents: 0, interior: X2(Parachain(2000), AccountId32 { network: Some(Westend), id: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] }) }
  - xcm::execute: !!! ERROR: FailedToTransactAsset("AccountIdConversionFailed")
  - xcm::execute_xcm_in_credit: result: Err(ExecutorError { index: 1, xcm_error: FailedToTransactAsset("AccountIdConversionFailed"), weight: Weight { ref_time: 100015189000, proof_size: 100000000000 } })
  - xcm::execute_xcm_in_credit: Execution errored at 1: FailedToTransactAsset("AccountIdConversionFailed") (original_origin: MultiLocation { parents: 0, interior: X1(Parachain(2000)) })
  - xcm::process-message: XCM message execution incomplete, used weight: Weight(ref_time: 153499000, proof_size: 3593), error: FailedToTransactAsset("AccountIdConversionFailed")

1 Answer 1

1

Shibuya isn't connected to Westend but to a custom fork of Rococo relay chain. What setup are you using?

The line you modified breaks the purpose of that type. Instead, HashedDescription should be modified to use DescribeAllTerminal.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.