Initial Setup

Environment and Wallet Setup

The Avalanche Starter Kit contains everything you need to get started quickly with Avalanche. The kit provides a self-contained environment with Foundry so you can follow the course without the need of installing anything else other than launching the environment.

In this course we will run the Avalanche Starter Kit in a hosted environment on Github. This is the quickest way to get started.

Create a Codespace

The quickest way to get started is using GitHub Codespaces, which provides a pre-configured development environment:

Open in GitHub Codespaces

Wait a few minutes for the environment to build. You must be logged into GitHub to use Codespaces.

Alternatively, you can clone the repository:

Open Avalanche Starter Kit

Install Dependencies

Once your Codespace is ready, install the project dependencies:

forge install
 
# Optional: Mute Foundry nightly warning
export FOUNDRY_DISABLE_NIGHTLY_WARNING=1

Set Up Core Wallet

  1. Install Core wallet:
    • Visit Core wallet website
    • Download and install for your OS
    • Create a new wallet or import existing one

If you created your wallet account with gmail or any other auth provider you will not have a private key

  1. Get your wallet credentials:
    • Open Core wallet
    • Click your account name (top right)
    • Select "View Private Key"
    • Enter your password
    • Copy your:
      • Account address (0x...)
      • Private key (0x...)

The private key is for testing only. Never use it in production or share it with anyone. Do not use a private key holding real funds on testnet, separate mainnet and testnet keys!

Configure Environment

  1. Create your environment file:
cp .env.example .env
  1. Add your Core wallet credentials to .env:
# Your private key for signing transactions (for testing only, never use in production)
PK=your_private_key_here
 
# Your funded address (the address derived from your private key)
FUNDED_ADDRESS=your_funded_address_here
 
# Teleporter and chain configuration
# Fuji C-Chain, Dispatch & Echo have the same address, but this might no be the case for other L1s
TELEPORTER_REGISTRY_FUJI_DISPATCH=0xF86Cb19Ad8405AEFa7d09C778215D2Cb6eBfB228
TELEPORTER_REGISTRY_FUJI_C_CHAIN=0xF86Cb19Ad8405AEFa7d09C778215D2Cb6eBfB228
 
# Blockchain IDs pre-filled
FUJI_DISPATCH_BLOCKCHAIN_ID_HEX=0x9f3be606497285d0ffbb5ac9ba24aa60346a9b1812479ed66cb329f394a4b1c7
FUJI_C_CHAIN_BLOCKCHAIN_ID_HEX=0x31233cae135e3974afa396e90f465aa28027de5f97f729238c310d2ed2f71902
 
# Incentevize a Relayer
FEE_TOKEN_ADDRESS=your_example_erc20_address
  1. Load the environment:
source .env
  1. Verify your configuration:
# Should show your wallet address
echo $FUNDED_ADDRESS

The private key is for testing only. Never use it in production or share it with anyone. Do not use a private key holding real funds on testnet, separate mainnet and testnet keys!

Is this guide helpful?

On this page