1. 介绍
  2. 入门
  3. 安装
  4. Foundry 的第一步
  5. 项目
  6. 创建新项目
  7. 处理现有项目
  8. 克隆链上已验证的合约
  9. 依赖项
  10. Soldeer
  11. 项目布局
  12. Forge 概述
  13. Forge 概述
  14. 测试
    1. 编写测试
    2. Cheatcodes
    3. Forge 标准库概述
    4. 理解 Traces
    5. Fork 测试
    6. 重放失败
  15. 高级测试
    1. 模糊测试
    2. 不变性测试
    3. 差异测试
  16. 部署和验证
  17. Gas 跟踪
    1. Gas 报告
    2. Gas 函数快照
    3. Gas 部分快照
  18. 调试器
  19. Cast 概述
  20. Cast 概述
  21. Anvil 概述
  22. Anvil 概述
  23. Chisel 概述
  24. Chisel 概述
  25. 配置
  26. 使用 foundry.toml 配置
  27. 持续集成
  28. 与 VSCode 集成
  29. Shell 自动补全
  30. 静态分析器
  31. 与 Hardhat 集成
  32. Vyper 支持
  33. 教程
  34. 最佳实践
  35. 使用 Solmate 创建 NFT
  36. Docker 和 Foundry
  37. 测试 EIP-712 签名
  38. Solidity 脚本编写
  39. 使用 CREATE2 进行确定性部署
  40. 使用 Cast 和 Anvil 分叉主网
  41. 学习 Foundry 视频
  42. 附录
  43. 常见问题
  44. 帮助我们改进 Foundry
  45. 参考资料
    1. CLI 参考
      1. forge
        1. forge bind
        2. forge bind-json
        3. forge build
        4. forge cache
          1. forge cache clean
          2. forge cache ls
        5. forge clean
        6. forge clone
        7. forge compiler
          1. forge compiler resolve
        8. forge completions
        9. forge config
        10. forge coverage
        11. forge create
        12. forge debug
        13. forge doc
        14. forge eip712
        15. forge flatten
        16. forge fmt
        17. forge geiger
        18. forge generate
          1. forge generate test
        19. forge generate-fig-spec
        20. forge init
        21. forge inspect
        22. forge install
        23. forge remappings
        24. forge remove
        25. forge script
        26. forge selectors
          1. forge selectors collision
          2. forge selectors upload
          3. forge selectors list
          4. forge selectors find
        27. forge snapshot
        28. forge soldeer
          1. forge soldeer init
          2. forge soldeer install
          3. forge soldeer update
          4. forge soldeer login
          5. forge soldeer push
          6. forge soldeer uninstall
          7. forge soldeer version
        29. forge test
        30. forge tree
        31. forge update
        32. forge verify-bytecode
        33. forge verify-check
        34. forge verify-contract
      2. cast
        1. cast 4byte
        2. cast 4byte-decode
        3. cast 4byte-event
        4. cast abi-decode
        5. cast abi-encode
        6. cast access-list
        7. cast address-zero
        8. cast admin
        9. cast age
        10. cast balance
        11. cast base-fee
        12. cast bind
        13. cast block
        14. cast block-number
        15. cast call
          1. cast call --create
        16. cast calldata
        17. cast calldata-decode
        18. cast chain
        19. cast chain-id
        20. cast client
        21. cast code
        22. cast codehash
        23. cast codesize
        24. cast completions
        25. cast compute-address
        26. cast concat-hex
        27. cast create2
        28. cast decode-eof
        29. cast decode-transaction
        30. cast disassemble
        31. cast estimate
          1. cast estimate --create
        32. cast etherscan-source
        33. cast find-block
        34. cast format-bytes32-string
        35. cast from-bin
        36. cast from-fixed-point
        37. cast from-rlp
        38. cast from-utf8
        39. cast from-wei
        40. cast gas-price
        41. cast generate-fig-spec
        42. cast hash-message
        43. cast hash-zero
        44. cast implementation
        45. cast index
        46. cast index-erc7201
        47. cast interface
        48. cast keccak
        49. cast logs
        50. cast lookup-address
        51. cast max-int
        52. cast max-uint
        53. cast min-int
        54. cast mktx
          1. cast mktx --create
        55. cast namehash
        56. cast nonce
        57. cast parse-bytes32-address
        58. cast parse-bytes32-string
        59. cast pretty-calldata
        60. cast proof
        61. cast publish
        62. cast receipt
        63. cast resolve-name
        64. cast rpc
        65. cast run
        66. cast selectors
        67. cast send
          1. cast send --create
        68. cast shl
        69. cast shr
        70. cast sig
        71. cast sig-event
        72. cast storage
        73. cast storage-root
        74. cast to-ascii
        75. cast to-base
        76. cast to-bytes32
        77. cast to-check-sum-address
        78. cast to-dec
        79. cast to-fixed-point
        80. cast to-hex
        81. cast to-hexdata
        82. cast to-int256
        83. cast to-rlp
        84. cast to-uint256
        85. cast to-unit
        86. cast to-utf8
        87. cast to-wei
        88. cast tx
        89. cast upload-signature
        90. cast wallet
          1. cast wallet new
          2. cast wallet new-mnemonic
          3. cast wallet vanity
          4. cast wallet address
          5. cast wallet sign
          6. cast wallet sign-auth
          7. cast wallet verify
          8. cast wallet import
          9. cast wallet list
          10. cast wallet private-key
          11. cast wallet decrypt-keystore
      3. anvil
        1. anvil completions
        2. anvil generate-fig-spec
      4. chisel
        1. chisel list
        2. chisel load
        3. chisel view
        4. chisel clear-cache
        5. chisel eval
    2. forge 命令
      1. 通用命令
        1. forge
        2. forge help
        3. forge completions
      2. 项目命令
        1. forge init
        2. forge clone
        3. forge install
        4. forge update
        5. forge remove
        6. forge config
        7. forge remappings
        8. forge tree
        9. forge geiger
      3. 构建命令
        1. forge build
        2. forge clean
        3. forge inspect
      4. 测试命令
        1. forge test
        2. forge snapshot
        3. forge coverage
      5. 部署命令
        1. forge create
        2. forge verify-contract
        3. forge verify-check
        4. forge flatten
      6. 实用命令
        1. forge debug
        2. forge bind
        3. forge cache
        4. forge cache clean
        5. forge cache ls
        6. forge script
        7. forge upload-selectors
        8. forge doc
    3. cast 命令
      1. 通用命令
        1. cast
        2. cast help
        3. cast completions
      2. 链命令
        1. cast chain-id
        2. cast chain
        3. cast client
      3. 交易命令
        1. cast publish
        2. cast receipt
        3. cast send
        4. cast mktx
        5. cast call
        6. cast rpc
        7. cast tx
        8. cast run
        9. cast estimate
        10. cast access-list
        11. cast logs
      4. 区块命令
        1. cast find-block
        2. cast gas-price
        3. cast block-number
        4. cast basefee
        5. cast block
        6. cast age
      5. 账户命令
        1. cast balance
        2. cast storage
        3. cast proof
        4. cast nonce
        5. cast code
        6. cast codesize
      6. ENS 命令
        1. cast lookup-address
        2. cast resolve-name
        3. cast namehash
      7. Etherscan 命令
        1. cast etherscan-source
      8. ABI 命令
        1. cast abi-decode
        2. cast abi-encode
        3. cast 4byte
        4. cast 4byte-decode
        5. cast 4byte-event
        6. cast calldata
        7. cast calldata-decode
        8. cast pretty-calldata
        9. cast selectors
        10. cast upload-signature
      9. 转换命令
        1. cast format-bytes32-string
        2. cast from-bin
        3. cast from-fixed-point
        4. cast from-rlp
        5. cast from-utf8
        6. cast from-wei
        7. cast parse-bytes32-address
        8. cast parse-bytes32-string
        9. cast to-ascii
        10. cast to-base
        11. cast to-bytes32
        12. cast to-dec
        13. cast to-fixed-point
        14. cast to-hex
        15. cast to-hexdata
        16. cast to-int256
        17. cast to-rlp
        18. cast to-uint256
        19. cast to-unit
        20. cast to-wei
        21. cast shl
        22. cast shr
      10. 实用命令
        1. cast address-zero
        2. cast sig
        3. cast sig-event
        4. cast keccak
        5. cast compute-address
        6. cast create2
        7. cast interface
        8. cast index
        9. cast concat-hex
        10. cast max-int
        11. cast min-int
        12. cast max-uint
        13. cast to-check-sum-address
      11. 钱包命令
        1. cast wallet
        2. cast wallet new
        3. cast wallet new-mnemonic
        4. cast wallet address
        5. cast wallet sign
        6. cast wallet vanity
        7. cast wallet verify
        8. cast wallet import
        9. cast wallet list
    4. anvil 参考
    5. chisel 参考
    6. 配置参考
      1. 概述
      2. 项目
      3. Solidity 编译器
      4. 测试
      5. 内联配置测试
      6. 格式化程序
      7. 文档生成器
      8. Etherscan
    7. 辅助代码参考
      1. 环境
        1. warp
        2. roll
        3. fee
        4. getBlockTimestamp
        5. getBlockNumber
        6. difficulty
        7. prevrandao
        8. chainId
        9. store
        10. load
        11. etch
        12. deal
        13. prank
        14. startPrank
        15. stopPrank
        16. readCallers
        17. record
        18. accesses
        19. recordLogs
        20. getRecordedLogs
        21. setNonce
        22. getNonce
        23. mockCall
        24. mockCallRevert
        25. mockFunction
        26. clearMockedCalls
        27. coinbase
        28. broadcast
        29. startBroadcast
        30. stopBroadcast
        31. pauseGasMetering
        32. resetGasMetering
        33. resumeGasMetering
        34. txGasPrice
        35. startStateDiffRecording
        36. stopAndReturnStateDiff
        37. snapshotState
        38. snapshotGas
      2. 断言
        1. expectRevert
        2. expectEmit
        3. expectCall
      3. 模糊测试
        1. assume
        2. assumeNoRevert
      4. 分叉
        1. createFork
        2. selectFork
        3. createSelectFork
        4. activeFork
        5. rollFork
        6. makePersistent
        7. revokePersistent
        8. isPersistent
        9. allowCheatcodes
        10. transact
      5. 外部
        1. ffi
        2. prompt
        3. projectRoot
        4. getCode
        5. getDeployedCode
        6. sleep
        7. unixTime
        8. setEnv
        9. envOr
        10. envBool
        11. envUint
        12. envInt
        13. envAddress
        14. envBytes32
        15. envString
        16. envBytes
        17. keyExists
        18. keyExistsJson
        19. keyExistsToml
        20. parseJson
        21. parseToml
        22. parseJsonKeys
        23. parseTomlKeys
        24. serializeJson
        25. writeJson
        26. writeToml
      6. 实用程序
        1. addr
        2. sign
        3. skip
        4. label
        5. getLabel
        6. deriveKey
        7. parseBytes
        8. parseAddress
        9. parseUint
        10. parseInt
        11. parseBytes32
        12. parseBool
        13. rememberKey
        14. toString
        15. breakpoint
        16. createWallet
        17. copyStorage
        18. setArbitraryStorage
      7. RPC
      8. 文件
    8. Forge 标准库参考
      1. 日志
      2. 断言
        1. fail
        2. assertTrue
        3. assertFalse
        4. assertEq
        5. assertEqDecimal
        6. assertNotEq
        7. assertNotEqDecimal
        8. assertLt
        9. assertLtDecimal
        10. assertGt
        11. assertGtDecimal
        12. assertLe
        13. assertLeDecimal
        14. assertGe
        15. assertGeDecimal
        16. assertApproxEqAbs
        17. assertApproxEqAbsDecimal
        18. assertApproxEqRel
        19. assertApproxEqRelDecimal
      3. 作弊码
        1. skip
        2. rewind
        3. hoax
        4. startHoax
        5. deal
        6. deployCode
        7. deployCodeTo
        8. bound
        9. changePrank
        10. makeAddr
        11. makeAddrAndKey
        12. noGasMetering
        13. assumeNoPrecompiles
        14. assumePayable
      4. 错误
        1. assertionError
        2. arithmeticError
        3. divisionError
        4. enumConversionError
        5. encodeStorageError
        6. popError
        7. indexOOBError
        8. memOverflowError
        9. zeroVarError
      5. 存储
        1. target
        2. sig
        3. with_key
        4. depth
        5. checked_write
        6. find
        7. read
      6. 数学
        1. abs
        2. delta
        3. percentDelta
      7. 脚本工具
        1. computeCreateAddress
        2. deriveRememberKey
      8. 控制台日志
    9. DSTest Reference
  46. 其它
    1. 结构体编码