Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Improve DropAssets to support assets below ExistentialDeposit into treasury #4402

Closed
zqhxuyuan opened this issue Nov 29, 2021 · 1 comment
Closed

Comments

@zqhxuyuan
Copy link
Contributor

zqhxuyuan commented Nov 29, 2021

we may want to allow assets below ExistentialDeposit directly into treasury account in the DropAssets case instead of go to AssetsTrap storage. As there're already an TakeRevenue trait in xcm-builder, we could just use this trait to do our deposit logic. another problem to be consideration is how to get ExistentialDeposit for different asset, the simple solution is just passing constant map.

By default in the relaychain side, the configuration could be (). in the parachain side, parachain can set different ExistentialDeposit value for different asset just like what we did in acala, and we can deposit those asset into treasury account too.

here is a quick prototype implementation. if it's reasonable, I can create an PR on polkadot codebase. @xlc @KiChjang

there're some rude code in this quick implementation needs to more discuss:

  • should we move TakeRevenue to xcm-executor/traits?
  • the get_by_key may be replaced if there're some existing utility method.
@zqhxuyuan zqhxuyuan changed the title DropAssets support assets below ExistentialDeposit deposit directly into treasury Improve DropAssets to support assets below ExistentialDeposit into treasury Nov 29, 2021
@zqhxuyuan
Copy link
Contributor Author

turn out we could implements DropAssets in our own runtime. close it.

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

No branches or pull requests

1 participant