governanceimpl

package
v1.0.2-legacy-migration Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

This file provides implementation for the governance SC, the ChainNode management functions.

State of the SC (the ChainNodes part):

VarAccessNodeCandidates:  map[pubKey] => AccessNodeInfo    // A set of Access Node Info.
VarAccessNodes:           map[pubKey] => byte[0]           // A set of nodes.
VarValidatorNodes:        pubKey[]                         // An ordered list of nodes.

Index

Constants

View Source
const (
	MaxCustomMetadataLength = iotago.MaxMetadataLength - serializer.OneByte - serializer.UInt32ByteSize - state.L1CommitmentSize - gas.FeePolicyByteSize - serializer.UInt16ByteSize
)

Variables

View Source
var Processor = governance.Contract.Processor(nil,

	governance.FuncAddAllowedStateControllerAddress.WithHandler(addAllowedStateControllerAddress),
	governance.FuncRemoveAllowedStateControllerAddress.WithHandler(removeAllowedStateControllerAddress),
	governance.FuncRotateStateController.WithHandler(rotateStateController),
	governance.ViewGetAllowedStateControllerAddresses.WithHandler(getAllowedStateControllerAddresses),

	governance.FuncClaimChainOwnership.WithHandler(claimChainOwnership),
	governance.FuncDelegateChainOwnership.WithHandler(delegateChainOwnership),
	governance.FuncSetPayoutAgentID.WithHandler(setPayoutAgentID),
	governance.ViewGetPayoutAgentID.WithHandler(getPayoutAgentID),
	governance.FuncSetMinCommonAccountBalance.WithHandler(setMinCommonAccountBalance),
	governance.ViewGetMinCommonAccountBalance.WithHandler(getMinCommonAccountBalance),
	governance.ViewGetChainOwner.WithHandler(getChainOwner),

	governance.FuncSetFeePolicy.WithHandler(setFeePolicy),
	governance.ViewGetFeePolicy.WithHandler(getFeePolicy),
	governance.FuncSetEVMGasRatio.WithHandler(setEVMGasRatio),
	governance.ViewGetEVMGasRatio.WithHandler(getEVMGasRatio),
	governance.FuncSetGasLimits.WithHandler(setGasLimits),
	governance.ViewGetGasLimits.WithHandler(getGasLimits),

	governance.ViewGetChainInfo.WithHandler(getChainInfo),

	governance.FuncAddCandidateNode.WithHandler(addCandidateNode),
	governance.FuncChangeAccessNodes.WithHandler(changeAccessNodes),
	governance.FuncRevokeAccessNode.WithHandler(revokeAccessNode),
	governance.ViewGetChainNodes.WithHandler(getChainNodes),

	governance.FuncStartMaintenance.WithHandler(startMaintenance),
	governance.FuncStopMaintenance.WithHandler(stopMaintenance),
	governance.ViewGetMaintenanceStatus.WithHandler(getMaintenanceStatus),

	governance.FuncSetMetadata.WithHandler(setMetadata),
	governance.ViewGetMetadata.WithHandler(getMetadata),
)

Functions

func SetInitialState added in v1.0.3

func SetInitialState(state kv.KVStore, chainOwner isc.AgentID, blockKeepAmount int32)

Types

This section is empty.

Jump to

Keyboard shortcuts

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