wagmi.ts
, adding Base-specific information, configuring the Coinbase Developer Platform (CDP), and implementing Wagmi’s experimental hooks for onchain actions.
Configuration
tab.
Select the chain, Base
or Base Sepolia
, you’d like to sponsor transactions on. Then copy the RPC URL in the Paymaster & Bundler endpoint section.
.env
file as NEXT_PUBLIC_CDP_PAYMASTER
or set up a proxy service for production applications.
Add
.
wagmi.ts
to configure your project to support the Base network, WalletConnect, and Coinbase Wallet connectors:
wagmi.ts:
useCapabilities
: Retrieves the capabilities supported by the connected wallet, such as paymasterService
for gasless transactions.useWriteContracts
: Executes onchain write actions, here used to call the mintTo
function on the NFT contract.mint/page.tsx