Skip to main content
Learn how to set up Wagmi with Base Account to enable Base Account SDK functionality with familiar React hooks.

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. Base Account integrates perfectly with Wagmi, allowing you to use all your familiar hooks.

Installation

If you start a new wagmi project, you can skip the installation step. If you already have a project, you can install the dependencies with your package manager of choice:
To create a new wagmi project, you can use the command line npm create wagmi@latest.

Configuration

1. Configure Wagmi with Base Account

Create your Wagmi configuration with the Base Account connector configured for Base Account:

2. Wrap Your App

Wrap your application with the Wagmi provider:

Next Steps

Now that you have Wagmi configured with Base Account, you can: