Documentation ¶
Index ¶
- Constants
- func GetDistributedKey() string
- func GetGovernTokenBucket() string
- func GetProposalBucket() string
- func GetProposalIDKey() []byte
- func GetTaskIDKey() []byte
- func GetTimerBucket() string
- func GetUpdateGasPriceMethod() string
- func GetUpdateMaxBlockSizeMethod() string
- func MakeAccountBalanceKey(account string) string
- func MakeProposalKey(proposalID string) string
- func MakeProposalLockKey(proposalID string, account string) string
- func MakeProposalLockPrefix(proposalID string) string
- func MakeProposalLockPrefixSeparator(proposalID string) string
- func MakeTimerBlockHeightPrefix(blockHeight string) string
- func MakeTimerBlockHeightPrefixSeparator(blockHeight string) string
- func MakeTimerBlockHeightTaskKey(blockHeight string, taskID string) string
- func MakeTotalSupplyKey() string
- func PrefixRange(prefix []byte) []byte
- func UnParse(proposal *Proposal) ([]byte, error)
- type GovernTokenBalance
- type Proposal
- type TriggerDesc
Constants ¶
const ( GovernTokenTypeOrdinary = "ordinary" GovernTokenTypeTDPOS = "tdpos" ProposalStatusVoting = "voting" ProposalStatusCancelled = "cancelled" ProposalStatusRejected = "rejected" ProposalStatusPassed = "passed" ProposalStatusCompletedAndFailure = "completed_failure" ProposalStatusCompletedAndSuccess = "completed_success" )
const ( GovernTokenKernelContract = "$govern_token" ProposalKernelContract = "$proposal" TimerTaskKernelContract = "$timer_task" TDPOSKernelContract = "$tdpos" XPOSKernelContract = "$xpos" ChainConfigKernelContract = "$chainConfig" )
const ( StatusOK = 200 StatusException = 500 )
Variables ¶
This section is empty.
Functions ¶
func GetDistributedKey ¶
func GetDistributedKey() string
GetDistributedKey get contract distributed key
func GetGovernTokenBucket ¶
func GetGovernTokenBucket() string
GetGovernTokenBucket return the govern token bucket name
func GetProposalBucket ¶
func GetProposalBucket() string
GetProposalBucket return the proposal bucket name
func GetProposalIDKey ¶
func GetProposalIDKey() []byte
GetProposalIDKey return the proposal_id key name
func GetUpdateGasPriceMethod ¶
func GetUpdateGasPriceMethod() string
func GetUpdateMaxBlockSizeMethod ¶
func GetUpdateMaxBlockSizeMethod() string
func MakeAccountBalanceKey ¶
MakeContractMethodKey generate contract and account mapping key
func MakeProposalKey ¶
MakeProposalKey generate proposal key
func MakeProposalLockKey ¶
MakeProposalLockKey generate proposal lock key
func MakeProposalLockPrefix ¶
MakeTimerBlockHeightPrefix generate timer and blockHeight prefix
func MakeProposalLockPrefixSeparator ¶
MakeTimerBlockHeightPrefix generate timer and blockHeight prefix
func MakeTimerBlockHeightPrefix ¶
MakeTimerBlockHeightPrefix generate timer and blockHeight prefix
func MakeTimerBlockHeightPrefixSeparator ¶
MakeTimerBlockHeightPrefix generate timer and blockHeight prefix
func MakeTimerBlockHeightTaskKey ¶
MakeTimerBlockHeightKey generate timer and blockHeight mapping key
func MakeTotalSupplyKey ¶
func MakeTotalSupplyKey() string
MakeTotalSupplyKey generate totalsupply key
func PrefixRange ¶
PrefixRange returns key range that satisfy the given prefix
Types ¶
type GovernTokenBalance ¶
type GovernTokenBalance struct { TotalBalance *big.Int `json:"total_balance"` LockedBalance map[string]*big.Int `json:"locked_balances"` }
Govern Token Balance TotalBalance = AvailableBalance + LockedBalance 目前包括tdpos和oridinary两种场景 用户的可转账余额是min(AvailableBalances)
func NewGovernTokenBalance ¶
func NewGovernTokenBalance() *GovernTokenBalance