validatorset

package
v1.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultStakedBalance    = "0x84595161401484A000000" // 10_000_000 DC
	DefaultStatusNotEntered = 1                         // ReentrancyGuard status contant
	//nolint:lll
	StakingSCBytecode = "" /* 17366-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func PredeploySC

func PredeploySC(params PredeployParams) (*chain.GenesisAccount, error)

PredeploySC is a helper method for setting up the ValidatorSet smart contract account, using the passed in validators as pre-staked validators

Types

type PredeployParams

type PredeployParams struct {
	Owner      types.Address
	Validators []types.Address
}

PredeployParams contains the values used to predeploy the PoS staking contract

type StorageIndexes

type StorageIndexes struct {
	StatusIndex                  []byte // uint256
	OwnerIndex                   []byte // address
	ThresholdIndex               []byte // uint256
	MinimumIndex                 []byte // uint256
	ValidatorsIndex              []byte // []address
	ValidatorsArraySizeIndex     []byte // []address size
	AddressToIsValidatorIndex    []byte // mapping(address => bool)
	AddressToStakedAmountIndex   []byte // mapping(address => uint256)
	AddressToValidatorIndexIndex []byte // mapping(address => uint256)
	StakedAmountIndex            []byte // uint256
}

StorageIndexes is a wrapper for different storage indexes that need to be modified

Jump to

Keyboard shortcuts

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