allowlist

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

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