wagmi
What is wagmi?β
wagmi is a collection of React Hooks containing everything you need to start working with Ethereum. wagmi makes it easy to "Connect Wallet," display ENS and balance information, sign messages, interact with contracts, and much more β all with caching, request deduplication, and persistence.
Quickstartβ
The jsonRpcProvider
configures the chains with the RPC URLs that you specify and also provides an ethers.js StaticJsonRpcProvider.
import { chain, configureChains } from 'wagmi'
import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'
const { chains, provider } = configureChains(
[chain.testnet, chain.caldera],
[
jsonRpcProvider({
rpc: (chain) => ({
http: `RPC URL`, // Insert RPC URL here
}),
}),
],
)
More Information: JSON RPC