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

Support ERC-20 xcm transfer #2167

Closed
zqhxuyuan opened this issue May 27, 2022 · 2 comments · Fixed by #2168
Closed

Support ERC-20 xcm transfer #2167

zqhxuyuan opened this issue May 27, 2022 · 2 comments · Fixed by #2168

Comments

@zqhxuyuan
Copy link
Contributor

zqhxuyuan commented May 27, 2022

following #2165. Current Erc20 token withdraw operation not support in module_currencies, that'll cause xcm transfer failed in our side.

CurrencyId::Erc20(_) => Err(Error::<T>::Erc20InvalidOperation.into()),

@zqhxuyuan zqhxuyuan changed the title Erc20 xcm transfer testcase Support ERC-20 xcm transfer May 27, 2022
@zqhxuyuan
Copy link
Contributor Author

zqhxuyuan commented May 28, 2022

Karura send erc20 to Sibling, Sibling will take (1, 2000, Erc20) as foreign asset, not erc20
Sibling send (1, 2001, Erc20) to Karura, Karura will take it as foregin asset too.
Sibling send (1, 2000, Erc20) to Karura, Karura will take it as Erc20.

So, Asset-registry need support Erc20, or else there'll be none matched item in Trader:

if let Some(CurrencyId::ForeignAsset(foreign_asset_id)) =
Pallet::<T>::location_to_currency_ids(multi_location.clone())

@zqhxuyuan
Copy link
Contributor Author

when Sibling transfer (1, 2000, Erc20) to Karura, xcm execution error in Karura side:

2022-06-02 20:44:42.055 TRACE tokio-runtime-worker xcm::execute_xcm_in_credit: [Parachain] 
result: Err(ExecutorError { index: 0, xcm_error: FailedToTransactAsset("RealOriginNotFound"), weight: 600000000 })    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant