global_params

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION_CONTRACT_GLOBAL_PARAMS           = byte(0)
	CURRENT_VALUE                  paramType = 0x00
	PREPARE_VALUE                  paramType = 0x01
)
View Source
const (
	INIT_NAME                 = "init"
	ACCEPT_ADMIN_NAME         = "acceptAdmin"
	TRANSFER_ADMIN_NAME       = "transferAdmin"
	SET_OPERATOR              = "setOperator"
	SET_GLOBAL_PARAM_NAME     = "setGlobalParam"
	GET_GLOBAL_PARAM_NAME     = "getGlobalParam"
	CREATE_SNAPSHOT_NAME      = "createSnapshot"
	ADD_DESTROYED_CONTRACT    = "addDestroyedContract"
	REMOVE_DESTROYED_CONTRACT = "removeDestroyedContract"
)
View Source
const (
	PARAM    = "param"
	TRANSFER = "transfer"
	ADMIN    = "admin"
	OPERATOR = "operator"
)

Variables

This section is empty.

Functions

func AcceptAdmin

func AcceptAdmin(native *native.NativeService) ([]byte, error)

func AddDestroyedContracts added in v1.15.0

func AddDestroyedContracts(native *native.NativeService) ([]byte, error)

func CreateSnapshot

func CreateSnapshot(native *native.NativeService) ([]byte, error)

func GenerateOperatorKey

func GenerateOperatorKey(contract common.Address) []byte

func GetGlobalParam

func GetGlobalParam(native *native.NativeService) ([]byte, error)

func GetStorageRole

func GetStorageRole(native *native.NativeService, key []byte) (common.Address, error)

func InitGlobalParams

func InitGlobalParams()

func NotifyParamChange added in v1.0.0

func NotifyParamChange(native *native.NativeService, contract common.Address, functionName string, params Params)

func NotifyRoleChange added in v1.0.0

func NotifyRoleChange(native *native.NativeService, contract common.Address, functionName string,
	newAddr common.Address)

func NotifyTransferAdmin added in v1.0.0

func NotifyTransferAdmin(native *native.NativeService, contract common.Address, functionName string,
	originAdmin, newAdmin common.Address)

func ParamInit

func ParamInit(native *native.NativeService) ([]byte, error)

func RegisterParamContract

func RegisterParamContract(native *native.NativeService)

func RemoveDestroyedContracts added in v1.15.0

func RemoveDestroyedContracts(native *native.NativeService) ([]byte, error)

func SetGlobalParam

func SetGlobalParam(native *native.NativeService) ([]byte, error)

func SetOperator

func SetOperator(native *native.NativeService) ([]byte, error)

func TransferAdmin

func TransferAdmin(native *native.NativeService) ([]byte, error)

Types

type AddressParam added in v1.15.0

type AddressParam struct {
	Contracts []common.Address
}

func (*AddressParam) Deserialization added in v1.15.0

func (this *AddressParam) Deserialization(source *common.ZeroCopySource) error

func (*AddressParam) Serialization added in v1.15.0

func (this *AddressParam) Serialization(sink *common.ZeroCopySink)

type Param

type Param struct {
	Key   string
	Value string
}

type ParamNameList

type ParamNameList []string

func (*ParamNameList) Deserialization added in v1.15.0

func (nameList *ParamNameList) Deserialization(source *common.ZeroCopySource) error

func (*ParamNameList) Serialization added in v1.15.0

func (nameList *ParamNameList) Serialization(sink *common.ZeroCopySink)

type Params

type Params []Param

func (*Params) Deserialization added in v1.15.0

func (params *Params) Deserialization(source *common.ZeroCopySource) error

func (*Params) GetParam

func (params *Params) GetParam(key string) (int, Param)

func (*Params) Serialization added in v1.15.0

func (params *Params) Serialization(sink *common.ZeroCopySink)

func (*Params) SetParam

func (params *Params) SetParam(value Param)

Jump to

Keyboard shortcuts

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