Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // staking contract address AddrStakingContract = types.StringToAddress("1001") ErrMethodNotFoundInABI = errors.New("method not found in ABI") ErrFailedTypeAssertion = errors.New("failed type assertion") )
Functions ¶
func DecodeValidators ¶
DecodeValidators parses contract call result and returns array of address
func QueryBLSPublicKeys ¶ added in v0.6.0
func QueryBLSPublicKeys(t TxQueryHandler, from types.Address) ([][]byte, error)
QueryBLSPublicKeys is a helper function to get BLS Public Keys from contract
func QueryValidators ¶
QueryValidators is a helper function to get validator addresses from contract
Types ¶
type TxQueryHandler ¶
type TxQueryHandler interface { Apply(*types.Transaction) (*runtime.ExecutionResult, error) GetNonce(types.Address) uint64 }
TxQueryHandler is a interface to call view method in the contract
Click to show internal directories.
Click to hide internal directories.