Wagmi + React
Wagmi is the standard React library for EVM wallet connections and contract interactions. This page covers the essential patterns for a Sei frontend: configuration, wallet connect/disconnect, reading balances, and writing to contracts. For Node.js scripts and backend services, see the viem Quickstart instead.Install
Configuration
Configure Wagmi with the Sei chain and your preferred wallet connectors:Provider Setup
Wrap your app withWagmiProvider and QueryClientProvider:
Connecting a Wallet
Reading the Native SEI Balance
Reading a Contract
Writing to a Contract
UseuseWriteContract for transactions that mutate state, and useWaitForTransactionReceipt to track confirmation:
useWaitForTransactionReceipt resolves as soon as the transaction is included in a block. A single confirmation is final. See Finality.