Fund Your Wallet

Add SOL for transaction fees and USDC for betting.

What You'll Do

Fund your wallet with SOL (for transaction fees) and USDC (for placing wagers).

Prerequisites

  • A wallet created (see Create a Wallet guide)
  • Connection to Solana network

Check SOL Balance

Verify your wallet has sufficient SOL:

typescript
async function checkBalance(publicKey: PublicKey) {
  const balance = await connection.getBalance(publicKey);
  const solBalance = balance / LAMPORTS_PER_SOL;

  console.log("SOL Balance:", solBalance);

  if (solBalance < 0.1) {
    console.warn("Warning: Low balance, may not cover transaction fees");
  }

  return solBalance;
}

Production Funding

On mainnet, users fund their wallets through:

  • Direct deposits to the wallet address
  • Onramp services (Coinbase, MoonPay)

What Happens

When you fund a wallet:

1. SOL: Native balance increases, used for transaction fees

2. USDC: Associated Token Account is created (if needed), tokens deposited

Next Steps

With a funded wallet, you're ready to create your onchain program user account.