Skip to main content
base-anvil is a fork of Foundry that teaches forge, cast, anvil, and chisel about Base’s native precompiles — the B20 token factory, B20 tokens, the PolicyRegistry, and the ActivationRegistry. Stock Foundry can’t reach these precompile addresses and aborts with call to non-contract address; base-anvil registers them into its EVM so you can build and test Base apps locally.

Install

It installs alongside your existing Foundry without overwriting stock foundryup or your forge/cast/anvil/chisel:
This adds base-foundryup and the namespaced base-forge, base-cast, base-anvil, and base-chisel commands, which enable Base precompiles by default.

Pick a Base version

base-anvil’s versioned releases are named after the Base chain release they target. Pin a release with:

Commands

Everything else is inherited from upstream Foundry and works unchanged; only the Base additions above are specific to this fork.

Next steps

Smart Contracts

Deploy a contract to Base Sepolia with base-anvil, end to end.

B20 Token Standard

Launch Base’s native token standard from the command line.