txallowlist

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigKey = "txAllowListConfig"

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("0x0200000000000000000000000000000000000002")
View Source
var Module = modules.Module{
	ConfigKey:    ConfigKey,
	Address:      ContractAddress,
	Contract:     TxAllowListPrecompile,
	Configurator: &configurator{},
}

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

Functions

func GetTxAllowListStatus

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

GetTxAllowListStatus returns the role of [address] for the tx allow list.

func SetTxAllowListStatus

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

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

Types

type Config

Config implements the StatefulPrecompileConfig interface while adding in the TxAllowList specific precompile config.

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 TxAllowList with the given [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 TxAllowList.

func (*Config) Equal

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

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

func (*Config) Key

func (c *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