deployerallowlist

package
v0.5.2-call-depth-metrics Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: GPL-3.0, LGPL-3.0 Imports: 7 Imported by: 4

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 *big.Int, admins []common.Address, enableds []common.Address) *Config

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

func NewDisableConfig

func NewDisableConfig(blockTimestamp *big.Int) *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() error

Jump to

Keyboard shortcuts

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