Skip to content

NonReserve case support teleport instead of reserve transfer #785

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

Closed
wants to merge 5 commits into from

Conversation

zqhxuyuan
Copy link
Contributor

@zqhxuyuan zqhxuyuan commented Jun 24, 2022

Current fee_reserve != non_fee_reserve only used in parachain transfer back asset back to Statemine, The first xcm we can change to teleport.

@@ -145,6 +145,12 @@ impl<
DepositFailureHandler,
>
{
fn check_in(_origin: &MultiLocation, _what: &MultiAsset) {}
Copy link
Contributor Author

@zqhxuyuan zqhxuyuan Jun 24, 2022

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

why do we need to implement those? I don't think we will ever support teleport operation locally

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, only statemine need this CurrencyAdapter implementation, but in our testcase both sender and receiver are using same MultiCurrencyAdapter. I'll try let sender use MultiCurrencyAdapter and receiver use CurrencyAdapter.

Copy link
Contributor Author

@zqhxuyuan zqhxuyuan Jun 27, 2022

Choose a reason for hiding this comment

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

If ParaC using polkadot CurrencyAdapter, there'll be execution error in testcase, So I add another MultiTeleportCurrencyAdapter inside mock, this MultiTeleportCurrencyAdapter add default check_in and can_check_in implements. It's used only in testcase.

@zqhxuyuan zqhxuyuan requested a review from xlc June 24, 2022 15:50
@zqhxuyuan zqhxuyuan changed the title none reserve add teleport NonReserve case support teleport instead of reserve transfer Jun 24, 2022
@@ -571,6 +574,7 @@ pub mod module {
&dest,
Some(T::SelfLocation::get()),
dest_weight,
true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See the comment above, I just set true here, then this first xcm will always using teleport. Do we need use configuration setting like TrustedTeleporters to decide whether use teleport or not?

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