Skip to main content

Connect Wallet

Now let’s add wallet connection to our app.

Update App Component

Update src/app.tsx:

Key Hooks

useCurrentAccount

Returns the currently connected wallet account:

ConnectButton Component

The ConnectButton component:
  • Shows “Connect Wallet” when disconnected
  • Shows wallet address when connected
  • Handles wallet selection modal

Test Connection

  1. Run npm run dev
  2. Click “Connect Wallet”
  3. Select your wallet (Slush, Sui Wallet, etc.)
  4. Approve the connection
You should see your wallet address displayed.

Next Steps

Setup Contracts

Configure contract addresses and helpers