admin

package
v0.0.0-...-6ee0886 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAdminAddress     = errors.New("invalid admin address")
	ErrUnauthorizedTransaction = errors.New("unauthorized transaction")
	ErrNotExistAdminAddress    = errors.New("not exist admin address")
)

errors

Functions

This section is empty.

Types

type Admin

type Admin struct {
	*types.ProcessBase
	// contains filtered or unexported fields
}

Admin manages balance of accounts of the chain

func NewAdmin

func NewAdmin(pid uint8) *Admin

NewAdmin returns a Admin

func (*Admin) AdminAddress

func (p *Admin) AdminAddress(loader types.Loader, name string) common.Address

AdminAddress returns the admin address

func (*Admin) AfterExecuteTransactions

func (p *Admin) AfterExecuteTransactions(b *types.Block, ctw *types.ContextWrapper) error

AfterExecuteTransactions called after processes transactions of the block

func (*Admin) BeforeExecuteTransactions

func (p *Admin) BeforeExecuteTransactions(ctw *types.ContextWrapper) error

BeforeExecuteTransactions called before processes transactions of the block

func (*Admin) ID

func (p *Admin) ID() uint8

ID returns the id of the process

func (*Admin) Init

func (p *Admin) Init(reg *types.Register, pm types.ProcessManager, cn types.Provider) error

Init initializes the process

func (*Admin) InitAdmin

func (p *Admin) InitAdmin(ctw *types.ContextWrapper, addrMap map[string]common.Address) error

InitAdmin called at OnInitGenesis of an application

func (*Admin) Name

func (p *Admin) Name() string

Name returns the name of the process

func (*Admin) OnLoadChain

func (p *Admin) OnLoadChain(loader types.LoaderWrapper) error

OnLoadChain called when the chain loaded

func (*Admin) OnSaveData

func (p *Admin) OnSaveData(b *types.Block, ctw *types.ContextWrapper) error

OnSaveData called when the context of the block saved

func (*Admin) Version

func (p *Admin) Version() string

Version returns the version of the process

Jump to

Keyboard shortcuts

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