Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfidantKey(address types.Address, txId, txHeader, rxHeader []byte) []byte
- func GetConfidantRewords(ctx *vmstore.VMContext, confidant types.Address) (map[string]*big.Int, error)
- func GetConfidantRewordsDetail(ctx *vmstore.VMContext, confidant types.Address) (map[string][]*RewardsInfo, error)
- func GetPledgeBeneficialAmount(ctx *vmstore.VMContext, beneficial types.Address, pType uint8) *big.Int
- func GetPledgeBeneficialTotalAmount(ctx *vmstore.VMContext, beneficial types.Address) (*big.Int, error)
- func GetPledgeKey(addr types.Address, beneficial types.Address, neoTxId string) []byte
- func GetRewardsKey(txId, txHeader, rxHeader []byte) []byte
- func GetTokenById(ctx *vmstore.VMContext, tokenId types.Hash) (*types.TokenInfo, error)
- func GetTokenByName(ctx *vmstore.VMContext, tokenName string) (*types.TokenInfo, error)
- func GetTotalPledgeAmount(ctx *vmstore.VMContext) *big.Int
- func GetTotalRewards(ctx *vmstore.VMContext, txId string) (*big.Int, error)
- func ListTokens(ctx *vmstore.VMContext) ([]*types.TokenInfo, error)
- func NewTokenHash(address types.Address, previous types.Hash, tokenName string) types.Hash
- func ParseGenesisTokenInfo(data []byte) (*types.TokenInfo, error)
- func ParseTokenInfo(data []byte) (*types.TokenInfo, error)
- type NEP5PledgeInfo
- func GetBeneficialInfos(ctx *vmstore.VMContext, addr types.Address) ([]*NEP5PledgeInfo, *big.Int)
- func GetBeneficialPledgeInfos(ctx *vmstore.VMContext, beneficial types.Address, pType PledgeType) ([]*NEP5PledgeInfo, *big.Int)
- func GetPledgeInfos(ctx *vmstore.VMContext, addr types.Address) ([]*NEP5PledgeInfo, *big.Int)
- func ParsePledgeInfo(data []byte) (*NEP5PledgeInfo, error)
- func SearchAllPledgeInfos(ctx *vmstore.VMContext) ([]*NEP5PledgeInfo, error)
- type ParamMintage
- type PledgeParam
- type PledgeResult
- func SearchBeneficialPledgeInfo(ctx *vmstore.VMContext, param *WithdrawPledgeParam) []*PledgeResult
- func SearchBeneficialPledgeInfoByTxId(ctx *vmstore.VMContext, param *WithdrawPledgeParam) *PledgeResult
- func SearchBeneficialPledgeInfoIgnoreWithdrawTime(ctx *vmstore.VMContext, param *WithdrawPledgeParam) []*PledgeResult
- func SearchPledgeInfoWithNEP5TxId(ctx *vmstore.VMContext, param *WithdrawPledgeParam) *PledgeResult
- type PledgeType
- type RewardsInfo
- type RewardsParam
- type VariablePledgeBeneficial
- type WithdrawPledgeParam
Constants ¶
View Source
const ( MethodNameMintage = "Mintage" MethodNameMintageWithdraw = "Withdraw" VariableNameToken = "token" VariableNameGenesisToken = "genesisToken" )
View Source
const ( MethodNEP5Pledge = "NEP5Pledge" MethodWithdrawNEP5Pledge = "WithdrawNEP5Pledge" VariableNEP5PledgeInfo = "nep5PledgeInfo" )
View Source
const ( MethodNameUnsignedAirdropRewards = "UnsignedAirdropRewards" MethodNameAirdropRewards = "AirdropRewards" MethodNameUnsignedConfidantRewards = "UnsignedConfidantRewards" MethodNameConfidantRewards = "ConfidantRewards" VariableNameRewards = "rewardsInfo" )
View Source
const ( Confidant = iota Rewards )
Variables ¶
View Source
var (
MintageABI, _ = abi.JSONToABIContract(strings.NewReader(jsonMintage))
)
View Source
var (
NEP5PledgeABI, _ = abi.JSONToABIContract(strings.NewReader(jsonNEP5Pledge))
)
View Source
var (
RewardsABI, _ = abi.JSONToABIContract(strings.NewReader(jsonRewards))
)
Functions ¶
func GetConfidantKey ¶ added in v1.2.0
func GetConfidantRewords ¶ added in v1.2.0
func GetConfidantRewordsDetail ¶ added in v1.2.0
func GetPledgeBeneficialAmount ¶ added in v1.1.0
func GetPledgeBeneficialTotalAmount ¶ added in v1.1.0
func GetPledgeKey ¶
func GetRewardsKey ¶ added in v1.2.0
func GetTokenById ¶ added in v1.1.0
func GetTokenByName ¶ added in v1.1.0
func GetTotalPledgeAmount ¶ added in v1.2.0
func GetTotalRewards ¶ added in v1.2.0
func ListTokens ¶ added in v1.1.0
func NewTokenHash ¶
func ParseGenesisTokenInfo ¶ added in v1.1.0
Types ¶
type NEP5PledgeInfo ¶ added in v1.1.0
type NEP5PledgeInfo struct { PType uint8 Amount *big.Int WithdrawTime int64 Beneficial types.Address PledgeAddress types.Address NEP5TxId string }
func GetBeneficialInfos ¶ added in v1.1.0
GetPledgeInfos get pledge info list by pledge address
func GetBeneficialPledgeInfos ¶ added in v1.1.0
func GetBeneficialPledgeInfos(ctx *vmstore.VMContext, beneficial types.Address, pType PledgeType) ([]*NEP5PledgeInfo, *big.Int)
GetBeneficialPledgeInfos get pledge info by beneficial address and pledge type
func GetPledgeInfos ¶ added in v1.1.0
GetPledgeInfos get pledge info list by pledge address
func ParsePledgeInfo ¶ added in v1.1.0
func ParsePledgeInfo(data []byte) (*NEP5PledgeInfo, error)
ParsePledgeInfo convert data to NEP5PledgeInfo
func SearchAllPledgeInfos ¶ added in v1.1.0
func SearchAllPledgeInfos(ctx *vmstore.VMContext) ([]*NEP5PledgeInfo, error)
type ParamMintage ¶
type PledgeParam ¶ added in v1.1.0
type PledgeParam struct { Beneficial types.Address PledgeAddress types.Address PType uint8 NEP5TxId string }
func ParsePledgeParam ¶ added in v1.1.0
func ParsePledgeParam(data []byte) (*PledgeParam, error)
ParsePledgeParam convert data to PledgeParam
type PledgeResult ¶ added in v1.1.0
type PledgeResult struct { Key []byte PledgeInfo *NEP5PledgeInfo }
func SearchBeneficialPledgeInfo ¶ added in v1.1.0
func SearchBeneficialPledgeInfo(ctx *vmstore.VMContext, param *WithdrawPledgeParam) []*PledgeResult
func SearchBeneficialPledgeInfoByTxId ¶ added in v1.1.1
func SearchBeneficialPledgeInfoByTxId(ctx *vmstore.VMContext, param *WithdrawPledgeParam) *PledgeResult
func SearchBeneficialPledgeInfoIgnoreWithdrawTime ¶ added in v1.1.0
func SearchBeneficialPledgeInfoIgnoreWithdrawTime(ctx *vmstore.VMContext, param *WithdrawPledgeParam) []*PledgeResult
func SearchPledgeInfoWithNEP5TxId ¶ added in v1.1.2
func SearchPledgeInfoWithNEP5TxId(ctx *vmstore.VMContext, param *WithdrawPledgeParam) *PledgeResult
type PledgeType ¶ added in v1.1.0
type PledgeType uint8
const ( Network PledgeType = iota Vote Storage Oracle )
func (PledgeType) String ¶ added in v1.1.0
func (i PledgeType) String() string
type RewardsInfo ¶ added in v1.2.0
type RewardsInfo struct { Type uint8 `json:"type"` From types.Address `json:"from"` To types.Address `json:"to"` TxHeader types.Hash `json:"txHeader"` RxHeader types.Hash `json:"rxHeader"` Amount *big.Int `json:"amount"` }
func GetRewardsDetail ¶ added in v1.2.0
func GetRewardsDetail(ctx *vmstore.VMContext, txId string) ([]*RewardsInfo, error)
func ParseRewardsInfo ¶ added in v1.2.0
func ParseRewardsInfo(data []byte) (*RewardsInfo, error)
type RewardsParam ¶ added in v1.2.0
type VariablePledgeBeneficial ¶
type VariablePledgeBeneficial struct { Amount *big.Int PType PledgeType }
Click to show internal directories.
Click to hide internal directories.