allowlist

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetAdminFunc            = abi.MustNewMethod("function setAdmin(address)")
	SetEnabledSignatureFunc = abi.MustNewMethod("function setEnabled(address)")
	SetNoneFunc             = abi.MustNewMethod("function setNone(address)")
	ReadAllowListFunc       = abi.MustNewMethod("function readAllowList(address) returns (uint256)")
)

list of function methods for the allow list functionality

Functions

func ApplyGenesisAllocs

func ApplyGenesisAllocs(chain *chain.Genesis, allowListAddr types.Address, config *chain.AllowListConfig)

Types

type AllowList

type AllowList struct {
	// contains filtered or unexported fields
}

func NewAllowList

func NewAllowList(state stateRef, addr types.Address) *AllowList

func (*AllowList) Addr

func (a *AllowList) Addr() types.Address

func (*AllowList) GetRole

func (a *AllowList) GetRole(addr types.Address) Role

func (*AllowList) Run

func (*AllowList) SetRole

func (a *AllowList) SetRole(addr types.Address, role Role)

type Role

type Role types.Hash
var (
	NoRole      Role = Role(types.StringToHash("0x0000000000000000000000000000000000000000000000000000000000000000"))
	EnabledRole Role = Role(types.StringToHash("0x0000000000000000000000000000000000000000000000000000000000000001"))
	AdminRole   Role = Role(types.StringToHash("0x0000000000000000000000000000000000000000000000000000000000000002"))
)

func (Role) Bytes

func (r Role) Bytes() []byte

func (Role) Enabled

func (r Role) Enabled() bool

func (Role) Uint64

func (r Role) Uint64() uint64

Jump to

Keyboard shortcuts

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