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

fast-bridge: Send required accounts for cross domain transfer #375

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

dhruvja
Copy link
Collaborator

@dhruvja dhruvja commented Aug 22, 2024

For cross domain transfers, an acknowledgement is sent from destination to source in form of a token transfer. The packet contains the memo that has the information about unlocking the funds. The source would then parse the memo and unlock the funds to the solver mentioned in the memo. Since we only have token transfers enabled and no cross chain messages, a token needs to be transferred. For this, we create a dummy token owned by the program which mints a token everytime and sends a transfer. The timeout of the transfer is set to infinite so that it always reaches the counterparty chain.

Also the on_receive_transfer method accepts a memo which unlocks the funds to the solver. Right now it is being called by the auctioneer but once the hooks are enabled on solana-ibc program, this method would then be called by the solana-ibc program.

@dhruvja dhruvja requested review from doradelta and mina86 August 22, 2024 10:19
solana-test.sh Outdated Show resolved Hide resolved
solana/bridge-escrow/programs/bridge-escrow/src/tests.rs Outdated Show resolved Hide resolved
@dhruvja dhruvja merged commit c0e7f13 into fast-bridge Aug 26, 2024
3 of 4 checks passed
@dhruvja dhruvja deleted the fix-on-receive-transfer branch August 26, 2024 17:34
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