Introduction
Getting Started
Installation
First Steps with Foundry
Projects
Creating a New Project
Working on an Existing Project
Dependencies
Project Layout
Forge Overview
Overview of Forge
Tests
❱
Writing Tests
Cheatcodes
Forge Standard Library Overview
Understanding Traces
Fork Testing
Advanced Testing
❱
Fuzz Testing
Invariant Testing
Differential Testing
Deploying and Verifying
Gas Tracking
❱
Gas Reports
Gas Snapshots
Debugger
Cast Overview
Overview of Cast
Anvil Overview
Overview of Anvil
Chisel Overview
Overview of Chisel
Configuration
Configuring with foundry.toml
Continuous Integration
Integrating with VSCode
Shell Autocompletion
Static Analyzers
Integrating with Hardhat
Tutorials
Best Practices
Creating an NFT with Solmate
Docker and Foundry
Testing EIP-712 Signatures
Solidity Scripting
Forking Mainnet with Cast and Anvil
Learning Foundry Videos
Appendix
FAQ
Help us improve Foundry
References
❱
forge Commands
❱
General Commands
❱
forge
forge help
forge completions
Project Commands
❱
forge init
forge install
forge update
forge remove
forge config
forge remappings
forge tree
forge geiger
Build Commands
❱
forge build
forge clean
forge inspect
Test Commands
❱
forge test
forge snapshot
forge coverage
Deploy Commands
❱
forge create
forge verify-contract
forge verify-check
forge flatten
Utility Commands
❱
forge debug
forge bind
forge cache
forge cache clean
forge cache ls
forge script
forge upload-selectors
forge doc
cast Commands
❱
General Commands
❱
cast
cast help
cast completions
Chain Commands
❱
cast chain-id
cast chain
cast client
Transaction Commands
❱
cast publish
cast receipt
cast send
cast call
cast rpc
cast tx
cast run
cast estimate
cast access-list
Block Commands
❱
cast find-block
cast gas-price
cast block-number
cast basefee
cast block
cast age
Account Commands
❱
cast balance
cast storage
cast proof
cast nonce
cast code
cast codesize
ENS Commands
❱
cast lookup-address
cast resolve-name
cast namehash
Etherscan Commands
❱
cast etherscan-source
ABI Commands
❱
cast abi-encode
cast 4byte
cast 4byte-decode
cast 4byte-event
cast calldata
cast pretty-calldata
cast --abi-decode
cast --calldata-decode
cast upload-signature
Conversion Commands
❱
cast --format-bytes32-string
cast --from-bin
cast --from-fix
cast --from-rlp
cast --from-utf8
cast --parse-bytes32-string
cast --to-ascii
cast --to-base
cast --to-bytes32
cast --to-fix
cast --to-hexdata
cast --to-int256
cast --to-rlp
cast --to-uint256
cast --to-unit
cast --to-wei
cast shl
cast shr
Utility Commands
❱
cast sig
cast sig-event
cast keccak
cast compute-address
cast create2
cast interface
cast index
cast --concat-hex
cast --max-int
cast --min-int
cast --max-uint
cast --to-checksum-address
Wallet Commands
❱
cast wallet
cast wallet new
cast wallet address
cast wallet sign
cast wallet vanity
cast wallet verify
anvil Reference
chisel Reference
Config Reference
❱
Overview
Project
Solidity Compiler
Testing
In-line Configuration Testing
Formatter
Documentation Generator
Etherscan
Cheatcodes Reference
❱
Environment
❱
warp
roll
fee
difficulty
prevrandao
chainId
store
load
etch
deal
prank
startPrank
stopPrank
readCallers
record
accesses
recordLogs
getRecordedLogs
setNonce
getNonce
mockCall
mockCallRevert
clearMockedCalls
coinbase
broadcast
startBroadcast
stopBroadcast
pauseGasMetering
resumeGasMetering
txGasPrice
Assertions
❱
expectRevert
expectEmit
expectCall
Fuzzer
❱
assume
Forking
❱
createFork
selectFork
createSelectFork
activeFork
rollFork
makePersistent
revokePersistent
isPersistent
allowCheatcodes
transact
External
❱
ffi
projectRoot
getCode
getDeployedCode
setEnv
envOr
envBool
envUint
envInt
envAddress
envBytes32
envString
envBytes
parseJson
serializeJson
writeJson
Utilities
❱
addr
sign
skip
label
deriveKey
parseBytes
parseAddress
parseUint
parseInt
parseBytes32
parseBool
rememberKey
toString
breakpoint
Snapshots
RPC
Files
Forge Standard Library Reference
❱
Std Logs
Std Assertions
❱
fail
assertFalse
assertEq
assertApproxEqAbs
assertApproxEqRel
Std Cheats
❱
skip
rewind
hoax
startHoax
deal
deployCode
deployCodeTo
bound
changePrank
makeAddr
makeAddrAndKey
noGasMetering
assumeNoPrecompiles
assumePayable
Std Errors
❱
assertionError
arithmeticError
divisionError
enumConversionError
encodeStorageError
popError
indexOOBError
memOverflowError
zeroVarError
Std Storage
❱
target
sig
with_key
depth
checked_write
find
read
Std Math
❱
abs
delta
percentDelta
Script Utils
❱
computeCreateAddress
deriveRememberKey
Console Logging
DSTest Reference
Miscellaneous
❱
Struct encoding
Precompile Registry
Light
Rust
Coal
Navy
Ayu (default)
Foundry Book
Miscellaneous
Struct encoding
Precompile Registry