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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Gas limit used when querying the validator set
	SystemTransactionGasLimit uint64 = 1_000_000
)

Variables

This section is empty.

Functions

func DecodeValidators

func DecodeValidators(method *abi.Method, returnValue []byte) ([]types.Address, error)

func IsDepositTransactionSignture added in v1.2.0

func IsDepositTransactionSignture(in []byte) bool

func IsSlashTransactionSignture added in v1.2.0

func IsSlashTransactionSignture(in []byte) bool

func MakeDepositTx added in v1.2.0

func MakeDepositTx(t NonceHub, from types.Address) (*types.Transaction, error)

func MakeSlashTx added in v1.2.0

func MakeSlashTx(t NonceHub, from types.Address, needPunished types.Address) (*types.Transaction, error)

func QueryValidators

func QueryValidators(t TxQueryHandler, from types.Address, gasLimit uint64) ([]types.Address, error)

Types

type NonceHub added in v1.2.0

type NonceHub interface {
	GetNonce(types.Address) uint64
}

type TxQueryHandler

type TxQueryHandler interface {
	NonceHub
	Apply(*types.Transaction) (*runtime.ExecutionResult, error)
}

Jump to

Keyboard shortcuts

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