预编译注册表

预编译是固定地址上包含在 EVM 中的特殊合约。除了其他 EVM 环境中包含的常见预编译之外,Foundry 还包括一些用于环境变异、记录数据和合约部署的预编译。

请注意,尽管一些链(如 Optimism)在预定地址部署了字节码,使它们成为 “预部署”,但在 Foundry 的上下文中,我们将它们视为预编译。

注册表

链 ID地址名称
ALL0x01ECRecover
ALL0x02SHA-256
ALL0x03RIPEMD-160
ALL0x04Identity
ALL0x05ModExp
ALL0x06ECAdd
ALL0x07ECMul
ALL0x08ECPairing
ALL0x09Blake2F
10, 4200x4200000000000000000000000000000000000016L2ToL1MessagePasser
10, 4200x4200000000000000000000000000000000000002DeployerWhitelist
10, 4200xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000LegacyERC20ETH
10, 4200x4200000000000000000000000000000000000006WETH9
10, 4200x4200000000000000000000000000000000000007L2CrossDomainMessenger
10, 4200x4200000000000000000000000000000000000010L2StandardBridge
10, 4200x4200000000000000000000000000000000000011SequencerFeeVault
10, 4200x4200000000000000000000000000000000000012OptimismMintableERC20Factory
10, 4200x4200000000000000000000000000000000000013L1BlockNumber
10, 4200x420000000000000000000000000000000000000FGasPriceOracle
10, 4200x4200000000000000000000000000000000000015L1Block
10, 4200x4200000000000000000000000000000000000042GovernanceToken
10, 4200x4200000000000000000000000000000000000000LegacyMessagePasser
10, 4200x4200000000000000000000000000000000000014L2ERC721Bridge
10, 4200x4200000000000000000000000000000000000017OptimismMintableERC721Factory
10, 4200x4200000000000000000000000000000000000018ProxyAdmin
42161, 4216130x0000000000000000000000000000000000000064ArbSys
42161, 4216130x000000000000000000000000000000000000006EArbRetryableTx
42161, 4216130x000000000000000000000000000000000000006CArbGasInfo
42161, 4216130x0000000000000000000000000000000000000066ArbAddressTable
42161, 4216130x000000000000000000000000000000000000006FArbStatistics
42161, 4216130x00000000000000000000000000000000000000C8NodeInterface
42161, 4216130x0000000000000000000000000000000000000067ArbBLS
42161, 4216130x0000000000000000000000000000000000000065ArbInfo
42161, 4216130x000000000000000000000000000000000000006DArbAggregator
42161, 4216130x0000000000000000000000000000000000000068ArbFunctionTable
433114, 431130x0200000000000000000000000000000000000000ContractDeployerAllowListAddress
433114, 431130x0200000000000000000000000000000000000001ContractNativeMinterAddress
433114, 431130x0200000000000000000000000000000000000002TxAllowListAddress
433114, 431130x0200000000000000000000000000000000000003FeeConfigManagerAddress
ALL0x4e59b44847b379578588920cA78FbF26c0B4956C(Foundry) Create2Deployer
ALL0x7109709ECfa91a80626fF3989D68f67F5b1DD12D(Foundry) VM
ALL0x000000000000000000636F6e736F6c652e6c6f67(Foundry) Console

保留范围

一些链还包括预编译合约的保留范围。

链 ID开始地址结束地址
ALL0x000xff
433114, 431130x01000000000000000000000000000000000000000x01000000000000000000000000000000000000ff
433114, 431130x02000000000000000000000000000000000000000x02000000000000000000000000000000000000ff
433114, 431130x03000000000000000000000000000000000000000x03000000000000000000000000000000000000ff