Skip to main content

Foundry

Foundry is a smart contract development toolchain.

With Foundry you can manage your dependencies, compile your project, run tests, deploy smart contracts, and interact with the chain from the command-line and via Solidity scripts.

Check out the Foundry Book to get started with using Foundry with Base.


Using Foundry with Base

Foundry supports Base out-of-the-box.

Just provide the Base RPC URL and Chain ID when deploying and verifying your contracts.

Mainnet

Deploying a smart contract

forge create <CONTRACT_NAME> --rpc-url=https://mainnet.base.org/

Verifying a smart contract

forge verify-contract <CONTRACT_ADDRESS> <CONTRACT_NAME> --chain-id 8453

Testnet

Deploying a smart contract

forge create <CONTRACT_NAME> --rpc-url=https://sepolia.base.org/

Verifying a smart contract

forge verify-contract <CONTRACT_ADDRESS> <CONTRACT_NAME> --chain-id 84532
We use cookies and similar technologies on our websites to enhance and tailor your experience, analyze our traffic, and for security and marketing. You can choose not to allow some type of cookies by clicking . For more information see our Cookie Policy.