Documentation ¶
Index ¶
Constants ¶
const ConfigKey = "contractDeployerAllowListConfig"
ConfigKey is the key used in json config files to specify this precompile config. must be unique across all precompiles.
Variables ¶
var ContractAddress = common.HexToAddress("0x0200000000000000000000000000000000000000")
var ContractDeployerAllowListPrecompile contract.StatefulPrecompiledContract = allowlist.CreateAllowListPrecompile(ContractAddress)
Singleton StatefulPrecompiledContract for W/R access to the contract deployer allow list.
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 ¶
type Config struct { allowlist.AllowListConfig precompileconfig.Upgrade }
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 ¶
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) Verify ¶
func (c *Config) Verify(chainConfig precompileconfig.ChainConfig) error