Deploying a SuperchainERC20
This guide will walk you through deploying your own ERC20 token across the OP Superchain using the SuperchainERC20 starter kit.
🚀 Getting Started
Prerequisites
First, you'll need to install Foundry, as the project requires anvil
. Follow the Foundry installation guide.
Setup Steps
-
Clone the repository
git clone [email protected]:ethereum-optimism/superchainerc20-starter.git cd superchainerc20-starter
-
Install dependencies
pnpm i
-
Set up environment files
pnpm init:env
-
Start the development environment
pnpm dev
-
Update RPC URLs
pnpm contracts:update:rpcs
-
Configure deployment settings Create or update your deployment configuration file:
[deploy_config] salt = "ethers phoenix" chains = ["sepolia/ink"] [token] owner_address = "<YOUR ADDRESS>" # Your wallet address name = "<YOUR TOKEN NAME>" # The name of your token symbol = "<YOUR TOKEN SYMBOL>" # Your token's symbol (e.g., "OPT") decimals = 18 # Number of decimal places (18 is standard)
Save this to
packages/contracts/configs/deploy-config.toml
-
Set up your deployer private key
echo 'DEPLOYER_PRIVATE_KEY=<YOUR PRIVATE KEY>' > packages/contracts/.env
⚠️ Never share or commit your private key. Make sure your wallet has enough funds for deployment.
-
Deploy your token
pnpm contracts:deploy:token
What's Next?
After successful deployment, your token will be live on the specified chains in your deploy config. You can verify your token on block explorers and start interacting with it!
For troubleshooting or questions, join our Discord community or check the SuperchainERC20 Starter Kit repository.