A local devnet allows you to run a whole pod network on your development machine. It is perfect for development and testing smart contracts or applications before deploying them to public networks.
Setup
Prerequisites
Before setting up your local pod environment, ensure you have:
Linux or macOS operating system
Git installed
curl installed (for interacting with the JSON-RPC API)
installed (for cast command)
Installation
Download the Binary
Download the latest pod release from GitHub:
# Create a directory for pod
mkdir ~/pod && cd ~/pod
# Download the latest release (update URL with actual release)
curl -LO https://github.com/pod-network/pod/releases/latest/download/pod-<version>-<platform>
# Make the binary executable
chmod +x pod-<version>-<platform>
# Optional: Add to your PATH
mv pod-<version>-<platform> /usr/local/bin/pod
Configuration
Create a configuration file named pod.toml in your working directory:
[network]
rpc_host = "127.0.0.1"
rpc_port = 8545
[client]
# The client will automatically create accounts with initial balances
initial_accounts = 10
initial_balance = "100000000000000000000" # 100 ETH in wei
Running a Local Network
Starting the Network
Pod provides a convenient script for starting a local development network:
pod devnet start
The script will:
Start a local network with multiple validator nodes
Initialize test accounts with balances
Display connection information and account details
You should see output similar to this:
Starting local pod development network...
RPC endpoint: http://127.0.0.1:8545
Available test accounts:
Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (100 ETH)
Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Account #1: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (100 ETH)
Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
...
Local network is ready!
Interacting with the Network
You can interact with your local pod network using standard JSON-RPC calls. Here are some examples using both curl and cast:
# Get chain ID
cast chain-id --rpc-url http://127.0.0.1:8545
# Check account balance
cast balance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \
--rpc-url http://127.0.0.1:8545
Stopping the network
To stop the local network:
pod devnet stop
The local development network is intended for testing purposes only. Never use the generated private keys on production networks, as they are publicly known.
Additional Configuration
For more advanced configuration options, you can modify the pod.toml file: