Documentation ¶
Index ¶
- Constants
- func BuildL2Genesis(ctx context.Context, config *GenesisConfig, l1StartBlock *types.Block) (*core.Genesis, error)
- func GeneratePredeployConfig(config *GenesisConfig, block *types.Block) predeploys.PredeployConfigs
- func NewL2EmptyGenesis(config *GenesisConfig, block *types.Block) (*core.Genesis, error)
- type GenesisConfig
Constants ¶
View Source
const InitializedValue uint8 = 1
initialzedValue represents the `Initializable` contract value.
View Source
const MaxInitializedValue uint8 = 255
Variables ¶
This section is empty.
Functions ¶
func BuildL2Genesis ¶
func GeneratePredeployConfig ¶
func GeneratePredeployConfig(config *GenesisConfig, block *types.Block) predeploys.PredeployConfigs
func NewL2EmptyGenesis ¶
Types ¶
type GenesisConfig ¶
type GenesisConfig struct { // L2ChainID is the chain ID of the L2 chain. L2ChainID uint64 `json:"l2ChainID"` L2GenesisBlockNonce hexutil.Uint64 `json:"l2GenesisBlockNonce"` L2GenesisBlockGasLimit hexutil.Uint64 `json:"l2GenesisBlockGasLimit"` L2GenesisBlockDifficulty *hexutil.Big `json:"l2GenesisBlockDifficulty"` L2GenesisBlockMixHash common.Hash `json:"l2GenesisBlockMixHash"` L2GenesisBlockCoinbase common.Address `json:"l2GenesisBlockCoinbase"` L2GenesisBlockNumber hexutil.Uint64 `json:"l2GenesisBlockNumber"` L2GenesisBlockGasUsed hexutil.Uint64 `json:"l2GenesisBlockGasUsed"` L2GenesisBlockParentHash common.Hash `json:"l2GenesisBlockParentHash"` L2GenesisBlockBaseFeePerGas *hexutil.Big `json:"l2GenesisBlockBaseFeePerGas"` L2GenesisBlockExtraData hexutil.Bytes `json:"l2GenesisBlockExtraData"` L2PredeployOwner common.Address `json:"l2PredeployOwner"` L1PortalAddress common.Address `json:"l1PortalAddress,omitempty"` L1StandardBridgeAddress common.Address `json:"l1StandardBridgeAddress,omitempty"` L2FeesWithdrawalAddress common.Address `json:"l2FeesWithdrawalAddress"` L2FeesMinWithdrwalAmount *hexutil.Big `json:"l2FeesMinWithdrwalAmount"` L1FeeOverhead *hexutil.Big `json:"l1FeeOverhead"` L1FeeScalar *hexutil.Big `json:"l1FeeScalar"` Alloc core.GenesisAlloc `json:"alloc"` }
func NewGenesisConfig ¶
func NewGenesisConfig(path string) (*GenesisConfig, error)
Click to show internal directories.
Click to hide internal directories.