Skip to main content

Setup Contracts

Configure the contract addresses and utility functions for interacting with USDC and NFT contracts.

Create Contracts Config

Update src/lib/contracts.ts:

Understanding the Config

Contract Addresses

Token Types

Token types are used to query balances and filter objects:

Decimals

USDC uses 6 decimal places:
  • 100 USDC = 100_000_000 (raw value)
  • formatUSDC(100_000_000) returns "100.00"
  • parseUSDC(100) returns 100_000_000n

Next Steps

Create Hooks

Build custom hooks for blockchain interactions