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

feat: add transfer and call #334

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

edakturk14
Copy link
Collaborator

@edakturk14 edakturk14 commented Feb 18, 2025

This PR adds the transfer and call pattern to the docs.

Open Questions:

  • Which diagram should we include?
  • Should we leave the use-cases or are they too specific to be added onto the doc?
  • Add a notes section with the considerations. Any extra considerations we should add here, they are a bit self-explanatory but my general idea here is that more info is better on the docs.
  • Is the placement of the doc good? (in the warp routes or should we consider another place)

Copy link

vercel bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyp-v3-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 3:03pm

Copy link
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think showing a diagram of the fast withdrawal example would make sense


Some scenarios include:

- A user deposits assets on an L2, mints a derivative, and then needs to bridge the underlying asset to an L1 vault for further use.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A user deposits assets on an L2, mints a derivative, and then needs to bridge the underlying asset to an L1 vault for further use.
- A user deposits assets on an L2, mints a derivative, and then needs to bridge the underlying asset to an L1 vault for collateralization.


1. Tokens are transferred from the sender to the contract.
2. An [Interchain Account (ICA)](/docs/reference/applications/interchain-account) is derived for the contract on the destination chain.
3. The Warp Route transfer is initiated, sending the tokens cross-chain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. The Warp Route transfer is initiated, sending the tokens cross-chain.
3. The Warp Route transfer is initiated, sending the tokens crosschain to the interchain account

1. Tokens are transferred from the sender to the contract.
2. An [Interchain Account (ICA)](/docs/reference/applications/interchain-account) is derived for the contract on the destination chain.
3. The Warp Route transfer is initiated, sending the tokens cross-chain.
4. A remote contract call is executed after the tokens arrive.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. A remote contract call is executed after the tokens arrive.
4. A remote contract call is executed on the destination chain from the interchain account after the tokens arrive.


:::note

- The contract must ensure the tokens arrive before executing the follow-up action.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a note about most calls requiring a token balance will revert before the tokens arrive and that the relayer retries with backoff to deliver the ICA call

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also that the ICA may need to do an ERC20 approval call in addition to a deposit

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