-
Notifications
You must be signed in to change notification settings - Fork 103
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
New reserve transfer XCM parsing #995
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
==========================================
+ Coverage 83.25% 83.31% +0.06%
==========================================
Files 51 51
Lines 2060 2038 -22
Branches 71 71
==========================================
- Hits 1715 1698 -17
+ Misses 330 325 -5
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@alistair-singh Could you please also attach the original reserve transfer call you test with? The emulated test failed with an Unroutable error in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
The message format I have includes a RefundSurplus
instruction. Just checking if we need to parse that or if it is outdated.
I am looking into the fee discrepancy. I think this is fine to merge - I'll make a follow-up PR to update the fee in the polkadot-sdk.
@@ -37,15 +37,9 @@ where | |||
destination: &mut Option<InteriorMultiLocation>, | |||
message: &mut Option<Xcm<()>>, | |||
) -> SendResult<Self::Ticket> { | |||
let gateway_location = GatewayLocation::get(); | |||
let gateway_network = EthereumNetwork::get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does gateway_network
still makes sense here? Maybe expected_network
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved in da15bbc
I have added a comments in your PR to fix this test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, can we mandate that the message has a SetTopic
in it? I am preparing a related PR that allows to track messages across chains, and so we need to be able to extract the topic.
Addressed in 4011aa5 I left |
Resolves: SNO-734, SNO-645
PolkadotSDK companion: Snowfork/polkadot-sdk#19
The XCM message that the converter now matches:
The only mandatory instructions are
WithdrawAsset
,DepositAsset
andSetTopic
.ClearOrigin
is optional and will be skipped if present.BuyExecution
is also skipped if it is present however when it is present then the fee asset and amounts are validated against the reserve assets.The smallest valid xcm that can be converted is:
Tests pass. e2e fails on bridgehub with:
There is not enough fees in holding.
Required fees(2.20 DOT):
MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible(2200016903333) }
Provided fees(0.028 DOT):
MultiAsset { id: Concrete(MultiLocation { parents: 1, interior: Here }), fun: Fungible( 28376733291) }
Busy looking into this. However this PR successfully parses the new xcm format so its ready for review.
TODO: