Open decentration opened 1 month ago
ok good news, we managed to execute the xcm task which reached mangata, however we have a weight issue:
here is the updated call data:
0x3c010004600119670000000001010100f9200100000100004b29f0790000000000000000000000003d010500009649b7c292d18ec76b166979d7047f9a6987936a69b43e3a007e235a4d3a253a01000d01040000000000000000d0ed902e0000000000000000000000b528e8550182e3728703000000000000113a03b7dd2cad113a03b7c6d1e20000
Hi @decentration
I schedule a task to call xyk.multiswapSellAsset by xcm-demo, branch charles-swap_asset.
put you exported private key in private folder
PASS_PHRASE=<PASS_PHRASE> yarn run mangata-kusama
encoded code:
0x3c01000840c619670000000098c819670000000003010100f9200301010009210301010009216a4cb29800000000000000000000000041010500003830ef2fdb02d711afe91c830737375e32ac9904886266897f361b5a2ec13a3901000d0208070000000000000000ca9a3b0000000000000000000000000100000000000000000000000000000003dcb263e6894907dc9b081c0189490000
My weight:
Your weight:
Task executed:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fturing-rpc.dwellir.com#/explorer/query/5912758
Please compare your weight calculation with xcm-demo.
But Mangata do not allow proxy to execute xyk.multiswapSellAsset
.
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-archive.mangata.online#/explorer/query/5918821
There's only AutoCompund type in Mangata's proxy type list.
hey Charles @imstar15 thanks for this!
So just so i understand the flow, proxy is a necessary part of the process, and we need to allow multiswapSellAsset
as part of their proxy type? just to confirm proxy is required in the process, and its a one time thing if it was added to the proxy type list.
Maybe we can do this by using forceProxyType
? I will try this now. But actually this doesnt fit the flow because one has to hard code the exact swap.
if we cant, then will need to wait for mangata to add "Swap" to their proxy types.
I have try your solution.
I schedule task to call xyk.multiswapSellAsset by proxy with the undefined forceProxyType
param.
const compoundRewardsExtrinsic = mangataApi.tx.xyk.multiswapSellAsset([7, 0], '1000000000', '1');
const taskPayloadExtrinsic = mangataApi.tx.proxy.proxy(u8aToHex(keyringPair.addressRaw), undefined, compoundRewardsExtrinsic);
The proxy.proxy is not executed.
I think we need to wait for mangata to add "Swap" to their proxy types.
@decentration
I think we need to wait for mangata to add "Swap" to their proxy types.
Thanks for a great response @imstar15 , I was scratching my head trying to wrap the proxy call in a polkadotxcm.send tx, the bottleneck here is managatax chain, so other supported proxy types on other connected chains should potentially work than.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I have attempted to compose a tx that that dispatches an xcm task at a later time, which executes a swap call on the mangata chain.
Because there is no prior example of a swap tx executed with automationTime pallet i am finding it difficult to compose the correct call.
For fast checking here is the decoded call data:
you can decode this easily in the decode section of PJS Apps extrinsics:
The encoded call data is swap call on mangata...
This TX executes on Turing but when when executing the xcm task it throws a generic error from xcmpHandler.