Documentation ¶
Index ¶
- Constants
- Variables
- func AccumulateAmountFromMap(amountMap map[int32]*big.Int) *big.Int
- func AddBigInt(a []byte, b []byte) []byte
- func AddBurnViteEvent(db vm_db.VmDb, bizType int, amount *big.Int)
- func AddCancelStake(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...)
- func AddErrEvent(db vm_db.VmDb, err error)
- func AddFeeDividendEvent(db vm_db.VmDb, address types.Address, feeToken types.TokenTypeId, ...)
- func AddGrantMarketToAgentEvent(db vm_db.VmDb, principal, agent types.Address, marketId int32)
- func AddInviteRelationEvent(db vm_db.VmDb, inviter, invitee types.Address, inviteCode uint32)
- func AddMarketEvent(db vm_db.VmDb, marketInfo *MarketInfo)
- func AddMinedVxForInviteeFeeEvent(db vm_db.VmDb, address types.Address, quoteTokenType int32, feeAmount []byte, ...)
- func AddMinedVxForOperationEvent(db vm_db.VmDb, bizType int32, address types.Address, amount *big.Int)
- func AddMinedVxForStakingEvent(db vm_db.VmDb, address types.Address, stakedAmt, minedAmt *big.Int)
- func AddMinedVxForTradeFeeEvent(db vm_db.VmDb, address types.Address, quoteTokenType int32, feeAmount []byte, ...)
- func AddOperatorFeeDividendEvent(db vm_db.VmDb, address types.Address, ...)
- func AddPeriodWithBizEvent(db vm_db.VmDb, periodId uint64, bizType uint8)
- func AddRevokeMarketFromAgentEvent(db vm_db.VmDb, principal, agent types.Address, marketId int32)
- func AddSettleMakerMinedVxEvent(db vm_db.VmDb, periodId uint64, page int32, finish bool)
- func AddToPendingNewMarkets(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId) error
- func AddToPendingSetQuotes(db vm_db.VmDb, token types.TokenTypeId, quoteType uint8)
- func AddToPendingTransferTokenOwners(db vm_db.VmDb, token types.TokenTypeId, origin, new types.Address)
- func AddTokenEvent(db vm_db.VmDb, tokenInfo *TokenInfo)
- func AddVxUnlock(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...)
- func AdjustAmountForDecimalsDiff(amount []byte, decimalsDiff int32) *big.Int
- func AdjustForDecimalsDiff(sourceAmountF *big.Float, decimalsDiff int32) *big.Float
- func BatchUpdateFund(db vm_db.VmDb, address types.Address, accounts map[types.TokenTypeId]*big.Int) error
- func BitwiseNotBytes(bytes []byte)
- func BurnExtraVx(db vm_db.VmDb) ([]*ledger.AccountBlock, error)
- func BytesToPrice(priceBytes []byte) string
- func BytesToUint32(bytes []byte) uint32
- func BytesToUint64(bytes []byte) uint64
- func CalculateAmountForRate(amount []byte, rate int32) []byte
- func CalculateFeeAndExecutedFee(order *Order, amount []byte, feeRate, operatorFeeRate int32, isDexFeeFork bool) (incBaseFee, executedBaseFee, incOperatorFee, executedOperatorFee []byte)
- func CalculateRawAmount(quantity []byte, price []byte, decimalsDiff int32) []byte
- func CalculateRawAmountF(quantity []byte, price []byte, decimalsDiff int32) *big.Float
- func CardinalRateToString(rawRate int32) string
- func CheckAndLockFundForNewOrder(dexFund *Fund, order *Order, marketInfo *MarketInfo) (err error)
- func CheckCancelAgentOrder(db vm_db.VmDb, sender types.Address, param *ParamCancelOrderByHash) (owner types.Address, err error)
- func CheckMarketParam(marketParam *ParamOpenNewMarket) (err error)
- func CheckMiningStakingsCanBeDelete(miningStakings *MiningStakings) bool
- func CheckSettleActions(actions *dexproto.SettleActions) error
- func CheckUserVxFundsCanBeDelete(vxFunds *VxFunds) bool
- func CmpForBigInt(a []byte, b []byte) int
- func CmpToBigZero(a []byte) int
- func ComposeOrderId(db vm_db.VmDb, marketId int32, side bool, price string) (idBytes []byte)
- func ConfirmDelegateStakeInfo(db vm_db.VmDb, hash types.Hash, info *DelegateStakeInfo, serialNo uint64)
- func DeComposeOrderId(idBytes []byte) (marketId int32, side bool, price []byte, timestamp int64, err error)
- func DeleteDelegateStakeAddressIndex(db vm_db.VmDb, address []byte, serialNo uint64)
- func DeleteDelegateStakeInfo(db vm_db.VmDb, hash []byte)
- func DeleteHashMapOrderId(db vm_db.VmDb, sendHash []byte)
- func DeleteLastSettledMakerMinedVxPage(db vm_db.VmDb)
- func DeleteMakerMiningPoolByPeriodId(db vm_db.VmDb, periodId uint64)
- func DeleteMarketInfo(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId)
- func DeleteMiningStakedAmount(db vm_db.VmDb, address types.Address)
- func DeleteMiningStakedV2Amount(db vm_db.VmDb, address types.Address)
- func DeleteMiningStakings(db vm_db.VmDb, address types.Address)
- func DeleteOperatorFeesByKey(db vm_db.VmDb, key []byte)
- func DeletePendingNewMarkets(db vm_db.VmDb)
- func DeletePendingSetQuotes(db vm_db.VmDb)
- func DeletePendingTransferTokenOwners(db vm_db.VmDb)
- func DeleteSuperVIPStaking(db vm_db.VmDb, address types.Address)
- func DeleteUserFees(db vm_db.VmDb, address []byte)
- func DeleteVIPStaking(db vm_db.VmDb, address types.Address)
- func DeleteVxFunds(db vm_db.VmDb, address []byte)
- func DeleteVxFundsWithForkCheck(db vm_db.VmDb, address []byte)
- func DeleteVxLockedFunds(db vm_db.VmDb, address []byte)
- func DepositAccount(db vm_db.VmDb, address types.Address, token types.TokenTypeId, amount *big.Int) (updatedAcc *dexproto.Account)
- func DivideByProportion(totalReferAmt, partReferAmt, dividedReferAmt, toDivideTotalAmt, ... *big.Int) (proportionAmt *big.Int, finished bool)
- func DoCancelOrder(sendHash types.Hash, owner types.Address) ([]*ledger.AccountBlock, error)
- func DoCancelStakeV1(db vm_db.VmDb, address types.Address, stakeType uint8, amount *big.Int) ([]*ledger.AccountBlock, error)
- func DoCancelStakeV2(db vm_db.VmDb, address types.Address, id types.Hash) ([]*ledger.AccountBlock, error)
- func DoFeesDividend(db vm_db.VmDb, periodId uint64) (blocks []*ledger.AccountBlock, err error)
- func DoFinishCancelMiningStake(db vm_db.VmDb, periodId uint64) error
- func DoFinishVxUnlock(db vm_db.VmDb, periodId uint64) error
- func DoMineVxForFee(db vm_db.VmDb, reader util.ConsensusReader, periodId uint64, ...) (*big.Int, error)
- func DoMineVxForMaintainer(db vm_db.VmDb, reader util.ConsensusReader, amount *big.Int) (err error)
- func DoMineVxForMaker(db vm_db.VmDb, periodId uint64, amount *big.Int)
- func DoMineVxForMakerMineAndMaintainer(db vm_db.VmDb, periodId uint64, reader util.ConsensusReader, ...) (err error)
- func DoMineVxForStaking(db vm_db.VmDb, reader util.ConsensusReader, periodId uint64, ...) (*big.Int, error)
- func DoOperatorFeesDividend(db vm_db.VmDb, periodId uint64) error
- func DoPlaceOrder(db vm_db.VmDb, param *ParamPlaceOrder, accountAddress, agent *types.Address, ...) ([]*ledger.AccountBlock, error)
- func DoRawCancelStakeV2(id types.Hash) ([]*ledger.AccountBlock, error)
- func DoSettleFund(db vm_db.VmDb, reader util.ConsensusReader, action *dexproto.FundSettle, ...) error
- func DoSettleVxFunds(db vm_db.VmDb, reader util.ConsensusReader, addressBytes []byte, ...) error
- func FilterPendingNewMarkets(db vm_db.VmDb, tradeToken types.TokenTypeId) (quoteTokens [][]byte, err error)
- func FilterPendingSetQuotes(db vm_db.VmDb, token types.TokenTypeId) (action *dexproto.SetQuoteTokenAction, err error)
- func FilterPendingTransferTokenOwners(db vm_db.VmDb, token types.TokenTypeId) (action *dexproto.TransferTokenOwnerAction, err error)
- func FinishCancelStake(db vm_db.VmDb, address types.Address, amount *big.Int) (updatedAcc *dexproto.Account, err error)
- func FinishVxUnlockForDividend(db vm_db.VmDb, address types.Address, amount *big.Int) (*dexproto.Account, error)
- func GetAbs(v int32) (int32, int32)
- func GetAccountByToken(fund *Fund, token types.TokenTypeId) (account *dexproto.Account, exists bool)
- func GetCancelStakesKey(address types.Address) []byte
- func GetCodeByInviter(db vm_db.VmDb, address types.Address) uint32
- func GetCurrentOperatorFeesKey(db vm_db.VmDb, reader util.ConsensusReader, operator []byte) []byte
- func GetCurrentPeriodId(db vm_db.VmDb, reader util.ConsensusReader) uint64
- func GetDelegateStakeAddressIndexKey(address []byte, serialNo uint64) []byte
- func GetDelegateStakeIndexSerialNoKey(address []byte) []byte
- func GetDelegateStakeInfoKey(hash []byte) []byte
- func GetDexFeesKeyByPeriodId(periodId uint64) []byte
- func GetDexFeesLastPeriodIdForRoll(db vm_db.VmDb) uint64
- func GetDexTimestamp(db vm_db.VmDb) int64
- func GetFirstMinedVxPeriodId(db vm_db.VmDb) uint64
- func GetFundKey(address types.Address) []byte
- func GetGrantedMarketToAgentKey(principal types.Address, marketId int32) []byte
- func GetHashMapOrderIdKey(sendHash []byte) []byte
- func GetInviterByCode(db vm_db.VmDb, inviteCode uint32) (*types.Address, error)
- func GetInviterByInvitee(db vm_db.VmDb, invitee types.Address) (*types.Address, error)
- func GetLastJobPeriodIdByBizType(db vm_db.VmDb, bizType uint8) uint64
- func GetLastJobPeriodIdKey(bizType uint8) []byte
- func GetLastSettledMakerMinedVxPage(db vm_db.VmDb) int32
- func GetLastSettledMakerMinedVxPeriod(db vm_db.VmDb) uint64
- func GetMaintainer(db vm_db.VmDb) *types.Address
- func GetMakerMiningAdmin(db vm_db.VmDb) *types.Address
- func GetMakerMiningPoolByPeriodId(db vm_db.VmDb, periodId uint64) *big.Int
- func GetMarkerMiningPoolByPeriodIdKey(periodId uint64) []byte
- func GetMarketInfoKey(tradeToken, quoteToken types.TokenTypeId) []byte
- func GetMarketInfoKeyById(marketId int32) []byte
- func GetMineThreshold(db vm_db.VmDb, quoteTokenType int32) *big.Int
- func GetMineThresholdKey(quoteTokenType uint8) []byte
- func GetMiningStakedAmount(db vm_db.VmDb, address types.Address) *big.Int
- func GetMiningStakedAmountKey(address types.Address) []byte
- func GetMiningStakedV2Amount(db vm_db.VmDb, address types.Address) *big.Int
- func GetMiningStakedV2AmountKey(address types.Address) []byte
- func GetMiningStakingsKey(address types.Address) []byte
- func GetNotFinishDividendDexFeesByPeriodMap(db vm_db.VmDb, periodId uint64) map[uint64]*DexFeesByPeriod
- func GetOperatorFeesKeyByPeriodIdAndAddress(periodId uint64, address []byte) []byte
- func GetOrderIdByHash(db vm_db.VmDb, sendHash []byte) ([]byte, bool)
- func GetOwner(db vm_db.VmDb) (*types.Address, error)
- func GetPeriodIdByTimestamp(reader util.ConsensusReader, timestamp int64) uint64
- func GetPeriodJobTrigger(db vm_db.VmDb) *types.Address
- func GetSuperVIPStakingKey(address types.Address) []byte
- func GetTimeOracle(db vm_db.VmDb) *types.Address
- func GetTimestampInt64(db vm_db.VmDb) int64
- func GetTokenInfoKey(token types.TokenTypeId) []byte
- func GetTradeThreshold(db vm_db.VmDb, quoteTokenType int32) *big.Int
- func GetTradeThresholdKey(quoteTokenType uint8) []byte
- func GetTradeTimestamp(db vm_db.VmDb) int64
- func GetUserFeesKey(address []byte) []byte
- func GetVIPStakingKey(address types.Address) []byte
- func GetVxAmountByPeriodIndex(periodIndex uint64) *big.Int
- func GetVxAmountToBurn(db vm_db.VmDb, poolAmt *big.Int) (*big.Int, error)
- func GetVxAmountToMine(db vm_db.VmDb, periodId uint64, vxPool *big.Int, rate string) (amount, vxAmtLeaved *big.Int, success bool)
- func GetVxAmountsForEqualItems(db vm_db.VmDb, periodId uint64, vxPool *big.Int, rateSum string, ...) (amountForItems map[int32]*big.Int, vxAmtLeaved *big.Int, success bool)
- func GetVxAutoLockMinedVxKey(address []byte) []byte
- func GetVxBurnAmount(db vm_db.VmDb) *big.Int
- func GetVxFundsKey(address []byte) []byte
- func GetVxLockedFundsKey(address []byte) []byte
- func GetVxMinePool(db vm_db.VmDb) *big.Int
- func GetVxToMineByPeriodId(db vm_db.VmDb, periodId uint64) *big.Int
- func GetVxUnlocksKey(address types.Address) []byte
- func GrantMarketToAgent(db vm_db.VmDb, principal, agent types.Address, marketId int32)
- func HandleStakeAction(db vm_db.VmDb, stakeType, actionType uint8, address, principal types.Address, ...) ([]*ledger.AccountBlock, error)
- func IsAutoLockMinedVx(db vm_db.VmDb, address []byte) bool
- func IsDexFeeFork(db vm_db.VmDb) bool
- func IsDexMiningFork(db vm_db.VmDb) bool
- func IsDexRobotFork(db vm_db.VmDb) bool
- func IsDexStableMarketFork(db vm_db.VmDb) bool
- func IsDexStopped(db vm_db.VmDb) bool
- func IsDust(order *Order, quantity []byte, decimalsDiff int32) bool
- func IsEarthFork(db vm_db.VmDb) bool
- func IsLeafFork(db vm_db.VmDb) bool
- func IsMakerMiningAdmin(db vm_db.VmDb, addr types.Address) bool
- func IsMarketGrantedToAgent(db vm_db.VmDb, principal, agent types.Address, marketId int32) bool
- func IsNormalMiningStarted(db vm_db.VmDb) bool
- func IsOperationValidWithMask(operationCode, mask uint8) bool
- func IsOwner(db vm_db.VmDb, address types.Address) bool
- func IsStemFork(db vm_db.VmDb) bool
- func IsValidFeeForMine(userFee *dexproto.FeeAccount, mineThreshold *big.Int) bool
- func IsValidMiningStakeAmount(amount *big.Int) bool
- func IsValidMiningStakeAmountBytes(amount []byte) bool
- func IsValidVxAmountBytesForDividend(amount []byte) bool
- func IsValidVxAmountForDividend(amount *big.Int) bool
- func IsVipStakingWithId(staking *VIPStaking) bool
- func LockMinedVx(db vm_db.VmDb, address types.Address, amount *big.Int) (updatedAcc *dexproto.Account)
- func LockVxForDividend(db vm_db.VmDb, address types.Address, amount *big.Int) (*dexproto.Account, error)
- func MarkDexFeesFinishDividend(db vm_db.VmDb, dexFeesByPeriod *DexFeesByPeriod, periodId uint64)
- func MarkDexFeesFinishMine(db vm_db.VmDb, dexFeesByPeriod *DexFeesByPeriod, periodId uint64)
- func MatchMiningStakingByPeriod(miningStakings *MiningStakings, periodId uint64, checkDelete bool) (bool, []byte, bool, bool)
- func MatchVxFundsByPeriod(vxFunds *VxFunds, periodId uint64, checkDelete bool) (bool, []byte, bool, bool)
- func MaxTotalFeeRate(order Order) int32
- func MinBigInt(a []byte, b []byte) []byte
- func NegativeAmount(amount []byte) *big.Int
- func NewAndSaveMarketId(db vm_db.VmDb) (newId int32)
- func NewAndSaveOrderSerialNo(db vm_db.VmDb, timestamp int64) (newSerialNo int32)
- func NewDelegateStakeIndexSerialNo(db vm_db.VmDb, address []byte) (serialNo uint64)
- func NewInviteCode(db vm_db.VmDb, hash types.Hash) uint32
- func NormalizeToQuoteTokenTypeAmount(amount []byte, tokenDecimals, quoteTokenType int32) []byte
- func OnCancelMiningStakeSuccess(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnCancelMiningStakeSuccessV2(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnDepositVx(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnMiningStakeSuccess(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnMiningStakeSuccessV2(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnNewMarketGetTokenInfoFailed(db vm_db.VmDb, tradeTokenId types.TokenTypeId) (err error)
- func OnNewMarketGetTokenInfoSuccess(db vm_db.VmDb, reader util.ConsensusReader, tradeTokenId types.TokenTypeId, ...) (appendBlocks []*ledger.AccountBlock, err error)
- func OnNewMarketPending(db vm_db.VmDb, param *ParamOpenNewMarket, marketInfo *MarketInfo) (data []byte, err error)
- func OnNewMarketValid(db vm_db.VmDb, reader util.ConsensusReader, marketInfo *MarketInfo, ...) (blocks []*ledger.AccountBlock, err error)
- func OnSetQuoteGetTokenInfoFailed(db vm_db.VmDb, tokenId types.TokenTypeId) (err error)
- func OnSetQuoteGetTokenInfoSuccess(db vm_db.VmDb, tokenInfoRes *ParamGetTokenInfoCallback) error
- func OnSetQuoteTokenPending(db vm_db.VmDb, token types.TokenTypeId, quoteTokenType uint8) []byte
- func OnSettleVx(db vm_db.VmDb, reader util.ConsensusReader, address []byte, ...) error
- func OnTransferOwnerGetTokenInfoFailed(db vm_db.VmDb, tradeTokenId types.TokenTypeId) (err error)
- func OnTransferOwnerGetTokenInfoSuccess(db vm_db.VmDb, param *ParamGetTokenInfoCallback) error
- func OnTransferTokenOwnerPending(db vm_db.VmDb, token types.TokenTypeId, origin, new types.Address) []byte
- func OnVxMined(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func OnWithdrawVx(db vm_db.VmDb, reader util.ConsensusReader, address types.Address, ...) error
- func PreCheckOrderParam(orderParam *ParamPlaceOrder, isStemFork bool) error
- func PriceToBytes(price string) []byte
- func ReduceAccount(db vm_db.VmDb, address types.Address, tokenId []byte, amount *big.Int) (*dexproto.Account, error)
- func ReduceVipStakingHash(stakings *VIPStaking, hash types.Hash) bool
- func RenderFeeRate(address types.Address, order *Order, marketInfo *MarketInfo, db vm_db.VmDb)
- func RenderMarketInfo(db vm_db.VmDb, marketInfo *MarketInfo, ...) error
- func RevokeMarketFromAgent(db vm_db.VmDb, principal, agent types.Address, marketId int32)
- func RoundAmount(amountF *big.Float) *big.Int
- func SafeSubBigInt(amt []byte, sub []byte) (res, actualSub []byte, exceed bool)
- func SaveCodeByInviter(db vm_db.VmDb, address types.Address, inviteCode uint32)
- func SaveCurrentOperatorFees(db vm_db.VmDb, reader util.ConsensusReader, operator []byte, ...)
- func SaveDelegateStakeAddressIndex(db vm_db.VmDb, id types.Hash, stakeType int32, address []byte) uint64
- func SaveDelegateStakeInfo(db vm_db.VmDb, hash types.Hash, stakeType uint8, ...)
- func SaveDexFeesByPeriodId(db vm_db.VmDb, periodId uint64, dexFeesByPeriod *DexFeesByPeriod)
- func SaveDexFeesLastPeriodIdForRoll(db vm_db.VmDb, periodId uint64)
- func SaveDexMiningStakings(db vm_db.VmDb, ms *MiningStakings)
- func SaveDexStopped(db vm_db.VmDb, isStopDex bool)
- func SaveFirstMinedVxPeriodId(db vm_db.VmDb, periodId uint64)
- func SaveFund(db vm_db.VmDb, address types.Address, fund *Fund)
- func SaveHashMapOrderId(db vm_db.VmDb, sendHash []byte, orderId []byte)
- func SaveInviterByCode(db vm_db.VmDb, address types.Address, inviteCode uint32)
- func SaveInviterByInvitee(db vm_db.VmDb, invitee, inviter types.Address)
- func SaveLastJobPeriodIdByBizType(db vm_db.VmDb, periodId uint64, bizType uint8)
- func SaveLastSettledMakerMinedVxPage(db vm_db.VmDb, pageId int32)
- func SaveLastSettledMakerMinedVxPeriod(db vm_db.VmDb, periodId uint64)
- func SaveMaintainer(db vm_db.VmDb, addr types.Address)
- func SaveMakerMiningAdmin(db vm_db.VmDb, addr types.Address)
- func SaveMakerMiningPoolByPeriodId(db vm_db.VmDb, periodId uint64, amount *big.Int)
- func SaveMarketInfo(db vm_db.VmDb, marketInfo *MarketInfo, ...)
- func SaveMarketInfoById(db vm_db.VmDb, marketInfo *MarketInfo)
- func SaveMineThreshold(db vm_db.VmDb, quoteTokenType uint8, amount *big.Int)
- func SaveMiningStakedAmount(db vm_db.VmDb, address types.Address, amount *big.Int)
- func SaveMiningStakedV2Amount(db vm_db.VmDb, address types.Address, amount *big.Int)
- func SaveMiningStakings(db vm_db.VmDb, address types.Address, ps *MiningStakings)
- func SavePendingNewMarkets(db vm_db.VmDb, pendingNewMarkets *PendingNewMarkets)
- func SavePendingSetQuotes(db vm_db.VmDb, pendingSetQuotes *PendingSetQuotes)
- func SavePendingTransferTokenOwners(db vm_db.VmDb, pendings *PendingTransferTokenOwnerActions)
- func SaveSuperVIPStaking(db vm_db.VmDb, address types.Address, superVIPStaking *VIPStaking)
- func SaveTokenInfo(db vm_db.VmDb, token types.TokenTypeId, tokenInfo *TokenInfo)
- func SaveTradeThreshold(db vm_db.VmDb, quoteTokenType uint8, amount *big.Int)
- func SaveUserFees(db vm_db.VmDb, address []byte, userFees *UserFees)
- func SaveVIPStaking(db vm_db.VmDb, address types.Address, vipStaking *VIPStaking)
- func SaveVxBurnAmount(db vm_db.VmDb, amount *big.Int)
- func SaveVxFunds(db vm_db.VmDb, address []byte, vxFunds *VxFunds)
- func SaveVxFundsWithForkCheck(db vm_db.VmDb, address []byte, vxFunds *VxFunds)
- func SaveVxLockedFunds(db vm_db.VmDb, address []byte, vxFunds *VxFunds)
- func SaveVxLockedSumFunds(db vm_db.VmDb, vxLockedSumFunds *VxFunds)
- func SaveVxMinePool(db vm_db.VmDb, amount *big.Int)
- func SaveVxSumFunds(db vm_db.VmDb, vxSumFunds *VxFunds)
- func SaveVxSumFundsWithForkCheck(db vm_db.VmDb, vxSumFunds *VxFunds)
- func ScheduleCancelStake(db vm_db.VmDb, address types.Address, amount *big.Int) (updatedAcc *dexproto.Account, err error)
- func ScheduleVxUnlockForDividend(db vm_db.VmDb, address types.Address, amount *big.Int) (updatedAcc *dexproto.Account, err error)
- func SetAutoLockMinedVx(db vm_db.VmDb, address []byte, enable bool)
- func SetDexTimestamp(db vm_db.VmDb, timestamp int64, reader util.ConsensusReader) error
- func SetOwner(db vm_db.VmDb, address types.Address)
- func SetPeriodJobTrigger(db vm_db.VmDb, address types.Address)
- func SetTimeOracle(db vm_db.VmDb, address types.Address)
- func SetTradeTimestamp(db vm_db.VmDb, timestamp int64)
- func SettleFees(db vm_db.VmDb, reader util.ConsensusReader, allowMining bool, feeToken []byte, ...)
- func SettleFeesWithTokenId(db vm_db.VmDb, reader util.ConsensusReader, allowMining bool, ...)
- func SettleOperatorFees(db vm_db.VmDb, reader util.ConsensusReader, feeActions []*dexproto.FeeSettle, ...)
- func StartNormalMine(db vm_db.VmDb)
- func SubBigInt(a []byte, b []byte) *big.Int
- func SubBigIntAbs(a []byte, b []byte) []byte
- func TruncateUserFeesToPeriod(userFees *UserFees, periodId uint64) (truncated bool)
- func TryUpdateTimestamp(db vm_db.VmDb, timestamp int64, preHash types.Hash)
- func Uint32ToBytes(value uint32) []byte
- func Uint64ToBytes(value uint64) []byte
- func UpdateCancelStakes(db vm_db.VmDb, address types.Address, cancelStakes *CancelStakes)
- func UpdateVxUnlocks(db vm_db.VmDb, address types.Address, unlocks *VxUnlocks)
- func ValidOperatorFeeRate(feeRate int32) bool
- func ValidPrice(price string, isFork bool) bool
- func ValidTimeOracle(db vm_db.VmDb, address types.Address) bool
- func ValidTriggerAddress(db vm_db.VmDb, address types.Address) bool
- func VerifyNewOrderPriceForRpc(data []byte) (valid bool)
- type Account
- type AccountSettleSorter
- type AmountWithToken
- type AmountWithTokenSorter
- type BurnViteEvent
- type CancelStakes
- type DelegateStakeAddressIndex
- type DelegateStakeInfo
- func GetDelegateStakeInfo(db vm_db.VmDb, hash []byte) (info *DelegateStakeInfo, ok bool)
- func GetStakeInfoList(db vm_db.VmDb, stakeAddr types.Address, ...) ([]*DelegateStakeInfo, *big.Int, error)
- func GetStakeListByPage(db abi.StorageDatabase, lastKey []byte, count int) (infos []*DelegateStakeInfo, newLastKey []byte, err error)
- type DexEvent
- type DexFeesByPeriod
- type ErrEvent
- type FeeDividendEvent
- type FeeSettleSorter
- type Fund
- type FundSettleSorter
- type FundVerifyItem
- type FundVerifyRes
- type GrantMarketToAgentEvent
- type InviteRelationEvent
- type MarketEvent
- type MarketInfo
- func CleanExpireOrders(db vm_db.VmDb, orderIds []byte) (map[types.Address]map[bool]*dexproto.AccountSettle, *MarketInfo, error)
- func GetMarketInfo(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId) (marketInfo *MarketInfo, ok bool)
- func GetMarketInfoById(db vm_db.VmDb, marketId int32) (marketInfo *MarketInfo, ok bool)
- func GetMarketInfoByTokens(db vm_db.VmDb, tradeTokenData, quoteTokenData []byte) (marketInfo *MarketInfo, ok bool)
- func RenderOrder(order *Order, param *ParamPlaceOrder, db vm_db.VmDb, ...) (*MarketInfo, error)
- type Matcher
- func (mc *Matcher) CancelOrderById(order *Order)
- func (mc *Matcher) GetFees() map[types.Address]*proto.FeeSettle
- func (mc *Matcher) GetFundSettles() map[types.Address]map[bool]*proto.AccountSettle
- func (mc *Matcher) GetOrderById(orderId []byte) (*Order, error)
- func (mc *Matcher) GetOrdersFromMarket(side bool, begin, end int) ([]*Order, int, error)
- func (mc *Matcher) MatchOrder(taker *Order, preHash types.Hash) (err error)
- type MinedVxForInviteeFeeEvent
- type MinedVxForOperationEvent
- type MinedVxForStakingEvent
- type MinedVxForTradeFeeEvent
- type MiningStakings
- type NewOrderEvent
- type OperatorFeeDividendEvent
- type OperatorFeesByPeriod
- type Order
- type OrderTx
- type OrderUpdateEvent
- type ParamCancelOrderByHash
- type ParamCancelStakeById
- type ParamCommonAdminConfig
- type ParamConfigMarketAgents
- type ParamDelegateStakeCallback
- type ParamDelegateStakeCallbackV2
- type ParamDexAdminConfig
- type ParamDexCancelOrder
- type ParamDexInnerCancelOrder
- type ParamGetTokenInfoCallback
- type ParamLockVxForDividend
- type ParamMarketAdminConfig
- type ParamNotifyTime
- type ParamOpenNewMarket
- type ParamPlaceAgentOrder
- type ParamPlaceOrder
- type ParamSerializedData
- type ParamStakeForMining
- type ParamStakeForVIP
- type ParamSwitchConfig
- type ParamTradeAdminConfig
- type ParamTransferTokenOwnership
- type ParamTriggerPeriodJob
- type ParamWithdraw
- type PendingNewMarkets
- type PendingSetQuotes
- type PendingTransferTokenOwnerActions
- type PeriodJobWithBizEvent
- type QuoteTokenTypeInfo
- type RevokeMarketFromAgentEvent
- type SerialNo
- type SerializableDex
- type SettleMakerMinedVxEvent
- type TokenEvent
- type TokenInfo
- type TransactionEvent
- type UserFees
- type VIPStaking
- type VxFunds
- func GetVxFunds(db vm_db.VmDb, address []byte) (vxFunds *VxFunds, ok bool)
- func GetVxFundsWithForkCheck(db vm_db.VmDb, address []byte) (vxFunds *VxFunds, ok bool)
- func GetVxLockedFunds(db vm_db.VmDb, address []byte) (vxFunds *VxFunds, ok bool)
- func GetVxLockedSumFunds(db vm_db.VmDb) (vxLockedSumFunds *VxFunds, ok bool)
- func GetVxSumFunds(db vm_db.VmDb) (vxSumFunds *VxFunds, ok bool)
- func GetVxSumFundsWithForkCheck(db vm_db.VmDb) (vxSumFunds *VxFunds, ok bool)
- type VxUnlocks
Constants ¶
View Source
const ( StakeForMining = iota + 1 StakeForVIP StakeForSuperVIP StakeForPrincipalSuperVIP )
View Source
const ( Stake = iota + 1 CancelStake )
View Source
const ( AdminConfigOwner = 1 AdminConfigTimeOracle = 2 AdminConfigPeriodJobTrigger = 4 AdminConfigStopDex = 8 AdminConfigMakerMiningAdmin = 16 AdminConfigMaintainer = 32 )
MethodNameDexFundDexAdminConfig
View Source
const ( TradeAdminConfigMineMarket = 1 TradeAdminConfigNewQuoteToken = 2 TradeAdminConfigTradeThreshold = 4 TradeAdminConfigMineThreshold = 8 TradeAdminStartNormalMine = 16 TradeAdminBurnExtraVx = 32 )
MethodNameDexFundTradeAdminConfig
View Source
const ( MarketOwnerTransferOwner = 1 MarketOwnerConfigTakerRate = 2 MarketOwnerConfigMakerRate = 4 MarketOwnerStopMarket = 8 )
View Source
const ( ViteTokenType = iota + 1 EthTokenType BtcTokenType UsdTokenType )
View Source
const ( MineForMaker = iota + 1 MineForMaintainer )
View Source
const ( FeeDividendJob = iota + 1 OperatorFeeDividendJob MineVxForFeeJob MineVxForStakingJob MineVxForMakerAndMaintainerJob FinishVxUnlock FinishCancelMiningStake )
View Source
const ( GetTokenForNewMarket = iota + 1 GetTokenForSetQuote GetTokenForTransferOwner )
View Source
const ( GrantAgent = iota + 1 RevokeAgent )
View Source
const ( LockVx = iota + 1 UnlockVx )
View Source
const ( StakeSubmitted = iota + 1 StakeConfirmed )
View Source
const ( Pending = iota PartialExecuted FullyExecuted Cancelled NewFailed )
View Source
const ( Limited = iota Market )
View Source
const (
AutoLockMinedVx = iota + 1
)
View Source
const (
BurnForDexViteFee = iota + 1
)
View Source
const CleanExpireOrdersMaxCount = 200
View Source
const (
CommonAdminConfigStableMarket = 1
)
View Source
const OrderIdBytesLength = 22
View Source
const PriceBytesLength = 10
Variables ¶
View Source
var ( InvalidInputParamErr = errors.New("invalid input param") InvalidOrderIdErr = errors.New("invalid order id") InvalidOrderHashErr = errors.New("invalid order hash") InvalidOrderTypeErr = errors.New("invalid order type") InvalidOrderPriceErr = errors.New("invalid order price format") InvalidOrderQuantityErr = errors.New("invalid order quantity") OrderNotExistsErr = errors.New("order not exists") OrderAmountTooSmallErr = errors.New("order amount too small") DexStoppedErr = errors.New("dex stopped") TradeMarketExistsErr = errors.New("trade market already exists") TradeMarketNotExistsErr = errors.New("trade market not exists") TradeMarketStoppedErr = errors.New("trade market stopped") TradeMarketNotGrantedErr = errors.New("trade market not granted") ComposeOrderIdFailErr = errors.New("compose order id fail") DeComposeOrderIdFailErr = errors.New("decompose order id fail") TradeMarketInvalidQuoteTokenErr = errors.New("invalid quote token") TradeMarketInvalidTokenPairErr = errors.New("invalid token pair") TradeMarketAllowMineErr = errors.New("token pair already allow mine") TradeMarketNotAllowMineErr = errors.New("token pair already not allow mine") TradeMarketStableMarketErr = errors.New("already stable currency market") TradeMarketNotStableMarketErr = errors.New("already not stable currency market") CancelOrderOwnerInvalidErr = errors.New("order to cancel not own to initiator") CancelOrderInvalidStatusErr = errors.New("order status is invalid to cancel") OnlyOwnerAllowErr = errors.New("only owner allow") InvalidOperationErr = errors.New("invalid operation") ExceedFundAvailableErr = errors.New("exceed fund available") ExceedFundLockedErr = errors.New("try release locked amount exceed locked") InvalidStakeAmountErr = errors.New("invalid stake amount") InvalidStakeActionTypeErr = errors.New("invalid stake action type") ExceedStakedAvailableErr = errors.New("exceed staked available") StakingAmountLeavedNotValidErr = errors.New("staking amount leaved not valid") VIPStakingExistsErr = errors.New("VIP staking exists") VIPStakingNotExistsErr = errors.New("VIP staking not exists") SuperVipStakingExistsErr = errors.New("super VIP staking exists") SuperVIPStakingNotExistsErr = errors.New("super VIP staking not exists") StakingInfoByIdNotExistsErr = errors.New("staking info by id not exists") InvalidSourceAddressErr = errors.New("invalid source address") InvalidAmountForStakeCallbackErr = errors.New("invalid amount for stake callback") InvalidIdForStakeCallbackErr = errors.New("invalid id for stake callback") InvalidTokenErr = errors.New("invalid token") PendingNewMarketInnerConflictErr = errors.New("pending new market inner conflict") GetTokenInfoCallbackInnerConflictErr = errors.New("get token info callback inner conflict") InvalidTimestampFromTimeOracleErr = errors.New("invalid timestamp from time oracle") OracleTimestampExceedPeriodGapErr = errors.New("oracle timestamp exceed period gap") InvalidOperatorFeeRateErr = errors.New("invalid operator fee rate") NoDexFeesFoundForValidPeriodErr = errors.New("no fee sum found for valid period") NotSetTimestampErr = errors.New("not set timestamp") IterateVmDbFailedErr = errors.New("iterate vm db failed") NotSetMaintainerErr = errors.New("not set maintainer") NotSetMakerMiningAdmin = errors.New("not set maker mining admin") AlreadyIsInviterErr = errors.New("already is inviter") InvalidInviteCodeErr = errors.New("invalid invite code") NotBindInviterErr = errors.New("not bind invite code") AlreadyBindInviterErr = errors.New("already bind inviter") NewInviteCodeFailErr = errors.New("new invite code fail") AlreadyQuoteType = errors.New("already quote type") InvalidQuoteTokenTypeErr = errors.New("invalid quote token type") FundOwnerNotConfigErr = errors.New("fund owner not config") MultiMarketsInOneActionErr = errors.New("multi markets one action") DexFundUserNotExists = errors.New("fund user doesn't exist.") LockedVxAmountLeavedNotValidErr = errors.New("locked vx amount leaved not valid") InternalErr = errors.New("internal error") )
View Source
var (
VxTokenId, _ = types.HexToTokenTypeId("tti_564954455820434f494e69b5")
PreheatMinedAmtPerPeriod = new(big.Int).Mul(commonTokenPow, big.NewInt(10000))
VxMinedAmtFirstPeriod = new(big.Int).Mul(new(big.Int).Exp(helper.Big10, new(big.Int).SetUint64(uint64(13)), nil), big.NewInt(47703236213)) // 477032.36213
VxDividendThreshold = new(big.Int).Mul(commonTokenPow, big.NewInt(10))
NewMarketFeeAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(10000))
NewMarketFeeMineAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(1000))
NewMarketFeeDonateAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(4000))
NewMarketFeeBurnAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(5000))
NewInviterFeeAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(1000))
VxLockThreshold = new(big.Int).Set(commonTokenPow)
SchedulePeriods = 7 // T+7 schedule
StakeForMiningMinAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(134))
StakeForVIPAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(10000))
StakeForMiningThreshold = new(big.Int).Mul(commonTokenPow, big.NewInt(134))
StakeForSuperVIPAmount = new(big.Int).Mul(commonTokenPow, big.NewInt(1000000))
RateSumForFeeMine = "0.6" // 15% * 4
RateForStakingMine = "0.2" // 20%
RateSumForMakerAndMaintainerMine = "0.2" // 10% + 10%
ViteTokenDecimals int32 = 18
QuoteTokenTypeInfos = map[int32]*QuoteTokenTypeInfo{
ViteTokenType: &QuoteTokenTypeInfo{Decimals: 18, DefaultTradeThreshold: viteMinAmount, DefaultMineThreshold: viteMineThreshold},
EthTokenType: &QuoteTokenTypeInfo{Decimals: 18, DefaultTradeThreshold: ethMinAmount, DefaultMineThreshold: ethMineThreshold},
BtcTokenType: &QuoteTokenTypeInfo{Decimals: 8, DefaultTradeThreshold: bitcoinMinAmount, DefaultMineThreshold: bitcoinMineThreshold},
UsdTokenType: &QuoteTokenTypeInfo{Decimals: 6, DefaultTradeThreshold: usdMinAmount, DefaultMineThreshold: usdMineThreshold},
}
)
View Source
var ( BaseFeeRate int32 = 200 // 200/100,000 = 0.002 VipReduceFeeRate int32 = 100 // 0.001 MaxOperatorFeeRate int32 = 200 // 0.002 PerPeriodDividendRate int32 = 1000 // 0.01 InviterBonusRate int32 = 5000 // 0.05 InviteeBonusRate int32 = 2500 // 0.025 RateCardinalNum int32 = 100000 // 100,000 )
Functions ¶
func AddCancelStake ¶
func AddErrEvent ¶
func AddFeeDividendEvent ¶
func AddInviteRelationEvent ¶
func AddMarketEvent ¶
func AddMarketEvent(db vm_db.VmDb, marketInfo *MarketInfo)
func AddPeriodWithBizEvent ¶
func AddToPendingNewMarkets ¶
func AddToPendingNewMarkets(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId) error
func AddToPendingSetQuotes ¶
func AddToPendingSetQuotes(db vm_db.VmDb, token types.TokenTypeId, quoteType uint8)
func AddTokenEvent ¶
func AddVxUnlock ¶
func AdjustForDecimalsDiff ¶
func BatchUpdateFund ¶
func BitwiseNotBytes ¶
func BitwiseNotBytes(bytes []byte)
func BurnExtraVx ¶
func BurnExtraVx(db vm_db.VmDb) ([]*ledger.AccountBlock, error)
func BytesToPrice ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func CalculateAmountForRate ¶
func CalculateRawAmount ¶
func CalculateRawAmountF ¶
func CardinalRateToString ¶
func CheckAndLockFundForNewOrder ¶
func CheckAndLockFundForNewOrder(dexFund *Fund, order *Order, marketInfo *MarketInfo) (err error)
func CheckCancelAgentOrder ¶
func CheckMarketParam ¶
func CheckMarketParam(marketParam *ParamOpenNewMarket) (err error)
func CheckMiningStakingsCanBeDelete ¶
func CheckMiningStakingsCanBeDelete(miningStakings *MiningStakings) bool
func CheckSettleActions ¶
func CheckSettleActions(actions *dexproto.SettleActions) error
func CmpForBigInt ¶
func CmpToBigZero ¶
func ComposeOrderId ¶
MarketId[0..2]Side[3]Price[4..13]timestamp[14..18]serialNo[19..21] = 22
func DeComposeOrderId ¶
func DeleteDelegateStakeInfo ¶
func DeleteHashMapOrderId ¶
func DeleteMarketInfo ¶
func DeleteMarketInfo(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId)
func DeleteOperatorFeesByKey ¶
func DeletePendingNewMarkets ¶
func DeletePendingSetQuotes ¶
func DeleteUserFees ¶
func DeleteVxFunds ¶
func DeleteVxLockedFunds ¶
func DepositAccount ¶
func DivideByProportion ¶
func DoCancelOrder ¶
func DoCancelStakeV1 ¶
func DoCancelStakeV2 ¶
func DoFeesDividend ¶
Note: allow dividend from specify periodId, former periods will be divided at that period
func DoFinishCancelMiningStake ¶
periodId is finish period
func DoFinishVxUnlock ¶
periodId is finish period
func DoMineVxForFee ¶
func DoMineVxForFee(db vm_db.VmDb, reader util.ConsensusReader, periodId uint64, amtForMarkets map[int32]*big.Int, fundLogger log15.Logger) (*big.Int, error)
Note: allow mine from specify periodId, former periods will be ignore
func DoMineVxForMaintainer ¶
func DoMineVxForStaking ¶
func DoPlaceOrder ¶
func DoPlaceOrder(db vm_db.VmDb, param *ParamPlaceOrder, accountAddress, agent *types.Address, sendHash types.Hash) ([]*ledger.AccountBlock, error)
func DoRawCancelStakeV2 ¶
func DoRawCancelStakeV2(id types.Hash) ([]*ledger.AccountBlock, error)
func DoSettleFund ¶
func DoSettleFund(db vm_db.VmDb, reader util.ConsensusReader, action *dexproto.FundSettle, marketInfo *MarketInfo, fundLogger log15.Logger) error
func DoSettleVxFunds ¶
func DoSettleVxFunds(db vm_db.VmDb, reader util.ConsensusReader, addressBytes []byte, amtChange *big.Int, updatedVxAccount *dexproto.Account) error
only settle validAmount and amount changed from previous period
func FilterPendingNewMarkets ¶
func FilterPendingNewMarkets(db vm_db.VmDb, tradeToken types.TokenTypeId) (quoteTokens [][]byte, err error)
handle case on duplicate callback for getTokenInfo
func FilterPendingSetQuotes ¶
func FilterPendingSetQuotes(db vm_db.VmDb, token types.TokenTypeId) (action *dexproto.SetQuoteTokenAction, err error)
handle case on duplicate callback for getTokenInfo
func FilterPendingTransferTokenOwners ¶
func FilterPendingTransferTokenOwners(db vm_db.VmDb, token types.TokenTypeId) (action *dexproto.TransferTokenOwnerAction, err error)
handle case on duplicate callback for getTokenInfo
func FinishCancelStake ¶
func GetAccountByToken ¶
func GetCancelStakesKey ¶
func GetCurrentPeriodId ¶
func GetCurrentPeriodId(db vm_db.VmDb, reader util.ConsensusReader) uint64
func GetDelegateStakeInfoKey ¶
func GetDexFeesKeyByPeriodId ¶
func GetDexTimestamp ¶
func GetFirstMinedVxPeriodId ¶
func GetFundKey ¶
func GetHashMapOrderIdKey ¶
func GetInviterByCode ¶
func GetInviterByInvitee ¶
func GetLastJobPeriodIdKey ¶
func GetMarketInfoKey ¶
func GetMarketInfoKey(tradeToken, quoteToken types.TokenTypeId) []byte
func GetMarketInfoKeyById ¶
func GetMineThresholdKey ¶
func GetMiningStakedAmount ¶
func GetMiningStakedV2Amount ¶
func GetMiningStakingsKey ¶
func GetNotFinishDividendDexFeesByPeriodMap ¶
func GetNotFinishDividendDexFeesByPeriodMap(db vm_db.VmDb, periodId uint64) map[uint64]*DexFeesByPeriod
get all dexFeeses that not divided yet
func GetPeriodIdByTimestamp ¶
func GetPeriodIdByTimestamp(reader util.ConsensusReader, timestamp int64) uint64
func GetSuperVIPStakingKey ¶
func GetTimestampInt64 ¶
func GetTokenInfoKey ¶
func GetTokenInfoKey(token types.TokenTypeId) []byte
func GetTradeThresholdKey ¶
func GetTradeTimestamp ¶
func GetUserFeesKey ¶
func GetVIPStakingKey ¶
func GetVxAmountToMine ¶
func GetVxAutoLockMinedVxKey ¶
func GetVxFundsKey ¶
func GetVxLockedFundsKey ¶
func GetVxUnlocksKey ¶
func GrantMarketToAgent ¶
func HandleStakeAction ¶
func IsDexFeeFork ¶
func IsDexMiningFork ¶
func IsDexRobotFork ¶
func IsDexStableMarketFork ¶
func IsDexStopped ¶
func IsEarthFork ¶
func IsLeafFork ¶
func IsMarketGrantedToAgent ¶
func IsNormalMiningStarted ¶
func IsStemFork ¶
func IsValidFeeForMine ¶
func IsValidFeeForMine(userFee *dexproto.FeeAccount, mineThreshold *big.Int) bool
func IsVipStakingWithId ¶
func IsVipStakingWithId(staking *VIPStaking) bool
func LockMinedVx ¶
func LockVxForDividend ¶
func MarkDexFeesFinishDividend ¶
func MarkDexFeesFinishDividend(db vm_db.VmDb, dexFeesByPeriod *DexFeesByPeriod, periodId uint64)
dexFees used both by fee dividend and mined vx dividend
func MarkDexFeesFinishMine ¶
func MarkDexFeesFinishMine(db vm_db.VmDb, dexFeesByPeriod *DexFeesByPeriod, periodId uint64)
func MatchVxFundsByPeriod ¶
func MaxTotalFeeRate ¶
func NegativeAmount ¶
func NewAndSaveMarketId ¶
func NewAndSaveOrderSerialNo ¶
func OnDepositVx ¶
func OnMiningStakeSuccess ¶
func OnMiningStakeSuccessV2 ¶
func OnNewMarketGetTokenInfoFailed ¶
func OnNewMarketGetTokenInfoFailed(db vm_db.VmDb, tradeTokenId types.TokenTypeId) (err error)
func OnNewMarketGetTokenInfoSuccess ¶
func OnNewMarketGetTokenInfoSuccess(db vm_db.VmDb, reader util.ConsensusReader, tradeTokenId types.TokenTypeId, tokenInfoRes *ParamGetTokenInfoCallback) (appendBlocks []*ledger.AccountBlock, err error)
func OnNewMarketPending ¶
func OnNewMarketPending(db vm_db.VmDb, param *ParamOpenNewMarket, marketInfo *MarketInfo) (data []byte, err error)
func OnNewMarketValid ¶
func OnNewMarketValid(db vm_db.VmDb, reader util.ConsensusReader, marketInfo *MarketInfo, tradeToken, quoteToken types.TokenTypeId, address *types.Address) (blocks []*ledger.AccountBlock, err error)
func OnSetQuoteGetTokenInfoFailed ¶
func OnSetQuoteGetTokenInfoFailed(db vm_db.VmDb, tokenId types.TokenTypeId) (err error)
func OnSetQuoteGetTokenInfoSuccess ¶
func OnSetQuoteGetTokenInfoSuccess(db vm_db.VmDb, tokenInfoRes *ParamGetTokenInfoCallback) error
func OnSetQuoteTokenPending ¶
func OnSettleVx ¶
func OnSettleVx(db vm_db.VmDb, reader util.ConsensusReader, address []byte, fundSettle *dexproto.AccountSettle, updatedVxAccount *dexproto.Account) error
func OnTransferOwnerGetTokenInfoFailed ¶
func OnTransferOwnerGetTokenInfoFailed(db vm_db.VmDb, tradeTokenId types.TokenTypeId) (err error)
func OnTransferOwnerGetTokenInfoSuccess ¶
func OnTransferOwnerGetTokenInfoSuccess(db vm_db.VmDb, param *ParamGetTokenInfoCallback) error
func OnWithdrawVx ¶
func PreCheckOrderParam ¶
func PreCheckOrderParam(orderParam *ParamPlaceOrder, isStemFork bool) error
func PriceToBytes ¶
func ReduceAccount ¶
func ReduceVipStakingHash ¶
func ReduceVipStakingHash(stakings *VIPStaking, hash types.Hash) bool
func RenderFeeRate ¶
func RenderMarketInfo ¶
func RenderMarketInfo(db vm_db.VmDb, marketInfo *MarketInfo, tradeToken, quoteToken types.TokenTypeId, tradeTokenInfo *TokenInfo, creator *types.Address) error
func RevokeMarketFromAgent ¶
func SafeSubBigInt ¶
func SaveCodeByInviter ¶
func SaveCurrentOperatorFees ¶
func SaveCurrentOperatorFees(db vm_db.VmDb, reader util.ConsensusReader, operator []byte, operatorFeesByPeriod *OperatorFeesByPeriod)
func SaveDelegateStakeInfo ¶
func SaveDexFeesByPeriodId ¶
func SaveDexFeesByPeriodId(db vm_db.VmDb, periodId uint64, dexFeesByPeriod *DexFeesByPeriod)
func SaveDexMiningStakings ¶
func SaveDexMiningStakings(db vm_db.VmDb, ms *MiningStakings)
func SaveDexStopped ¶
func SaveInviterByCode ¶
func SaveInviterByInvitee ¶
func SaveMarketInfo ¶
func SaveMarketInfo(db vm_db.VmDb, marketInfo *MarketInfo, tradeToken, quoteToken types.TokenTypeId)
func SaveMarketInfoById ¶
func SaveMarketInfoById(db vm_db.VmDb, marketInfo *MarketInfo)
func SaveMineThreshold ¶
func SaveMiningStakedAmount ¶
func SaveMiningStakings ¶
func SaveMiningStakings(db vm_db.VmDb, address types.Address, ps *MiningStakings)
func SavePendingNewMarkets ¶
func SavePendingNewMarkets(db vm_db.VmDb, pendingNewMarkets *PendingNewMarkets)
func SavePendingSetQuotes ¶
func SavePendingSetQuotes(db vm_db.VmDb, pendingSetQuotes *PendingSetQuotes)
func SavePendingTransferTokenOwners ¶
func SavePendingTransferTokenOwners(db vm_db.VmDb, pendings *PendingTransferTokenOwnerActions)
func SaveSuperVIPStaking ¶
func SaveSuperVIPStaking(db vm_db.VmDb, address types.Address, superVIPStaking *VIPStaking)
func SaveTokenInfo ¶
func SaveTokenInfo(db vm_db.VmDb, token types.TokenTypeId, tokenInfo *TokenInfo)
func SaveTradeThreshold ¶
func SaveVIPStaking ¶
func SaveVIPStaking(db vm_db.VmDb, address types.Address, vipStaking *VIPStaking)
func SaveVxLockedSumFunds ¶
func SaveVxSumFunds ¶
func ScheduleCancelStake ¶
func SetDexTimestamp ¶
func SetTradeTimestamp ¶
func SettleFees ¶
func SettleFeesWithTokenId ¶
func SettleOperatorFees ¶
func SettleOperatorFees(db vm_db.VmDb, reader util.ConsensusReader, feeActions []*dexproto.FeeSettle, marketInfo *MarketInfo)
func StartNormalMine ¶
func SubBigIntAbs ¶
func TryUpdateTimestamp ¶
func Uint32ToBytes ¶
func Uint64ToBytes ¶
func UpdateCancelStakes ¶
func UpdateCancelStakes(db vm_db.VmDb, address types.Address, cancelStakes *CancelStakes)
func UpdateVxUnlocks ¶
func ValidOperatorFeeRate ¶
func ValidPrice ¶
Types ¶
type Account ¶
type Account struct { Token types.TokenTypeId Available *big.Int Locked *big.Int VxLocked *big.Int VxUnlocking *big.Int CancellingStake *big.Int }
func GetAccounts ¶
func GetAccounts(fund *Fund, tokenId *types.TokenTypeId) ([]*Account, error)
func (*Account) Deserialize ¶
type AccountSettleSorter ¶
type AccountSettleSorter []*dexproto.AccountSettle
func (AccountSettleSorter) Len ¶
func (st AccountSettleSorter) Len() int
func (AccountSettleSorter) Less ¶
func (st AccountSettleSorter) Less(i, j int) bool
func (AccountSettleSorter) Swap ¶
func (st AccountSettleSorter) Swap(i, j int)
type AmountWithToken ¶
type AmountWithToken struct { Token types.TokenTypeId Amount *big.Int Deleted bool }
func MapToAmountWithTokens ¶
func MapToAmountWithTokens(mp map[types.TokenTypeId]*big.Int) []*AmountWithToken
type AmountWithTokenSorter ¶
type AmountWithTokenSorter []*AmountWithToken
func (AmountWithTokenSorter) Len ¶
func (st AmountWithTokenSorter) Len() int
func (AmountWithTokenSorter) Less ¶
func (st AmountWithTokenSorter) Less(i, j int) bool
func (AmountWithTokenSorter) Swap ¶
func (st AmountWithTokenSorter) Swap(i, j int)
type BurnViteEvent ¶
func (BurnViteEvent) FromBytes ¶
func (bv BurnViteEvent) FromBytes(data []byte) interface{}
func (BurnViteEvent) GetTopicId ¶
func (bv BurnViteEvent) GetTopicId() types.Hash
type CancelStakes ¶
type CancelStakes struct {
dexproto.CancelStakes
}
func GetCancelStakes ¶
func (*CancelStakes) DeSerialize ¶
func (cs *CancelStakes) DeSerialize(data []byte) error
func (*CancelStakes) Serialize ¶
func (cs *CancelStakes) Serialize() (data []byte, err error)
type DelegateStakeAddressIndex ¶
type DelegateStakeAddressIndex struct {
dexproto.DelegateStakeAddressIndex
}
func (*DelegateStakeAddressIndex) DeSerialize ¶
func (dsi *DelegateStakeAddressIndex) DeSerialize(data []byte) error
func (*DelegateStakeAddressIndex) Serialize ¶
func (dsi *DelegateStakeAddressIndex) Serialize() (data []byte, err error)
type DelegateStakeInfo ¶
type DelegateStakeInfo struct {
dexproto.DelegateStakeInfo
}
func GetDelegateStakeInfo ¶
func GetDelegateStakeInfo(db vm_db.VmDb, hash []byte) (info *DelegateStakeInfo, ok bool)
func GetStakeInfoList ¶
func GetStakeInfoList(db vm_db.VmDb, stakeAddr types.Address, filter func(*DelegateStakeAddressIndex) bool) ([]*DelegateStakeInfo, *big.Int, error)
func GetStakeListByPage ¶
func GetStakeListByPage(db abi.StorageDatabase, lastKey []byte, count int) (infos []*DelegateStakeInfo, newLastKey []byte, err error)
func (*DelegateStakeInfo) DeSerialize ¶
func (dsi *DelegateStakeInfo) DeSerialize(data []byte) error
func (*DelegateStakeInfo) Serialize ¶
func (dsi *DelegateStakeInfo) Serialize() (data []byte, err error)
type DexFeesByPeriod ¶
type DexFeesByPeriod struct {
dexproto.DexFeesByPeriod
}
func GetCurrentDexFees ¶
func GetCurrentDexFees(db vm_db.VmDb, reader util.ConsensusReader) (*DexFeesByPeriod, bool)
func GetDexFeesByPeriodId ¶
func GetDexFeesByPeriodId(db vm_db.VmDb, periodId uint64) (*DexFeesByPeriod, bool)
func RollAndGentNewDexFeesByPeriod ¶
func RollAndGentNewDexFeesByPeriod(db vm_db.VmDb, periodId uint64) (rolledDexFeesByPeriod *DexFeesByPeriod)
func (*DexFeesByPeriod) DeSerialize ¶
func (df *DexFeesByPeriod) DeSerialize(data []byte) (err error)
func (*DexFeesByPeriod) Serialize ¶
func (df *DexFeesByPeriod) Serialize() (data []byte, err error)
type ErrEvent ¶
type ErrEvent struct {
// contains filtered or unexported fields
}
func (ErrEvent) GetTopicId ¶
type FeeDividendEvent ¶
type FeeDividendEvent struct {
dexproto.FeeDividendForVxHolder
}
func (FeeDividendEvent) FromBytes ¶
func (fde FeeDividendEvent) FromBytes(data []byte) interface{}
func (FeeDividendEvent) GetTopicId ¶
func (fde FeeDividendEvent) GetTopicId() types.Hash
type FeeSettleSorter ¶
func (FeeSettleSorter) Len ¶
func (st FeeSettleSorter) Len() int
func (FeeSettleSorter) Less ¶
func (st FeeSettleSorter) Less(i, j int) bool
func (FeeSettleSorter) Swap ¶
func (st FeeSettleSorter) Swap(i, j int)
type FundSettleSorter ¶
type FundSettleSorter []*dexproto.FundSettle
func (FundSettleSorter) Len ¶
func (st FundSettleSorter) Len() int
func (FundSettleSorter) Less ¶
func (st FundSettleSorter) Less(i, j int) bool
func (FundSettleSorter) Swap ¶
func (st FundSettleSorter) Swap(i, j int)
type FundVerifyItem ¶
type FundVerifyRes ¶
type FundVerifyRes struct { UserCount int `json:"userCount"` BalanceMatched bool `json:"balanceMatched"` VerifyItems map[types.TokenTypeId]*FundVerifyItem `json:"balances"` }
func VerifyDexFundBalance ¶
func VerifyDexFundBalance(db vm_db.VmDb, reader *util.VMConsensusReader) *FundVerifyRes
type GrantMarketToAgentEvent ¶
type GrantMarketToAgentEvent struct {
dexproto.MarketAgentRelation
}
func (GrantMarketToAgentEvent) FromBytes ¶
func (gmta GrantMarketToAgentEvent) FromBytes(data []byte) interface{}
func (GrantMarketToAgentEvent) GetTopicId ¶
func (gmta GrantMarketToAgentEvent) GetTopicId() types.Hash
type InviteRelationEvent ¶
type InviteRelationEvent struct {
dexproto.InviteRelation
}
func (InviteRelationEvent) FromBytes ¶
func (ir InviteRelationEvent) FromBytes(data []byte) interface{}
func (InviteRelationEvent) GetTopicId ¶
func (ir InviteRelationEvent) GetTopicId() types.Hash
type MarketEvent ¶
type MarketEvent struct {
dexproto.MarketInfo
}
func (MarketEvent) FromBytes ¶
func (me MarketEvent) FromBytes(data []byte) interface{}
func (MarketEvent) GetTopicId ¶
func (me MarketEvent) GetTopicId() types.Hash
type MarketInfo ¶
type MarketInfo struct {
dexproto.MarketInfo
}
func CleanExpireOrders ¶
func CleanExpireOrders(db vm_db.VmDb, orderIds []byte) (map[types.Address]map[bool]*dexproto.AccountSettle, *MarketInfo, error)
func GetMarketInfo ¶
func GetMarketInfo(db vm_db.VmDb, tradeToken, quoteToken types.TokenTypeId) (marketInfo *MarketInfo, ok bool)
func GetMarketInfoById ¶
func GetMarketInfoById(db vm_db.VmDb, marketId int32) (marketInfo *MarketInfo, ok bool)
func GetMarketInfoByTokens ¶
func GetMarketInfoByTokens(db vm_db.VmDb, tradeTokenData, quoteTokenData []byte) (marketInfo *MarketInfo, ok bool)
func RenderOrder ¶
func RenderOrder(order *Order, param *ParamPlaceOrder, db vm_db.VmDb, accountAddress, agent *types.Address, sendHash types.Hash) (*MarketInfo, error)
func (*MarketInfo) DeSerialize ¶
func (mi *MarketInfo) DeSerialize(data []byte) error
func (*MarketInfo) Serialize ¶
func (mi *MarketInfo) Serialize() (data []byte, err error)
type Matcher ¶
type Matcher struct { MarketInfo *MarketInfo // contains filtered or unexported fields }
func NewMatcherWithMarketInfo ¶
func NewMatcherWithMarketInfo(db vm_db.VmDb, marketInfo *MarketInfo) (mc *Matcher)
func NewRawMatcher ¶
func (*Matcher) CancelOrderById ¶
func (*Matcher) GetFundSettles ¶
func (*Matcher) GetOrdersFromMarket ¶
type MinedVxForInviteeFeeEvent ¶
type MinedVxForInviteeFeeEvent struct {
dexproto.MinedVxForFee
}
func (MinedVxForInviteeFeeEvent) FromBytes ¶
func (mif MinedVxForInviteeFeeEvent) FromBytes(data []byte) interface{}
func (MinedVxForInviteeFeeEvent) GetTopicId ¶
func (mif MinedVxForInviteeFeeEvent) GetTopicId() types.Hash
type MinedVxForOperationEvent ¶
type MinedVxForOperationEvent struct {
dexproto.MinedVxForOperation
}
func (MinedVxForOperationEvent) FromBytes ¶
func (mo MinedVxForOperationEvent) FromBytes(data []byte) interface{}
func (MinedVxForOperationEvent) GetTopicId ¶
func (mo MinedVxForOperationEvent) GetTopicId() types.Hash
type MinedVxForStakingEvent ¶
type MinedVxForStakingEvent struct {
dexproto.MinedVxForStaking
}
func (MinedVxForStakingEvent) FromBytes ¶
func (mp MinedVxForStakingEvent) FromBytes(data []byte) interface{}
func (MinedVxForStakingEvent) GetTopicId ¶
func (mp MinedVxForStakingEvent) GetTopicId() types.Hash
type MinedVxForTradeFeeEvent ¶
type MinedVxForTradeFeeEvent struct {
dexproto.MinedVxForFee
}
func (MinedVxForTradeFeeEvent) FromBytes ¶
func (mtf MinedVxForTradeFeeEvent) FromBytes(data []byte) interface{}
func (MinedVxForTradeFeeEvent) GetTopicId ¶
func (mtf MinedVxForTradeFeeEvent) GetTopicId() types.Hash
type MiningStakings ¶
type MiningStakings struct {
dexproto.MiningStakings
}
func GetDexMiningStakings ¶
func GetDexMiningStakings(db vm_db.VmDb) (dexMiningStakings *MiningStakings, ok bool)
func GetMiningStakings ¶
func (*MiningStakings) DeSerialize ¶
func (mss *MiningStakings) DeSerialize(data []byte) error
func (*MiningStakings) Serialize ¶
func (mss *MiningStakings) Serialize() (data []byte, err error)
type NewOrderEvent ¶
type NewOrderEvent struct {
dexproto.NewOrderInfo
}
func (NewOrderEvent) FromBytes ¶
func (od NewOrderEvent) FromBytes(data []byte) interface{}
func (NewOrderEvent) GetTopicId ¶
func (od NewOrderEvent) GetTopicId() types.Hash
type OperatorFeeDividendEvent ¶
type OperatorFeeDividendEvent struct {
dexproto.OperatorFeeDividend
}
func (OperatorFeeDividendEvent) FromBytes ¶
func (bfd OperatorFeeDividendEvent) FromBytes(data []byte) interface{}
func (OperatorFeeDividendEvent) GetTopicId ¶
func (bfd OperatorFeeDividendEvent) GetTopicId() types.Hash
type OperatorFeesByPeriod ¶
type OperatorFeesByPeriod struct {
dexproto.OperatorFeesByPeriod
}
func GetCurrentOperatorFees ¶
func GetCurrentOperatorFees(db vm_db.VmDb, reader util.ConsensusReader, operator []byte) (*OperatorFeesByPeriod, bool)
func (*OperatorFeesByPeriod) DeSerialize ¶
func (bfs *OperatorFeesByPeriod) DeSerialize(data []byte) (err error)
func (*OperatorFeesByPeriod) Serialize ¶
func (bfs *OperatorFeesByPeriod) Serialize() (data []byte, err error)
type Order ¶
func (*Order) DeSerialize ¶
func (*Order) DeSerializeCompact ¶
func (*Order) RenderOrderById ¶
func (*Order) SerializeCompact ¶
type OrderTx ¶
type OrderTx struct { proto.Transaction // contains filtered or unexported fields }
type OrderUpdateEvent ¶
type OrderUpdateEvent struct {
dexproto.OrderUpdateInfo
}
func (OrderUpdateEvent) FromBytes ¶
func (od OrderUpdateEvent) FromBytes(data []byte) interface{}
func (OrderUpdateEvent) GetTopicId ¶
func (od OrderUpdateEvent) GetTopicId() types.Hash
type ParamCancelOrderByHash ¶
type ParamCancelOrderByHash struct { SendHash types.Hash Principal types.Address TradeToken types.TokenTypeId QuoteToken types.TokenTypeId }
type ParamCancelStakeById ¶
type ParamCommonAdminConfig ¶
type ParamConfigMarketAgents ¶
type ParamConfigMarketAgents struct { ActionType uint8 // 1: grant 2: revoke Agent types.Address TradeTokens []types.TokenTypeId QuoteTokens []types.TokenTypeId }
type ParamDexAdminConfig ¶
type ParamDexAdminConfig struct { OperationCode uint8 Owner types.Address // 1 owner TimeOracle types.Address // 2 timeOracle PeriodJobTrigger types.Address // 4 periodJobTrigger StopDex bool // 8 stopDex MakerMiningAdmin types.Address // 16 maker mining admin Maintainer types.Address // 32 maintainer }
type ParamDexCancelOrder ¶
type ParamDexCancelOrder struct {
OrderId []byte
}
type ParamLockVxForDividend ¶
type ParamMarketAdminConfig ¶
type ParamMarketAdminConfig struct { OperationCode uint8 // 1 owner, 2 takerRate, 4 makerRate, 8 stopMarket TradeToken types.TokenTypeId QuoteToken types.TokenTypeId MarketOwner types.Address TakerFeeRate int32 MakerFeeRate int32 StopMarket bool }
type ParamNotifyTime ¶
type ParamNotifyTime struct {
Timestamp int64
}
type ParamOpenNewMarket ¶
type ParamOpenNewMarket struct { TradeToken types.TokenTypeId QuoteToken types.TokenTypeId }
type ParamPlaceAgentOrder ¶
type ParamPlaceAgentOrder struct { Principal types.Address ParamPlaceOrder }
type ParamPlaceOrder ¶
type ParamPlaceOrder struct { TradeToken types.TokenTypeId QuoteToken types.TokenTypeId Side bool OrderType uint8 Price string Quantity *big.Int }
type ParamSerializedData ¶
type ParamSerializedData struct {
Data []byte
}
type ParamStakeForMining ¶
type ParamStakeForVIP ¶
type ParamStakeForVIP struct {
ActionType uint8 // 1: stake 2: cancel stake
}
type ParamSwitchConfig ¶
type ParamTradeAdminConfig ¶
type ParamTradeAdminConfig struct { OperationCode uint8 TradeToken types.TokenTypeId // 1 mineMarket QuoteToken types.TokenTypeId // 1 mineMarket AllowMining bool // 1 mineMarket NewQuoteToken types.TokenTypeId // 2 new quote token QuoteTokenType uint8 // 2 new quote token TokenTypeForTradeThreshold uint8 // 4 tradeThreshold MinTradeThreshold *big.Int // 4 tradeThreshold TokenTypeForMiningThreshold uint8 // 8 miningThreshold MinMiningThreshold *big.Int // 8 miningThreshold }
type ParamTransferTokenOwnership ¶
type ParamTransferTokenOwnership struct { Token types.TokenTypeId NewOwner types.Address }
type ParamTriggerPeriodJob ¶
type ParamWithdraw ¶
type ParamWithdraw struct { Token types.TokenTypeId Amount *big.Int }
type PendingNewMarkets ¶
type PendingNewMarkets struct {
dexproto.PendingNewMarkets
}
func GetPendingNewMarkets ¶
func GetPendingNewMarkets(db vm_db.VmDb) (pendingNewMarkets *PendingNewMarkets, ok bool)
func (*PendingNewMarkets) DeSerialize ¶
func (pnm *PendingNewMarkets) DeSerialize(data []byte) error
func (*PendingNewMarkets) Serialize ¶
func (pnm *PendingNewMarkets) Serialize() (data []byte, err error)
type PendingSetQuotes ¶
type PendingSetQuotes struct {
dexproto.PendingSetQuoteTokenActions
}
func GetPendingSetQuotes ¶
func GetPendingSetQuotes(db vm_db.VmDb) (pendingSetQuotes *PendingSetQuotes, ok bool)
func (*PendingSetQuotes) DeSerialize ¶
func (psq *PendingSetQuotes) DeSerialize(data []byte) error
func (*PendingSetQuotes) Serialize ¶
func (psq *PendingSetQuotes) Serialize() (data []byte, err error)
type PendingTransferTokenOwnerActions ¶
type PendingTransferTokenOwnerActions struct {
dexproto.PendingTransferTokenOwnerActions
}
func GetPendingTransferTokenOwners ¶
func GetPendingTransferTokenOwners(db vm_db.VmDb) (pendings *PendingTransferTokenOwnerActions, ok bool)
func (*PendingTransferTokenOwnerActions) DeSerialize ¶
func (psq *PendingTransferTokenOwnerActions) DeSerialize(data []byte) error
func (*PendingTransferTokenOwnerActions) Serialize ¶
func (psq *PendingTransferTokenOwnerActions) Serialize() (data []byte, err error)
type PeriodJobWithBizEvent ¶
type PeriodJobWithBizEvent struct {
dexproto.PeriodJobForBiz
}
func (PeriodJobWithBizEvent) FromBytes ¶
func (pb PeriodJobWithBizEvent) FromBytes(data []byte) interface{}
func (PeriodJobWithBizEvent) GetTopicId ¶
func (pb PeriodJobWithBizEvent) GetTopicId() types.Hash
type QuoteTokenTypeInfo ¶
type RevokeMarketFromAgentEvent ¶
type RevokeMarketFromAgentEvent struct {
dexproto.MarketAgentRelation
}
func (RevokeMarketFromAgentEvent) FromBytes ¶
func (rmfa RevokeMarketFromAgentEvent) FromBytes(data []byte) interface{}
func (RevokeMarketFromAgentEvent) GetTopicId ¶
func (rmfa RevokeMarketFromAgentEvent) GetTopicId() types.Hash
type SerialNo ¶
func (*SerialNo) DeSerialize ¶
type SerializableDex ¶
type SettleMakerMinedVxEvent ¶
type SettleMakerMinedVxEvent struct {
dexproto.SettleMakerMinedVx
}
func (SettleMakerMinedVxEvent) FromBytes ¶
func (smmv SettleMakerMinedVxEvent) FromBytes(data []byte) interface{}
func (SettleMakerMinedVxEvent) GetTopicId ¶
func (smmv SettleMakerMinedVxEvent) GetTopicId() types.Hash
type TokenEvent ¶
func (TokenEvent) FromBytes ¶
func (te TokenEvent) FromBytes(data []byte) interface{}
func (TokenEvent) GetTopicId ¶
func (te TokenEvent) GetTopicId() types.Hash
type TransactionEvent ¶
type TransactionEvent struct {
dexproto.Transaction
}
func (TransactionEvent) FromBytes ¶
func (tx TransactionEvent) FromBytes(data []byte) interface{}
func (TransactionEvent) GetTopicId ¶
func (tx TransactionEvent) GetTopicId() types.Hash
type UserFees ¶
func (*UserFees) DeSerialize ¶
type VIPStaking ¶
type VIPStaking struct {
dexproto.VIPStaking
}
func GetSuperVIPStaking ¶
func GetVIPStaking ¶
func (*VIPStaking) DeSerialize ¶
func (pv *VIPStaking) DeSerialize(data []byte) error
func (*VIPStaking) Serialize ¶
func (pv *VIPStaking) Serialize() (data []byte, err error)
type VxFunds ¶
func GetVxFundsWithForkCheck ¶
func GetVxLockedFunds ¶
func GetVxLockedSumFunds ¶
func (*VxFunds) DeSerialize ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.