validatorset

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: GPL-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

func IsDepositTransactionSignture(in []byte) bool

func IsSlashTransactionSignture

func IsSlashTransactionSignture(in []byte) bool

func MakeDepositTx

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

func MakeSlashTx

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

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