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
Differential Testing
Deploying and Verifying
Gas Tracking
❱
Gas Reports
Gas Snapshots
Debugger
Cast Overview
Overview of Cast
Anvil Overview
Overview of Anvil
Configuration
Configuring with foundry.toml
Continuous Integration
Integrating with VSCode
Shell Autocompletion
Static Analyzers
Integrating with Hardhat
Tutorials
Creating an NFT with Solmate
Docker and Foundry
Testing EIP-712 Signatures
Solidity Scripting
Forking Mainnet with Cast and Anvil
Appendix
FAQ
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
Build Commands
❱
forge build
forge clean
forge inspect
Test Commands
❱
forge test
forge snapshot
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
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 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
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 --from-bin
cast --from-fix
cast --from-rlp
cast --from-utf8
cast --to-ascii
cast --to-bytes32
cast --to-dec
cast --to-fix
cast --to-hex
cast --to-hexdata
cast --to-int256
cast --to-rlp
cast --to-uint256
cast --to-unit
cast --to-wei
Utility Commands
❱
cast sig
cast keccak
cast compute-address
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
Config Reference
Cheatcodes Reference
❱
Environment
❱
warp
roll
fee
chainId
store
load
etch
deal
prank
startPrank
stopPrank
record
accesses
recordLogs
getRecordedLogs
setNonce
getNonce
mockCall
clearMockedCalls
coinbase
broadcast
startBroadcast
stopBroadcast
Assertions
❱
expectRevert
expectEmit
expectCall
Fuzzer
❱
assume
Forking
❱
createFork
selectFork
createSelectFork
activeFork
rollFork
makePersistent
revokePersistent
isPersistent
External
❱
ffi
getCode
setEnv
envBool
envUint
envInt
envAddress
envBytes32
envString
envBytes
Utilities
❱
addr
sign
label
Snapshots
RPC
Forge Standard Library Reference
❱
Std Logs
Std Assertions
❱
fail
assertFalse
assertEq
assertApproxEqAbs
assertApproxEqRel
Std Cheats
❱
skip
rewind
hoax
startHoax
deal
deployCode
bound
changePrank
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
Console Logging
DSTest Reference
Miscellaneous
❱
Struct encoding
Light
Rust
Coal
Navy
Ayu (default)
Foundry Book
Chain Commands
cast chain-id
cast chain
cast client