-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] Support native token teleportation to ERC-20 #1480
Conversation
I have no idea what this is or who told you to do it. this was definitely not discussed in any sprint planning |
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.
I have no idea what this is. There is a whole bunch of stuff that is just copied from other crates like the benchmarking, mock, tests. There are no tests. The pallet isn't registered in the runtime. If avneet signs of on it we can merge cc @foravneet , since he commissioned this work he should understand what was done.
God.. no one knows what WIP means? This PR should not be merged yet. |
Co-authored-by: Lohann Paterno Coutinho Ferreira <[email protected]>
Co-authored-by: Lohann Paterno Coutinho Ferreira <[email protected]>
Looks pretty good already. Please ping me on slack for a quick review once it it ready! |
@FlorianFranzen this is still half done, the other part (with ERC20->TC flow) is here: #1499. Should already work, I'm going to run it locally now |
Co-authored-by: Alexander Gryaznov <[email protected]>
@agryaznov is this still relevant? |
yes, it is wip |
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.
haven't reviewed the asset-bridge or the tests yet
integration tests are done; the work on this could be resumed later on |
Description
This PR introduces basic support to reserve-based-transfers.
Timechain to external ERC20:
1 - The account calls
assets_bridge.teleport_keep_alive(...)
, and specify the network and amount of tokens to be teleported..2 - The pallet lock the user's funds in the bridge pot (account managed by the pallet).
3 - A new GMP task is pushed to the queue.
ERC20 to Timechain:
1 - The account calls the
ERC20.teleport(..)
in the source chain.2 - The ERC20 contract calls the Gateway Contract, which emits a new message to the timechain RouteI/Network id.
3 - A Chronicle feed that event to the timechain.
4 - The timechain have a special handler for GMP messages which uses timechain network id, this message if valid is handled by pallet-assets-bridge.
5 - The pallet-assets-bridge unlock the tokens and transfer to the specified account.
TODOs
done in Add
pallet_assets_bridge
to runtime + add benchmarks #1491Asset Bridge ERC20 to TC #1499
setRoute
for TC nwAnlogTokenV2
done in https://github.com/Analog-Labs/erc20-token/pull/17