介绍
入门
安装
Foundry 之旅的第一步
项目
创建新项目
在现有项目上工作
依赖项
项目布局
Forge 概述
Forge 概述
测试
❱
编写测试
作弊码(cheatcodes)
Forge 标准库概览
了解 Traces
分叉测试
高级测试
❱
模糊测试
不变性测试
差异测试
部署和验证
Gas 追踪
❱
Gas 报告
Gas 快照
调试器
Cast 概览
Cast 概述
Anvil 概述
Anvil 概述
Chisel 概述
Chisel 概述
配置
使用 foundry.toml 进行配置
持续集成
与 VSCode 集成
Shell 自动补全
静态分析器
与 Hardhat 集成
教程
最佳实践
使用 Solmate 创建 NFT
Docker 和 Foundry
测试 EIP-712 签名
Solidity 脚本
使用 CREATE2 进行确定性部署
使用 Cast 和 Anvil 分叉主网
学习 Foundry 视频
附录
常见问题
帮助我们改进 Foundry
参考文献
❱
forge 命令
❱
常用命令
❱
forge
forge help
forge completions
Project 命令
❱
forge init
forge install
forge update
forge remove
forge config
forge remappings
forge tree
forge geiger
Build 命令
❱
forge build
forge clean
forge inspect
Test 命令
❱
forge test
forge snapshot
forge coverage
Deploy 命令
❱
forge create
forge verify-contract
forge verify-check
forge flatten
Utility 命令
❱
forge debug
forge bind
forge cache
forge cache clean
forge cache ls
forge script
forge upload-selectors
forge doc
cast 命令
❱
常用命令
❱
cast
cast help
cast completions
Chain 命令
❱
cast chain-id
cast chain
cast client
Transaction 命令
❱
cast publish
cast receipt
cast send
cast call
cast rpc
cast tx
cast run
cast estimate
cast access-list
cast logs
Block 命令
❱
cast find-block
cast gas-price
cast block-number
cast basefee
cast block
cast age
Account 命令
❱
cast balance
cast storage
cast proof
cast nonce
cast code
cast codesize
ENS 命令
❱
cast lookup-address
cast resolve-name
cast namehash
Etherscan 命令
❱
cast etherscan-source
ABI 命令
❱
cast abi-decode
cast abi-encode
cast 4byte
cast 4byte-decode
cast 4byte-event
cast calldata
cast calldata-decode
cast pretty-calldata
cast --abi-decode
cast --calldata-decode
cast upload-signature
Conversion 命令
❱
cast --format-bytes32-string
cast --from-bin
cast --from-fix
cast --from-rlp
cast --from-utf8
cast from-wei
cast parse-bytes32-address
cast --parse-bytes32-string
cast --to-ascii
cast --to-base
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
cast shl
cast shr
Utility 命令
❱
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 命令
❱
cast wallet
cast wallet new
cast wallet new-mnemonic
cast wallet address
cast wallet sign
cast wallet vanity
cast wallet verify
cast wallet import
cast wallet list
anvil 参考
chisel 参考
Config 参考
❱
概述
Project
Solidity 编译器
Testing
In-line Configuration Testing
Formatter
文档生成器
Etherscan
Cheatcodes 参考
❱
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
startStateDiffRecording
stopAndReturnStateDiff
Assertions
❱
expectRevert
expectEmit
expectCall
Fuzzer
❱
assume
Forking
❱
createFork
selectFork
createSelectFork
activeFork
rollFork
makePersistent
revokePersistent
isPersistent
allowCheatcodes
transact
External
❱
ffi
projectRoot
getCode
getDeployedCode
sleep
unixTime
setEnv
envOr
envBool
envUint
envInt
envAddress
envBytes32
envString
envBytes
parseJson
keyExists
parseJsonKeys
serializeJson
writeJson
Utilities
❱
addr
sign
skip
label
deriveKey
parseBytes
parseAddress
parseUint
parseInt
parseBytes32
parseBool
rememberKey
toString
breakpoint
createWallet
Snapshots
RPC
Files
Forge Standard Library 参考
❱
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 参考
Miscellaneous
❱
Struct encoding
Precompile Registry
Light
Rust
Coal
Navy
Ayu
Foundry 中文文档
英文
中文
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-check-sum-address