Skip to main content
Learn how to send multiple onchain calls in a single transaction with Wagmi and Coinbase Wallet.

Overview

Wagmi is a collection of React hooks for Ethereum Virtual Machine (EVM) compatible networks that makes it easy to work with wallets, contracts, transactions, and signing. Coinbase Wallet integrates perfectly with Wagmi, allowing you to use all your familiar hooks. You can jump ahead and use the Coinbase Wallet Wagmi Template to get started.

Setup

Make sure you have set up Wagmi with Coinbase Wallet before following this guide.

Basic Batch Transaction

Send multiple ETH transfers in a single transaction by creating a component that uses the sendCalls method and adding a button to trigger the transaction.
You don’t need to “Connect the wallet” firstCoinbase Wallet allows you to prompt the user for sending the transaction using the sendCalls method without needing to “Connect the wallet” (ie. using eth_requestAccounts) first.