Documentation ¶
Index ¶
Constants ¶
View Source
const UsingOVM = true
UsingOVM is used to enable or disable functionality necessary for the OVM.
Variables ¶
View Source
var ( // L2GasPriceSlot refers to the storage slot that the L2 gas price is stored // in in the OVM_GasPriceOracle predeploy L2GasPriceSlot = common.BigToHash(big.NewInt(1)) // L1GasPriceSlot refers to the storage slot that the L1 gas price is stored // in in the OVM_GasPriceOracle predeploy L1GasPriceSlot = common.BigToHash(big.NewInt(2)) // L2GasPriceOracleOwnerSlot refers to the storage slot that the owner of // the OVM_GasPriceOracle is stored in L2GasPriceOracleOwnerSlot = common.BigToHash(big.NewInt(0)) // L2GasPriceOracleAddress is the address of the OVM_GasPriceOracle // predeploy L2GasPriceOracleAddress = common.HexToAddress("0x420000000000000000000000000000000000000F") // OverheadSlot refers to the storage slot in the OVM_GasPriceOracle that // holds the per transaction overhead. This is added to the L1 cost portion // of the fee OverheadSlot = common.BigToHash(big.NewInt(3)) // ScalarSlot refers to the storage slot in the OVM_GasPriceOracle that // holds the transaction fee scalar. This value is scaled upwards by // the number of decimals ScalarSlot = common.BigToHash(big.NewInt(4)) // DecimalsSlot refers to the storage slot in the OVM_GasPriceOracle that // holds the number of decimals in the fee scalar DecimalsSlot = common.BigToHash(big.NewInt(5)) )
View Source
var SystemAddress0 = common.HexToAddress("0x4200000000000000000000000000000000000042")
SystemAddress0 is the first deployable system address.
View Source
var SystemAddress1 = common.HexToAddress("0x4200000000000000000000000000000000000014")
SystemAddress1 is the second deployable system address.
View Source
var SystemAddressDeployers = map[uint64]SystemAddressDeployer{ 10: { common.HexToAddress("0xcDE47C1a5e2d60b9ff262b0a3b6d486048575Ad9"), common.HexToAddress("0x53A6eecC2dD4795Fcc68940ddc6B4d53Bd88Bd9E"), }, 69: { common.HexToAddress("0xd23eb5c2dd7035e6eb4a7e129249d9843123079f"), common.HexToAddress("0xa81224490b9fa4930a2e920550cd1c9106bb6d9e"), }, 420: { common.HexToAddress("0xc30276833798867c1dbc5c468bf51ca900b44e4c"), common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"), }, 421: { common.HexToAddress("0xc30276833798867c1dbc5c468bf51ca900b44e4c"), common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"), }, }
SystemAddressDeployers maintains a hardcoded map of chain IDs to system addresses.
View Source
var ZeroSystemAddress common.Address
ZeroSystemAddress is the emprt system address.
Functions ¶
Types ¶
type SystemAddressDeployer ¶
SystemAddressDeployer is a tuple containing the deployment addresses for SystemAddress0 and SystemAddress1.
func (SystemAddressDeployer) SystemAddressFor ¶
func (s SystemAddressDeployer) SystemAddressFor(addr common.Address) common.Address
SystemAddressFor returns the system address for a given deployment address. If no system address is configured for this deployer, ZeroSystemAddress is returned.
Click to show internal directories.
Click to hide internal directories.