Right now every bridge action that needs multiple transactions (approve → transfer, wrap → transfer, etc.) sends them one at a time - each with its own wallet popup. EIP-5792 wallet_sendCalls lets us batch same-chain calls into a single wallet approval.
This applies to all multi-transaction steps that happen on the same chain within a single action. For example, in TransferERC20S2S.execute() the approve + transferToSchainERC20 are both on sChain1 — those can be batched. Same for WrapERC20S (approve + wrap), TransferERC20M2S (approve + deposit), etc.
What changes
- Extend viem wallet client with
eip5792Actions()
- Add capability detection using
wallet_getCapabilities — check if the connected wallet supports sendCalls and atomic execution
- For each action class that does approve + main call on the same chain: if wallet supports EIP-5792, use
sendCalls with both calls in one batch; if not, fall back to current sequential behavior
- Track batch status via
wallet_getCallsStatus
- Update
transactions.ts (or create a new batchTransactions.ts) with a helper that takes an array of contract calls and routes through sendCalls or sequential fallback
Wallets with EIP-5792 support (as of March 2026): MetaMask, Coinbase Wallet, Rainbow, Trust Wallet.
Acceptance criteria
Right now every bridge action that needs multiple transactions (approve → transfer, wrap → transfer, etc.) sends them one at a time - each with its own wallet popup. EIP-5792
wallet_sendCallslets us batch same-chain calls into a single wallet approval.This applies to all multi-transaction steps that happen on the same chain within a single action. For example, in
TransferERC20S2S.execute()the approve +transferToSchainERC20are both on sChain1 — those can be batched. Same forWrapERC20S(approve + wrap),TransferERC20M2S(approve + deposit), etc.What changes
eip5792Actions()wallet_getCapabilities— check if the connected wallet supportssendCallsand atomic executionsendCallswith both calls in one batch; if not, fall back to current sequential behaviorwallet_getCallsStatustransactions.ts(or create a newbatchTransactions.ts) with a helper that takes an array of contract calls and routes through sendCalls or sequential fallbackWallets with EIP-5792 support (as of March 2026): MetaMask, Coinbase Wallet, Rainbow, Trust Wallet.
Acceptance criteria