feat: Hyperlane cross-chain Warp Route action provider#1144
Open
Ridwannurudeen wants to merge 1 commit intocoinbase:mainfrom
Open
feat: Hyperlane cross-chain Warp Route action provider#1144Ridwannurudeen wants to merge 1 commit intocoinbase:mainfrom
Ridwannurudeen wants to merge 1 commit intocoinbase:mainfrom
Conversation
Implements `transfer_remote` and `quote_transfer_remote` actions so AgentKit agents can bridge ERC-20 tokens between EVM chains via Hyperlane Warp Routes. Origin chains supported: Base, Ethereum, Optimism, Arbitrum mainnets. Destinations are resolved by name (ethereum, optimism, base, arbitrum, polygon, bsc, etc.) to canonical Hyperlane domain IDs from the hyperlane-registry. The transfer flow reads decimals from the underlying ERC-20, checks balance, quotes interchain gas via the Warp Route's quoteGasPayment, approves the Warp Route to spend the token, then dispatches transferRemote with the quoted gas attached as msg.value. Closes coinbase#1142.
🟡 Heimdall Review Status
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #1142.
Adds a Hyperlane action provider so AgentKit agents can bridge ERC-20 tokens cross-chain via Hyperlane Warp Routes.
Two actions:
transfer_remote— approves the Warp Route, readsquoteGasPayment, dispatchestransferRemotewith the quoted amount asmsg.value.quote_transfer_remote— readsquoteGasPaymentfor a preview.Origin chains supported: Base, Ethereum, Optimism, Arbitrum mainnets. Destinations are resolved by name (ethereum, optimism, base, arbitrum, polygon, bsc, etc.) to canonical Hyperlane domain IDs from the hyperlane-registry.
Follows the
AaveActionProviderlayout from #865 (provider, schemas, constants, utils, README, changelog, unit tests with a mockedEvmWalletProvider).TypeScript provider will follow in a separate PR.
Tests
Unit tests: 14/14 passing.
Coverage:
supports_network, destination domain resolution (case-insensitive + unknown chain), schema validation, transfer happy path (assertsmsg.valuematches the quoted gas), unsupported origin, unknown destination, insufficient balance early-exit, quote action.Lint / format:
make lintandmake formatclean on the added files.Live test: Pending. Happy to verify end-to-end with a small Base→Optimism or Base→Arbitrum USDC Warp Route transfer once a maintainer is reviewing — will paste the tx hash + Hyperlane Explorer link in a follow-up comment.
Checklist