contracts

package
v2.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: GPL-3.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

View Source
const (
	GetRewardTimeLimit int64 = 3600 // Cannot get snapshot block reward of current few blocks, for latest snapshot block could be reverted

	PledgeHeightMax uint64 = 3600 * 24 * 365
)

Variables

View Source
var (
	SbpStakeAmountPreMainnet = new(big.Int).Mul(big.NewInt(5e5), util.AttovPerVite)
	SbpStakeAmountMainnet    = new(big.Int).Mul(big.NewInt(1e6), util.AttovPerVite)
)
View Source
var (
	ContractsParamsTest = ContractsParams{
		RegisterMinPledgeHeight:          1,
		PledgeHeight:                     1,
		CreateConsensusGroupPledgeHeight: 1,
		MintPledgeHeight:                 1,
		DexVipStakeHeight:                1,
		DexSuperVipStakeHeight:           1,
	}
	ContractsParamsMainNet = ContractsParams{
		RegisterMinPledgeHeight:          3600 * 24 * 3,
		PledgeHeight:                     3600 * 24 * 3,
		CreateConsensusGroupPledgeHeight: 3600 * 24 * 3,
		MintPledgeHeight:                 3600 * 24 * 30 * 3,
		DexVipStakeHeight:                3600 * 24 * 30,
		DexSuperVipStakeHeight:           3600 * 24 * 30,
	}
)
View Source
var (
	Agent          = true
	NoAgent        = false
	NoAgentAddress = types.ZERO_ADDRESS
	NoBid          = uint8(0)
)

Functions

func CalcRewardByDay

func CalcRewardByDay(db vm_db.VmDb, reader util.ConsensusReader, timestamp int64) (m map[string]*Reward, index uint64, err error)

func CalcRewardByDayIndex

func CalcRewardByDayIndex(db vm_db.VmDb, reader util.ConsensusReader, index uint64) (m map[string]*Reward, err error)

func CheckMintToken added in v1.3.0

func CheckMintToken(param abi.ParamMintage) error

func InitContractsConfig

func InitContractsConfig(isTestParam bool)

func OnPlaceOrderFailed

func OnPlaceOrderFailed(db vm_db.VmDb, order *dex.Order, marketInfo *dex.MarketInfo) ([]*ledger.AccountBlock, error)

func RewardDrained

func RewardDrained(reward *Reward, drained bool) bool

Types

type BuiltinContractMethod

type BuiltinContractMethod interface {
	GetFee(block *ledger.AccountBlock) (*big.Int, error)
	// calc and use quota, check tx data
	DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error
	// quota for doSend block
	GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)
	// check status, update state
	DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)
	// receive block quota
	GetReceiveQuota(gasTable *util.GasTable) uint64
	// refund data at receive error
	GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)
}

func GetBuiltinContractMethod

func GetBuiltinContractMethod(addr types.Address, methodSelector []byte, sbHeight uint64) (BuiltinContractMethod, bool, error)

type ContractsParams

type ContractsParams struct {
	RegisterMinPledgeHeight          uint64 // Minimum pledge height for register
	PledgeHeight                     uint64 // pledge height for stake
	CreateConsensusGroupPledgeHeight uint64 // Pledge height for registering to be a super node of snapshot group and common delegate group
	MintPledgeHeight                 uint64 // Pledge height for mintage if choose to pledge instead of destroy vite token
	DexVipStakeHeight                uint64 // Pledge height for dex_fund contract, in order to upgrade to dex vip
	DexSuperVipStakeHeight           uint64 // Pledge height for dex_fund contract, in order to upgrade to dex super vip
}

type MethodAgentCancelPledge

type MethodAgentCancelPledge struct {
	MethodName string
}

func (*MethodAgentCancelPledge) DoReceive

func (p *MethodAgentCancelPledge) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodAgentCancelPledge) DoSend

func (*MethodAgentCancelPledge) GetFee

func (p *MethodAgentCancelPledge) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodAgentCancelPledge) GetReceiveQuota

func (p *MethodAgentCancelPledge) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodAgentCancelPledge) GetRefundData

func (p *MethodAgentCancelPledge) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodAgentCancelPledge) GetSendQuota

func (p *MethodAgentCancelPledge) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodAgentPledge

type MethodAgentPledge struct {
	MethodName string
}

func (*MethodAgentPledge) DoReceive

func (p *MethodAgentPledge) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodAgentPledge) DoSend

func (p *MethodAgentPledge) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodAgentPledge) GetFee

func (p *MethodAgentPledge) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodAgentPledge) GetReceiveQuota

func (p *MethodAgentPledge) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodAgentPledge) GetRefundData

func (p *MethodAgentPledge) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodAgentPledge) GetSendQuota

func (p *MethodAgentPledge) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodBurn added in v1.3.0

type MethodBurn struct {
	MethodName string
}

func (*MethodBurn) DoReceive added in v1.3.0

func (p *MethodBurn) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodBurn) DoSend added in v1.3.0

func (p *MethodBurn) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodBurn) GetFee added in v1.3.0

func (p *MethodBurn) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodBurn) GetReceiveQuota

func (p *MethodBurn) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodBurn) GetRefundData added in v1.3.0

func (p *MethodBurn) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodBurn) GetSendQuota

func (p *MethodBurn) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodCancelPledge

type MethodCancelPledge struct {
	MethodName string
}

func (*MethodCancelPledge) DoReceive

func (p *MethodCancelPledge) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodCancelPledge) DoSend

func (p *MethodCancelPledge) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodCancelPledge) GetFee

func (p *MethodCancelPledge) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodCancelPledge) GetReceiveQuota

func (p *MethodCancelPledge) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodCancelPledge) GetRefundData

func (p *MethodCancelPledge) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodCancelPledge) GetSendQuota

func (p *MethodCancelPledge) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodCancelRegister

type MethodCancelRegister struct {
	MethodName string
}

func (*MethodCancelRegister) DoReceive

func (p *MethodCancelRegister) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodCancelRegister) DoSend

func (p *MethodCancelRegister) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

cancel register to become a super node of a consensus group after registered for 3 month, get 100w ViteToken back

func (*MethodCancelRegister) GetFee

func (p *MethodCancelRegister) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodCancelRegister) GetReceiveQuota

func (p *MethodCancelRegister) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodCancelRegister) GetRefundData

func (p *MethodCancelRegister) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodCancelRegister) GetSendQuota

func (p *MethodCancelRegister) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodCancelVote

type MethodCancelVote struct {
	MethodName string
}

func (*MethodCancelVote) DoReceive

func (p *MethodCancelVote) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodCancelVote) DoSend

func (p *MethodCancelVote) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

cancel vote for a super node of a consensus group

func (*MethodCancelVote) GetFee

func (p *MethodCancelVote) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodCancelVote) GetReceiveQuota

func (p *MethodCancelVote) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodCancelVote) GetRefundData

func (p *MethodCancelVote) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodCancelVote) GetSendQuota

func (p *MethodCancelVote) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodChangeTokenType added in v1.3.0

type MethodChangeTokenType struct {
	MethodName string
}

func (*MethodChangeTokenType) DoReceive added in v1.3.0

func (p *MethodChangeTokenType) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodChangeTokenType) DoSend added in v1.3.0

func (p *MethodChangeTokenType) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodChangeTokenType) GetFee added in v1.3.0

func (p *MethodChangeTokenType) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodChangeTokenType) GetReceiveQuota

func (p *MethodChangeTokenType) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodChangeTokenType) GetRefundData added in v1.3.0

func (p *MethodChangeTokenType) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodChangeTokenType) GetSendQuota

func (p *MethodChangeTokenType) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundBindInviteCode

type MethodDexFundBindInviteCode struct {
	MethodName string
}

func (MethodDexFundBindInviteCode) DoReceive

func (md MethodDexFundBindInviteCode) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundBindInviteCode) DoSend

func (*MethodDexFundBindInviteCode) GetFee

func (*MethodDexFundBindInviteCode) GetReceiveQuota

func (md *MethodDexFundBindInviteCode) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundBindInviteCode) GetRefundData

func (md *MethodDexFundBindInviteCode) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundBindInviteCode) GetSendQuota

func (md *MethodDexFundBindInviteCode) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundCancelDelegateStakeCallback

type MethodDexFundCancelDelegateStakeCallback struct {
	MethodName string
}

func (MethodDexFundCancelDelegateStakeCallback) DoReceive

func (md MethodDexFundCancelDelegateStakeCallback) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundCancelDelegateStakeCallback) DoSend

func (*MethodDexFundCancelDelegateStakeCallback) GetFee

func (*MethodDexFundCancelDelegateStakeCallback) GetReceiveQuota

func (md *MethodDexFundCancelDelegateStakeCallback) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundCancelDelegateStakeCallback) GetRefundData

func (md *MethodDexFundCancelDelegateStakeCallback) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundCancelDelegateStakeCallback) GetSendQuota

func (md *MethodDexFundCancelDelegateStakeCallback) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundConfigMarketAgents

type MethodDexFundConfigMarketAgents struct {
	MethodName string
}

func (MethodDexFundConfigMarketAgents) DoReceive

func (md MethodDexFundConfigMarketAgents) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundConfigMarketAgents) DoSend

func (*MethodDexFundConfigMarketAgents) GetFee

func (*MethodDexFundConfigMarketAgents) GetReceiveQuota

func (md *MethodDexFundConfigMarketAgents) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundConfigMarketAgents) GetRefundData

func (md *MethodDexFundConfigMarketAgents) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundConfigMarketAgents) GetSendQuota

func (md *MethodDexFundConfigMarketAgents) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundCreateNewInviter

type MethodDexFundCreateNewInviter struct {
	MethodName string
}

func (MethodDexFundCreateNewInviter) DoReceive

func (md MethodDexFundCreateNewInviter) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundCreateNewInviter) DoSend

func (*MethodDexFundCreateNewInviter) GetFee

func (*MethodDexFundCreateNewInviter) GetReceiveQuota

func (md *MethodDexFundCreateNewInviter) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundCreateNewInviter) GetRefundData

func (md *MethodDexFundCreateNewInviter) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundCreateNewInviter) GetSendQuota

func (md *MethodDexFundCreateNewInviter) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundDelegateStakeCallback

type MethodDexFundDelegateStakeCallback struct {
	MethodName string
}

func (MethodDexFundDelegateStakeCallback) DoReceive

func (md MethodDexFundDelegateStakeCallback) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundDelegateStakeCallback) DoSend

func (*MethodDexFundDelegateStakeCallback) GetFee

func (*MethodDexFundDelegateStakeCallback) GetReceiveQuota

func (md *MethodDexFundDelegateStakeCallback) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundDelegateStakeCallback) GetRefundData

func (md *MethodDexFundDelegateStakeCallback) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundDelegateStakeCallback) GetSendQuota

func (md *MethodDexFundDelegateStakeCallback) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundDeposit

type MethodDexFundDeposit struct {
	MethodName string
}

func (*MethodDexFundDeposit) DoReceive

func (md *MethodDexFundDeposit) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundDeposit) DoSend

func (md *MethodDexFundDeposit) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodDexFundDeposit) GetFee

func (md *MethodDexFundDeposit) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundDeposit) GetReceiveQuota

func (md *MethodDexFundDeposit) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundDeposit) GetRefundData

func (md *MethodDexFundDeposit) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundDeposit) GetSendQuota

func (md *MethodDexFundDeposit) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundDexAdminConfig

type MethodDexFundDexAdminConfig struct {
	MethodName string
}

func (MethodDexFundDexAdminConfig) DoReceive

func (md MethodDexFundDexAdminConfig) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundDexAdminConfig) DoSend

func (*MethodDexFundDexAdminConfig) GetFee

func (*MethodDexFundDexAdminConfig) GetReceiveQuota

func (md *MethodDexFundDexAdminConfig) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundDexAdminConfig) GetRefundData

func (md *MethodDexFundDexAdminConfig) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundDexAdminConfig) GetSendQuota

func (md *MethodDexFundDexAdminConfig) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundEndorseVx

type MethodDexFundEndorseVx struct {
	MethodName string
}

func (MethodDexFundEndorseVx) DoReceive

func (md MethodDexFundEndorseVx) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundEndorseVx) DoSend

func (md *MethodDexFundEndorseVx) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodDexFundEndorseVx) GetFee

func (md *MethodDexFundEndorseVx) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundEndorseVx) GetReceiveQuota

func (md *MethodDexFundEndorseVx) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundEndorseVx) GetRefundData

func (md *MethodDexFundEndorseVx) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundEndorseVx) GetSendQuota

func (md *MethodDexFundEndorseVx) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundGetTokenInfoCallback

type MethodDexFundGetTokenInfoCallback struct {
	MethodName string
}

func (MethodDexFundGetTokenInfoCallback) DoReceive

func (md MethodDexFundGetTokenInfoCallback) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundGetTokenInfoCallback) DoSend

func (*MethodDexFundGetTokenInfoCallback) GetFee

func (*MethodDexFundGetTokenInfoCallback) GetReceiveQuota

func (md *MethodDexFundGetTokenInfoCallback) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundGetTokenInfoCallback) GetRefundData

func (md *MethodDexFundGetTokenInfoCallback) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundGetTokenInfoCallback) GetSendQuota

func (md *MethodDexFundGetTokenInfoCallback) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundMarketAdminConfig

type MethodDexFundMarketAdminConfig struct {
	MethodName string
}

func (MethodDexFundMarketAdminConfig) DoReceive

func (md MethodDexFundMarketAdminConfig) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundMarketAdminConfig) DoSend

func (*MethodDexFundMarketAdminConfig) GetFee

func (*MethodDexFundMarketAdminConfig) GetReceiveQuota

func (md *MethodDexFundMarketAdminConfig) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundMarketAdminConfig) GetRefundData

func (md *MethodDexFundMarketAdminConfig) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundMarketAdminConfig) GetSendQuota

func (md *MethodDexFundMarketAdminConfig) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundNotifyTime

type MethodDexFundNotifyTime struct {
	MethodName string
}

func (MethodDexFundNotifyTime) DoReceive

func (md MethodDexFundNotifyTime) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundNotifyTime) DoSend

func (md *MethodDexFundNotifyTime) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodDexFundNotifyTime) GetFee

func (md *MethodDexFundNotifyTime) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundNotifyTime) GetReceiveQuota

func (md *MethodDexFundNotifyTime) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundNotifyTime) GetRefundData

func (md *MethodDexFundNotifyTime) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundNotifyTime) GetSendQuota

func (md *MethodDexFundNotifyTime) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundOpenNewMarket

type MethodDexFundOpenNewMarket struct {
	MethodName string
}

func (MethodDexFundOpenNewMarket) DoReceive

func (md MethodDexFundOpenNewMarket) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundOpenNewMarket) DoSend

func (*MethodDexFundOpenNewMarket) GetFee

func (md *MethodDexFundOpenNewMarket) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundOpenNewMarket) GetReceiveQuota

func (md *MethodDexFundOpenNewMarket) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundOpenNewMarket) GetRefundData

func (md *MethodDexFundOpenNewMarket) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundOpenNewMarket) GetSendQuota

func (md *MethodDexFundOpenNewMarket) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundPlaceAgentOrder

type MethodDexFundPlaceAgentOrder struct {
	MethodName string
}

func (MethodDexFundPlaceAgentOrder) DoReceive

func (md MethodDexFundPlaceAgentOrder) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundPlaceAgentOrder) DoSend

func (*MethodDexFundPlaceAgentOrder) GetFee

func (*MethodDexFundPlaceAgentOrder) GetReceiveQuota

func (md *MethodDexFundPlaceAgentOrder) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundPlaceAgentOrder) GetRefundData

func (md *MethodDexFundPlaceAgentOrder) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundPlaceAgentOrder) GetSendQuota

func (md *MethodDexFundPlaceAgentOrder) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundPlaceOrder

type MethodDexFundPlaceOrder struct {
	MethodName string
}

func (*MethodDexFundPlaceOrder) DoReceive

func (md *MethodDexFundPlaceOrder) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundPlaceOrder) DoSend

func (md *MethodDexFundPlaceOrder) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) (err error)

func (*MethodDexFundPlaceOrder) GetFee

func (md *MethodDexFundPlaceOrder) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundPlaceOrder) GetReceiveQuota

func (md *MethodDexFundPlaceOrder) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundPlaceOrder) GetRefundData

func (md *MethodDexFundPlaceOrder) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundPlaceOrder) GetSendQuota

func (md *MethodDexFundPlaceOrder) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundSettleMakerMinedVx

type MethodDexFundSettleMakerMinedVx struct {
	MethodName string
}

func (MethodDexFundSettleMakerMinedVx) DoReceive

func (md MethodDexFundSettleMakerMinedVx) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundSettleMakerMinedVx) DoSend

func (*MethodDexFundSettleMakerMinedVx) GetFee

func (*MethodDexFundSettleMakerMinedVx) GetReceiveQuota

func (md *MethodDexFundSettleMakerMinedVx) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundSettleMakerMinedVx) GetRefundData

func (md *MethodDexFundSettleMakerMinedVx) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundSettleMakerMinedVx) GetSendQuota

func (md *MethodDexFundSettleMakerMinedVx) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundSettleOrders

type MethodDexFundSettleOrders struct {
	MethodName string
}

func (MethodDexFundSettleOrders) DoReceive

func (md MethodDexFundSettleOrders) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundSettleOrders) DoSend

func (*MethodDexFundSettleOrders) GetFee

func (md *MethodDexFundSettleOrders) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundSettleOrders) GetReceiveQuota

func (md *MethodDexFundSettleOrders) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundSettleOrders) GetRefundData

func (md *MethodDexFundSettleOrders) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundSettleOrders) GetSendQuota

func (md *MethodDexFundSettleOrders) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundStakeForMining

type MethodDexFundStakeForMining struct {
	MethodName string
}

func (MethodDexFundStakeForMining) DoReceive

func (md MethodDexFundStakeForMining) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundStakeForMining) DoSend

func (*MethodDexFundStakeForMining) GetFee

func (*MethodDexFundStakeForMining) GetReceiveQuota

func (md *MethodDexFundStakeForMining) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundStakeForMining) GetRefundData

func (md *MethodDexFundStakeForMining) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundStakeForMining) GetSendQuota

func (md *MethodDexFundStakeForMining) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundStakeForSVIP

type MethodDexFundStakeForSVIP struct {
	MethodName string
}

func (MethodDexFundStakeForSVIP) DoReceive

func (md MethodDexFundStakeForSVIP) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundStakeForSVIP) DoSend

func (*MethodDexFundStakeForSVIP) GetFee

func (md *MethodDexFundStakeForSVIP) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundStakeForSVIP) GetReceiveQuota

func (md *MethodDexFundStakeForSVIP) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundStakeForSVIP) GetRefundData

func (md *MethodDexFundStakeForSVIP) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundStakeForSVIP) GetSendQuota

func (md *MethodDexFundStakeForSVIP) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundStakeForVIP

type MethodDexFundStakeForVIP struct {
	MethodName string
}

func (MethodDexFundStakeForVIP) DoReceive

func (md MethodDexFundStakeForVIP) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundStakeForVIP) DoSend

func (*MethodDexFundStakeForVIP) GetFee

func (md *MethodDexFundStakeForVIP) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundStakeForVIP) GetReceiveQuota

func (md *MethodDexFundStakeForVIP) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundStakeForVIP) GetRefundData

func (md *MethodDexFundStakeForVIP) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundStakeForVIP) GetSendQuota

func (md *MethodDexFundStakeForVIP) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundTradeAdminConfig

type MethodDexFundTradeAdminConfig struct {
	MethodName string
}

func (MethodDexFundTradeAdminConfig) DoReceive

func (md MethodDexFundTradeAdminConfig) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundTradeAdminConfig) DoSend

func (*MethodDexFundTradeAdminConfig) GetFee

func (*MethodDexFundTradeAdminConfig) GetReceiveQuota

func (md *MethodDexFundTradeAdminConfig) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundTradeAdminConfig) GetRefundData

func (md *MethodDexFundTradeAdminConfig) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundTradeAdminConfig) GetSendQuota

func (md *MethodDexFundTradeAdminConfig) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundTransferTokenOwnership

type MethodDexFundTransferTokenOwnership struct {
	MethodName string
}

func (MethodDexFundTransferTokenOwnership) DoReceive

func (md MethodDexFundTransferTokenOwnership) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundTransferTokenOwnership) DoSend

func (*MethodDexFundTransferTokenOwnership) GetFee

func (*MethodDexFundTransferTokenOwnership) GetReceiveQuota

func (md *MethodDexFundTransferTokenOwnership) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundTransferTokenOwnership) GetRefundData

func (md *MethodDexFundTransferTokenOwnership) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundTransferTokenOwnership) GetSendQuota

func (md *MethodDexFundTransferTokenOwnership) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundTriggerPeriodJob

type MethodDexFundTriggerPeriodJob struct {
	MethodName string
}

func (MethodDexFundTriggerPeriodJob) DoReceive

func (md MethodDexFundTriggerPeriodJob) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundTriggerPeriodJob) DoSend

func (*MethodDexFundTriggerPeriodJob) GetFee

func (*MethodDexFundTriggerPeriodJob) GetReceiveQuota

func (md *MethodDexFundTriggerPeriodJob) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundTriggerPeriodJob) GetRefundData

func (md *MethodDexFundTriggerPeriodJob) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundTriggerPeriodJob) GetSendQuota

func (md *MethodDexFundTriggerPeriodJob) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexFundWithdraw

type MethodDexFundWithdraw struct {
	MethodName string
}

func (*MethodDexFundWithdraw) DoReceive

func (md *MethodDexFundWithdraw) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexFundWithdraw) DoSend

func (md *MethodDexFundWithdraw) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodDexFundWithdraw) GetFee

func (md *MethodDexFundWithdraw) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexFundWithdraw) GetReceiveQuota

func (md *MethodDexFundWithdraw) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexFundWithdraw) GetRefundData

func (md *MethodDexFundWithdraw) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexFundWithdraw) GetSendQuota

func (md *MethodDexFundWithdraw) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexTradeCancelOrder

type MethodDexTradeCancelOrder struct {
	MethodName string
}

func (MethodDexTradeCancelOrder) DoReceive

func (md MethodDexTradeCancelOrder) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexTradeCancelOrder) DoSend

func (md *MethodDexTradeCancelOrder) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) (err error)

func (*MethodDexTradeCancelOrder) GetFee

func (md *MethodDexTradeCancelOrder) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexTradeCancelOrder) GetReceiveQuota

func (md *MethodDexTradeCancelOrder) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexTradeCancelOrder) GetRefundData

func (md *MethodDexTradeCancelOrder) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexTradeCancelOrder) GetSendQuota

func (md *MethodDexTradeCancelOrder) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexTradeCancelOrderByTransactionHash

type MethodDexTradeCancelOrderByTransactionHash struct {
	MethodName string
}

func (MethodDexTradeCancelOrderByTransactionHash) DoReceive

func (md MethodDexTradeCancelOrderByTransactionHash) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexTradeCancelOrderByTransactionHash) DoSend

func (*MethodDexTradeCancelOrderByTransactionHash) GetFee

func (*MethodDexTradeCancelOrderByTransactionHash) GetReceiveQuota

func (md *MethodDexTradeCancelOrderByTransactionHash) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexTradeCancelOrderByTransactionHash) GetRefundData

func (md *MethodDexTradeCancelOrderByTransactionHash) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexTradeCancelOrderByTransactionHash) GetSendQuota

func (md *MethodDexTradeCancelOrderByTransactionHash) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexTradeClearExpiredOrders

type MethodDexTradeClearExpiredOrders struct {
	MethodName string
}

func (MethodDexTradeClearExpiredOrders) DoReceive

func (md MethodDexTradeClearExpiredOrders) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexTradeClearExpiredOrders) DoSend

func (md *MethodDexTradeClearExpiredOrders) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) (err error)

func (*MethodDexTradeClearExpiredOrders) GetFee

func (*MethodDexTradeClearExpiredOrders) GetReceiveQuota

func (md *MethodDexTradeClearExpiredOrders) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexTradeClearExpiredOrders) GetRefundData

func (md *MethodDexTradeClearExpiredOrders) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexTradeClearExpiredOrders) GetSendQuota

func (md *MethodDexTradeClearExpiredOrders) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexTradePlaceOrder

type MethodDexTradePlaceOrder struct {
	MethodName string
}

func (*MethodDexTradePlaceOrder) DoReceive

func (md *MethodDexTradePlaceOrder) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexTradePlaceOrder) DoSend

func (md *MethodDexTradePlaceOrder) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) (err error)

func (*MethodDexTradePlaceOrder) GetFee

func (md *MethodDexTradePlaceOrder) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodDexTradePlaceOrder) GetReceiveQuota

func (md *MethodDexTradePlaceOrder) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexTradePlaceOrder) GetRefundData

func (md *MethodDexTradePlaceOrder) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexTradePlaceOrder) GetSendQuota

func (md *MethodDexTradePlaceOrder) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodDexTradeSyncNewMarket

type MethodDexTradeSyncNewMarket struct {
	MethodName string
}

func (MethodDexTradeSyncNewMarket) DoReceive

func (md MethodDexTradeSyncNewMarket) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodDexTradeSyncNewMarket) DoSend

func (md *MethodDexTradeSyncNewMarket) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) (err error)

func (*MethodDexTradeSyncNewMarket) GetFee

func (*MethodDexTradeSyncNewMarket) GetReceiveQuota

func (md *MethodDexTradeSyncNewMarket) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodDexTradeSyncNewMarket) GetRefundData

func (md *MethodDexTradeSyncNewMarket) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodDexTradeSyncNewMarket) GetSendQuota

func (md *MethodDexTradeSyncNewMarket) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodGetTokenInfo

type MethodGetTokenInfo struct {
	MethodName string
}

func (*MethodGetTokenInfo) DoReceive

func (p *MethodGetTokenInfo) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodGetTokenInfo) DoSend

func (p *MethodGetTokenInfo) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodGetTokenInfo) GetFee

func (p *MethodGetTokenInfo) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodGetTokenInfo) GetReceiveQuota

func (p *MethodGetTokenInfo) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodGetTokenInfo) GetRefundData

func (p *MethodGetTokenInfo) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodGetTokenInfo) GetSendQuota

func (p *MethodGetTokenInfo) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodIssue added in v1.3.0

type MethodIssue struct {
	MethodName string
}

func (*MethodIssue) DoReceive added in v1.3.0

func (p *MethodIssue) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodIssue) DoSend added in v1.3.0

func (p *MethodIssue) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodIssue) GetFee added in v1.3.0

func (p *MethodIssue) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodIssue) GetReceiveQuota

func (p *MethodIssue) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodIssue) GetRefundData added in v1.3.0

func (p *MethodIssue) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodIssue) GetSendQuota

func (p *MethodIssue) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodMint added in v1.3.0

type MethodMint struct {
	MethodName string
}

func (*MethodMint) DoReceive added in v1.3.0

func (p *MethodMint) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodMint) DoSend added in v1.3.0

func (p *MethodMint) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodMint) GetFee added in v1.3.0

func (p *MethodMint) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodMint) GetReceiveQuota

func (p *MethodMint) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodMint) GetRefundData added in v1.3.0

func (p *MethodMint) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodMint) GetSendQuota

func (p *MethodMint) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodPledge

type MethodPledge struct {
	MethodName string
}

func (*MethodPledge) DoReceive

func (p *MethodPledge) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodPledge) DoSend

func (p *MethodPledge) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodPledge) GetFee

func (p *MethodPledge) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodPledge) GetReceiveQuota

func (p *MethodPledge) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodPledge) GetRefundData

func (p *MethodPledge) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodPledge) GetSendQuota

func (p *MethodPledge) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodRegister

type MethodRegister struct {
	MethodName string
}

func (*MethodRegister) DoReceive

func (p *MethodRegister) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodRegister) DoSend

func (p *MethodRegister) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

register to become a super node of a consensus group, lock 1 million ViteToken for 3 month

func (*MethodRegister) GetFee

func (p *MethodRegister) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodRegister) GetReceiveQuota

func (p *MethodRegister) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodRegister) GetRefundData

func (p *MethodRegister) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodRegister) GetSendQuota

func (p *MethodRegister) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodReward

type MethodReward struct {
	MethodName string
}

func (*MethodReward) DoReceive

func (p *MethodReward) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodReward) DoSend

func (p *MethodReward) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

get reward of generating snapshot block

func (*MethodReward) GetFee

func (p *MethodReward) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodReward) GetReceiveQuota

func (p *MethodReward) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodReward) GetRefundData

func (p *MethodReward) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodReward) GetSendQuota

func (p *MethodReward) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodTransferOwner added in v1.3.0

type MethodTransferOwner struct {
	MethodName string
}

func (*MethodTransferOwner) DoReceive added in v1.3.0

func (p *MethodTransferOwner) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodTransferOwner) DoSend added in v1.3.0

func (p *MethodTransferOwner) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

func (*MethodTransferOwner) GetFee added in v1.3.0

func (p *MethodTransferOwner) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodTransferOwner) GetReceiveQuota

func (p *MethodTransferOwner) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodTransferOwner) GetRefundData added in v1.3.0

func (p *MethodTransferOwner) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodTransferOwner) GetSendQuota

func (p *MethodTransferOwner) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodUpdateRegistration

type MethodUpdateRegistration struct {
	MethodName string
}

func (*MethodUpdateRegistration) DoReceive

func (p *MethodUpdateRegistration) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodUpdateRegistration) DoSend

update registration info

func (*MethodUpdateRegistration) GetFee

func (p *MethodUpdateRegistration) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodUpdateRegistration) GetReceiveQuota

func (p *MethodUpdateRegistration) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodUpdateRegistration) GetRefundData

func (p *MethodUpdateRegistration) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodUpdateRegistration) GetSendQuota

func (p *MethodUpdateRegistration) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type MethodVote

type MethodVote struct {
	MethodName string
}

func (*MethodVote) DoReceive

func (p *MethodVote) DoReceive(db vm_db.VmDb, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock, vm vmEnvironment) ([]*ledger.AccountBlock, error)

func (*MethodVote) DoSend

func (p *MethodVote) DoSend(db vm_db.VmDb, block *ledger.AccountBlock) error

vote for a super node of a consensus group

func (*MethodVote) GetFee

func (p *MethodVote) GetFee(block *ledger.AccountBlock) (*big.Int, error)

func (*MethodVote) GetReceiveQuota

func (p *MethodVote) GetReceiveQuota(gasTable *util.GasTable) uint64

func (*MethodVote) GetRefundData

func (p *MethodVote) GetRefundData(sendBlock *ledger.AccountBlock, sbHeight uint64) ([]byte, bool)

func (*MethodVote) GetSendQuota

func (p *MethodVote) GetSendQuota(data []byte, gasTable *util.GasTable) (uint64, error)

type NodeConfig

type NodeConfig struct {
	// contains filtered or unexported fields
}

type Reward

type Reward struct {
	VoteReward       *big.Int
	BlockReward      *big.Int
	TotalReward      *big.Int
	BlockNum         uint64
	ExpectedBlockNum uint64
}

func CalcReward

func CalcReward(reader util.ConsensusReader, db vm_db.VmDb, old *types.Registration, current *ledger.SnapshotBlock) (startTime int64, endTime int64, reward *Reward, drained bool, err error)

func (*Reward) Add

func (r *Reward) Add(a *Reward)

Directories

Path Synopsis
dex

Jump to

Keyboard shortcuts

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