Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 931 Bytes

README.md

File metadata and controls

37 lines (29 loc) · 931 Bytes

Thirdweb Wagmi Adapter

This is a demo of the thirdweb Wagmi Adapter.

It demonstrates how to connect in-app smart wallets to a Wagmi app.

Users connect with google, and obtain a ERC-4337 smart account that can be used to interact with the app without paying for gas.

// src/wagmi.ts
export const config = createConfig({
  chains: [chain],
  connectors: [
    inAppWalletConnector({
      client,
      smartAccount: {
        chain: thirdwebChain(chain),
        sponsorGas: true,
      },
    }),
  ],
  transports: {
    [chain.id]: http(),
  },
});

Prerequisites

Copy the .env.example file to .env and set your Thirdweb client ID. You can get your client ID from the thirdweb dashboard.

How to run

pnpm install
pnpm dev