Token Standards
Any token standard implemented as a smart contract deploys and behaves on Base as it does on Ethereum. That includes ERC-20, ERC-721, ERC-1155, ERC-4626 vaults, and permissioned-token standards such as ERC-3643. These are contracts that you or your provider deploy, upgrade, and maintain; the Base node does not implement them. B20 is Base’s native token standard. It runs as precompiles in the node and keeps full selector and behavior parity with ERC-20, so ERC-20 tooling works with B20 tokens unchanged. B20 logic changes only through network upgrades, and each change is listed in the B20 changelog.How Base Differs
Base adds native precompiles at fixed addresses that extend the EVM with functionality built into the node itself, such as the B20 token standard, the PolicyRegistry, and the B20 Factory. These addresses hold no contract bytecode, so standard Foundry (forge, cast, anvil) cannot simulate calls to them and aborts with call to non-contract address.
Base publishes base-anvil, a fork of Foundry that registers Base’s precompiles into its EVM. It installs base-forge, base-cast, and base-anvil alongside your existing Foundry toolchain without overwriting it, so contracts behave the same locally as they do on Base.
Set Up Your Environment
- Create a new project directory
Terminal
- Install Base’s Foundry build
Terminal
base-forge, base-cast, and base-anvil alongside your existing Foundry toolchain.
- Initialize a new Solidity project
Terminal
Counter contract in src/Counter.sol, which you can replace with your own contracts.
Configure a Node Connection and Deployer Key
- Create a
.envfile in your project root and add the Base RPC URLs
.env
- Load the variables
Terminal
- Store your deployer private key in Foundry’s secure keystore
Terminal
~/.foundry/keystores, which is not tracked by git.
Deploy a Contract
- (Optional) Dry-run the deployment to confirm your configuration:
Terminal
- Deploy by adding the
--broadcastflag:
Terminal
<contract-path>:<contract-name>.
- On success you’ll see the deployed address:
Example Output
Verify Your Deployment
- Check the transaction on Sepolia Basescan using the transaction hash.
- Read the contract’s state from the command line:
Terminal
Counter contract’s number variable, 0.
Next Steps
B20 Token Standard
Launch Base’s native token standard, built in at the precompile level.
Connect to Base
Network details, RPC endpoints, and wallet configuration.