BASE

Wagmi

Wagmi

Web framework / library · Free

Typed React and core primitives for Ethereum applications: they connect wallet connections, contract reads, and transactions to an interface.

Also known as: wevm/wagmi; wagmi; ethereum-reactive-primitives

Resource illustration: Wagmi

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Add wallet connection and contract reading to an interface
  • Connect a contract read to a screen and verify the result with a test wallet

Example workflow

A possible workflow; this is not a report of hands-on testing.

Add wallet connection and contract reading to an interface.

Before you start

  • Web application source code and the intended workflow.
  • The project's framework and runtime version.

Steps

  1. Configure the wallet connector and chosen application test network.
  2. Connect a contract read to a screen and verify the result with a test wallet.
  3. Add real data and error handling; check the production build.

Check your result

  • The interface correctly handles an unsupported network, wallet refusal, and disconnection.
  • Test contract reads on a test network; keys and financial operations are excluded from the test scenario.

Choosing Wagmi

Add wallet connection and contract reading to an interface

Choose this when

  • Add wallet connection and contract reading to an interface
  • Connect a contract read to a screen and verify the result with a test wallet

Requirements

  • Manual installation in the guide includes wagmi, viem@2.x, and @tanstack/react-query. TypeScript is recommended but optional; config registration infers permitted chain IDs.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • The example configures transport separately per chain. Wallet, RPC, and blockchain access depend on this configuration; installing hooks alone does not provide every external endpoint.

Frequently asked questions

What can you use for free in Wagmi?

Code and local use under MIT.

What additional costs might arise with Wagmi?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for Wagmi?

MIT for the code; dependencies have separate licenses.

How do you get started with Wagmi?

Configure the wallet connector and chosen application test network. Connect a contract read to a screen and verify the result with a test wallet. Add real data and error handling; check the production build.

How does Wagmi React connect Ethereum requests to components?

createConfig defines chains and transports. Wrap the application in WagmiProvider and QueryClientProvider: Wagmi provides hooks, Viem performs blockchain operations, and TanStack Query manages async state and caching.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • Wagmi
  • web
  • Development

Sources

Other resources