deployerallowlist

package
v0.0.0-...-9e22ca1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigKey = "contractDeployerAllowListConfig"

ConfigKey is the key used in json config files to specify this precompile config. must be unique across all precompiles.

Variables

View Source
var ContractAddress = common.HexToAddress("0x0200000000000000000000000000000000000000")

Singleton StatefulPrecompiledContract for W/R access to the contract deployer allow list.

View Source
var Module = modules.Module{
	ConfigKey:    ConfigKey,
	Address:      ContractAddress,
	Contract:     ContractDeployerAllowListPrecompile,
	Configurator: &configurator{},
}

Functions

func GetContractDeployerAllowListStatus

func GetContractDeployerAllowListStatus(stateDB contract.StateDB, address common.Address) allowlist.Role

GetContractDeployerAllowListStatus returns the role of [address] for the contract deployer allow list.

func SetContractDeployerAllowListStatus

func SetContractDeployerAllowListStatus(stateDB contract.StateDB, address common.Address, role allowlist.Role)

SetContractDeployerAllowListStatus sets the permissions of [address] to [role] for the contract deployer allow list. assumes [role] has already been verified as valid.

Types

type Config

Config contains the configuration for the ContractDeployerAllowList precompile, consisting of the initial allowlist and the timestamp for the network upgrade.

func NewConfig

func NewConfig(blockTimestamp *uint64, admins []common.Address, enableds []common.Address, managers []common.Address) *Config

NewConfig returns a config for a network upgrade at [blockTimestamp] that enables ContractDeployerAllowList with [admins], [enableds] and [managers] as members of the allowlist.

func NewDisableConfig

func NewDisableConfig(blockTimestamp *uint64) *Config

NewDisableConfig returns config for a network upgrade at [blockTimestamp] that disables ContractDeployerAllowList.

func (*Config) Equal

func (c *Config) Equal(cfg precompileconfig.Config) bool

Equal returns true if [cfg] is a [*ContractDeployerAllowListConfig] and it has been configured identical to [c].

func (*Config) Key

func (*Config) Key() string

func (*Config) Verify

func (c *Config) Verify(chainConfig precompileconfig.ChainConfig) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL