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

[WIP] Support native token teleportation to ERC-20 #1480

Closed
wants to merge 21 commits into from

Conversation

Lohann
Copy link
Contributor

@Lohann Lohann commented Feb 4, 2025

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

@dvc94ch
Copy link
Collaborator

dvc94ch commented Feb 4, 2025

I have no idea what this is or who told you to do it. this was definitely not discussed in any sprint planning

Copy link
Collaborator

@dvc94ch dvc94ch left a 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.

@Lohann
Copy link
Contributor Author

Lohann commented Feb 4, 2025

God.. no one knows what WIP means? This PR should not be merged yet.

@agryaznov agryaznov changed the title [WIP] Support native token teleportation. [WIP] Support native token teleportation to ERC-20 Feb 6, 2025
@FlorianFranzen
Copy link
Collaborator

Looks pretty good already. Please ping me on slack for a quick review once it it ready!

@agryaznov
Copy link
Contributor

@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

@dvc94ch
Copy link
Collaborator

dvc94ch commented Feb 15, 2025

@agryaznov is this still relevant?

@dvc94ch dvc94ch closed this Feb 16, 2025
@agryaznov
Copy link
Contributor

@agryaznov is this still relevant?

yes, it is wip

@agryaznov agryaznov reopened this Feb 17, 2025
Copy link
Collaborator

@dvc94ch dvc94ch left a 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

@agryaznov
Copy link
Contributor

integration tests are done; the work on this could be resumed later on

@agryaznov agryaznov closed this Feb 25, 2025
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.

4 participants