staking

package
v0.0.0-...-3a5d5d8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsValidatorKey        = crypto.Keccak256Hash([]byte(isValidatorKeyStr))
	IsValidator           = crypto.Keccak256Hash([]byte(isValidatorStr))
	CollectRewardsTopic   = crypto.Keccak256Hash([]byte(collectRewardsStr))
	DelegateTopic         = crypto.Keccak256Hash([]byte(delegateStr))
	UnDelegateTopic       = crypto.Keccak256Hash([]byte(unDelegateStr))
	FirstElectionEpochKey = crypto.Keccak256Hash([]byte(firstElectionEpochStr))
)

keys used to retrieve staking related informatio

Functions

func ParseAddressFromKey

func ParseAddressFromKey(args map[string]interface{}, key string) (common.Address, error)

used for both delegatorAddress and validatorAddress

func ParseBigIntFromKey

func ParseBigIntFromKey(args map[string]interface{}, key string) (*big.Int, error)

used for amounts

func ParseStakeMsg

func ParseStakeMsg(contractCaller common.Address, input []byte) (interface{}, error)

contractCaller (and not Contract) is used here to avoid import cycle

func ValidateContractAddress

func ValidateContractAddress(contractCaller common.Address, args map[string]interface{}, key string) (common.Address, error)

used to ensure caller == delegatorAddress

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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