Documentation ¶
Index ¶
- Constants
- type AcceptWithdrawLiquidity
- type AcceptedAddOrder
- type AcceptedTrade
- type AcceptedWithdrawOrder
- type AddLiquidityRequest
- func (request *AddLiquidityRequest) Amplifier() uint
- func (request *AddLiquidityRequest) CalculateSize() uint64
- func (request *AddLiquidityRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *AddLiquidityRequest) Hash() *common.Hash
- func (request *AddLiquidityRequest) MarshalJSON() ([]byte, error)
- func (request *AddLiquidityRequest) NftID() string
- func (request *AddLiquidityRequest) OtaReceiver() string
- func (request *AddLiquidityRequest) PairHash() string
- func (request *AddLiquidityRequest) PoolPairID() string
- func (request *AddLiquidityRequest) TokenAmount() uint64
- func (request *AddLiquidityRequest) TokenID() string
- func (request *AddLiquidityRequest) UnmarshalJSON(data []byte) error
- func (request *AddLiquidityRequest) ValidateMetadataByItself() bool
- func (request *AddLiquidityRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *AddLiquidityRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type AddLiquidityResponse
- func (response *AddLiquidityResponse) CalculateSize() uint64
- func (response *AddLiquidityResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *AddLiquidityResponse) Hash() *common.Hash
- func (response *AddLiquidityResponse) MarshalJSON() ([]byte, error)
- func (response *AddLiquidityResponse) Status() string
- func (response *AddLiquidityResponse) TxReqID() string
- func (response *AddLiquidityResponse) UnmarshalJSON(data []byte) error
- func (response *AddLiquidityResponse) ValidateMetadataByItself() bool
- func (response *AddLiquidityResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *AddLiquidityResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *AddLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type AddOrderRequest
- func (req *AddOrderRequest) CalculateSize() uint64
- func (req *AddOrderRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (req AddOrderRequest) Hash() *common.Hash
- func (req AddOrderRequest) ValidateMetadataByItself() bool
- func (req AddOrderRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (req AddOrderRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type AddOrderResponse
- func (res *AddOrderResponse) CalculateSize() uint64
- func (res AddOrderResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (res AddOrderResponse) Hash() *common.Hash
- func (res AddOrderResponse) ValidateMetadataByItself() bool
- func (res AddOrderResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (res AddOrderResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (res AddOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type AddOrderStatus
- type DistributeMiningOrderRewardContent
- type DistributeStakingRewardContent
- type MatchAndReturnAddLiquidity
- type MintBlockRewardContent
- type MintNftData
- type MintNftResponse
- func (response *MintNftResponse) CalculateSize() uint64
- func (response *MintNftResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *MintNftResponse) Hash() *common.Hash
- func (response *MintNftResponse) MarshalJSON() ([]byte, error)
- func (response *MintNftResponse) NftID() string
- func (response *MintNftResponse) OtaReceiver() string
- func (response *MintNftResponse) UnmarshalJSON(data []byte) error
- func (response *MintNftResponse) ValidateMetadataByItself() bool
- func (response *MintNftResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *MintNftResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *MintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type MintPDEXGenesisContent
- type MintPDEXGenesisResponse
- func (mintResponse *MintPDEXGenesisResponse) CalculateSize() uint64
- func (mintResponse MintPDEXGenesisResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (mintResponse MintPDEXGenesisResponse) Hash() *common.Hash
- func (mintResponse *MintPDEXGenesisResponse) SetSharedRandom(r []byte)
- func (mintResponse MintPDEXGenesisResponse) ValidateMetadataByItself() bool
- func (mintResponse MintPDEXGenesisResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (mintResponse MintPDEXGenesisResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (mintResponse MintPDEXGenesisResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type ParamsModifyingContent
- type ParamsModifyingRequest
- func (paramsModifying *ParamsModifyingRequest) CalculateSize() uint64
- func (paramsModifying ParamsModifyingRequest) Hash() *common.Hash
- func (paramsModifying ParamsModifyingRequest) HashWithoutSig() *common.Hash
- func (paramsModifying ParamsModifyingRequest) ValidateMetadataByItself() bool
- func (paramsModifying ParamsModifyingRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (paramsModifying ParamsModifyingRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type ParamsModifyingRequestStatus
- type Pdexv3Params
- type ReceiverInfo
- type RefundAddLiquidity
- type RefundedAddOrder
- type RefundedTrade
- type RejectedWithdrawOrder
- type StakingRequest
- func (request *StakingRequest) CalculateSize() uint64
- func (request *StakingRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *StakingRequest) Hash() *common.Hash
- func (request *StakingRequest) MarshalJSON() ([]byte, error)
- func (request *StakingRequest) NftID() string
- func (request *StakingRequest) OtaReceiver() string
- func (request *StakingRequest) TokenAmount() uint64
- func (request *StakingRequest) TokenID() string
- func (request *StakingRequest) UnmarshalJSON(data []byte) error
- func (request *StakingRequest) ValidateMetadataByItself() bool
- func (request *StakingRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *StakingRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type StakingResponse
- func (response *StakingResponse) CalculateSize() uint64
- func (response *StakingResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *StakingResponse) Hash() *common.Hash
- func (response *StakingResponse) MarshalJSON() ([]byte, error)
- func (response *StakingResponse) Status() string
- func (response *StakingResponse) TxReqID() string
- func (response *StakingResponse) UnmarshalJSON(data []byte) error
- func (response *StakingResponse) ValidateMetadataByItself() bool
- func (response *StakingResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *StakingResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *StakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type TradeRequest
- func (req *TradeRequest) CalculateSize() uint64
- func (req TradeRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (req TradeRequest) Hash() *common.Hash
- func (req TradeRequest) ValidateMetadataByItself() bool
- func (req TradeRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (req TradeRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type TradeResponse
- func (res *TradeResponse) CalculateSize() uint64
- func (res TradeResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (res TradeResponse) Hash() *common.Hash
- func (res TradeResponse) ValidateMetadataByItself() bool
- func (res TradeResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (res TradeResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (res TradeResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type TradeStatus
- type UnstakingRequest
- func (request *UnstakingRequest) CalculateSize() uint64
- func (request *UnstakingRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *UnstakingRequest) Hash() *common.Hash
- func (request *UnstakingRequest) MarshalJSON() ([]byte, error)
- func (request *UnstakingRequest) NftID() string
- func (request *UnstakingRequest) OtaReceivers() map[string]string
- func (request *UnstakingRequest) StakingPoolID() string
- func (request *UnstakingRequest) UnmarshalJSON(data []byte) error
- func (request *UnstakingRequest) UnstakingAmount() uint64
- func (request *UnstakingRequest) ValidateMetadataByItself() bool
- func (request *UnstakingRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *UnstakingRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type UnstakingResponse
- func (response *UnstakingResponse) CalculateSize() uint64
- func (response *UnstakingResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *UnstakingResponse) Hash() *common.Hash
- func (response *UnstakingResponse) MarshalJSON() ([]byte, error)
- func (response *UnstakingResponse) Status() string
- func (response *UnstakingResponse) TxReqID() string
- func (response *UnstakingResponse) UnmarshalJSON(data []byte) error
- func (response *UnstakingResponse) ValidateMetadataByItself() bool
- func (response *UnstakingResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *UnstakingResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *UnstakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type UserMintNftRequest
- func (request *UserMintNftRequest) Amount() uint64
- func (request *UserMintNftRequest) CalculateSize() uint64
- func (request *UserMintNftRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *UserMintNftRequest) Hash() *common.Hash
- func (request *UserMintNftRequest) MarshalJSON() ([]byte, error)
- func (request *UserMintNftRequest) OtaReceiver() string
- func (request *UserMintNftRequest) UnmarshalJSON(data []byte) error
- func (request *UserMintNftRequest) ValidateMetadataByItself() bool
- func (request *UserMintNftRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *UserMintNftRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type UserMintNftResponse
- func (response *UserMintNftResponse) CalculateSize() uint64
- func (response *UserMintNftResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *UserMintNftResponse) Hash() *common.Hash
- func (response *UserMintNftResponse) MarshalJSON() ([]byte, error)
- func (response *UserMintNftResponse) Status() string
- func (response *UserMintNftResponse) TxReqID() string
- func (response *UserMintNftResponse) UnmarshalJSON(data []byte) error
- func (response *UserMintNftResponse) ValidateMetadataByItself() bool
- func (response *UserMintNftResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *UserMintNftResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *UserMintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawLiquidityRequest
- func (request *WithdrawLiquidityRequest) CalculateSize() uint64
- func (request *WithdrawLiquidityRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (request *WithdrawLiquidityRequest) Hash() *common.Hash
- func (request *WithdrawLiquidityRequest) MarshalJSON() ([]byte, error)
- func (request *WithdrawLiquidityRequest) NftID() string
- func (request *WithdrawLiquidityRequest) OtaReceivers() map[string]string
- func (request *WithdrawLiquidityRequest) PoolPairID() string
- func (request *WithdrawLiquidityRequest) ShareAmount() uint64
- func (request *WithdrawLiquidityRequest) UnmarshalJSON(data []byte) error
- func (request *WithdrawLiquidityRequest) ValidateMetadataByItself() bool
- func (request *WithdrawLiquidityRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (request *WithdrawLiquidityRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type WithdrawLiquidityResponse
- func (response *WithdrawLiquidityResponse) CalculateSize() uint64
- func (response *WithdrawLiquidityResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (response *WithdrawLiquidityResponse) Hash() *common.Hash
- func (response *WithdrawLiquidityResponse) MarshalJSON() ([]byte, error)
- func (response *WithdrawLiquidityResponse) Status() string
- func (response *WithdrawLiquidityResponse) TxReqID() string
- func (response *WithdrawLiquidityResponse) UnmarshalJSON(data []byte) error
- func (response *WithdrawLiquidityResponse) ValidateMetadataByItself() bool
- func (response *WithdrawLiquidityResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (response *WithdrawLiquidityResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (response *WithdrawLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawOrderRequest
- func (req *WithdrawOrderRequest) CalculateSize() uint64
- func (req *WithdrawOrderRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (req WithdrawOrderRequest) Hash() *common.Hash
- func (req WithdrawOrderRequest) ValidateMetadataByItself() bool
- func (req WithdrawOrderRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (req WithdrawOrderRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type WithdrawOrderResponse
- func (res *WithdrawOrderResponse) CalculateSize() uint64
- func (res WithdrawOrderResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (res WithdrawOrderResponse) Hash() *common.Hash
- func (res WithdrawOrderResponse) ValidateMetadataByItself() bool
- func (res WithdrawOrderResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (res WithdrawOrderResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (res WithdrawOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawOrderStatus
- type WithdrawalLPFeeContent
- type WithdrawalLPFeeRequest
- func (withdrawal *WithdrawalLPFeeRequest) CalculateSize() uint64
- func (withdrawal *WithdrawalLPFeeRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (withdrawal WithdrawalLPFeeRequest) Hash() *common.Hash
- func (withdrawal WithdrawalLPFeeRequest) ValidateMetadataByItself() bool
- func (withdrawal WithdrawalLPFeeRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawal WithdrawalLPFeeRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type WithdrawalLPFeeResponse
- func (withdrawalResponse *WithdrawalLPFeeResponse) CalculateSize() uint64
- func (withdrawalResponse WithdrawalLPFeeResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (withdrawalResponse WithdrawalLPFeeResponse) Hash() *common.Hash
- func (withdrawalResponse WithdrawalLPFeeResponse) ValidateMetadataByItself() bool
- func (withdrawalResponse WithdrawalLPFeeResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawalResponse WithdrawalLPFeeResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (withdrawalResponse WithdrawalLPFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawalLPFeeStatus
- type WithdrawalProtocolFeeContent
- type WithdrawalProtocolFeeRequest
- func (withdrawal *WithdrawalProtocolFeeRequest) CalculateSize() uint64
- func (withdrawal WithdrawalProtocolFeeRequest) Hash() *common.Hash
- func (withdrawal WithdrawalProtocolFeeRequest) HashWithoutSig() *common.Hash
- func (withdrawal WithdrawalProtocolFeeRequest) ValidateMetadataByItself() bool
- func (withdrawal WithdrawalProtocolFeeRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawal WithdrawalProtocolFeeRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type WithdrawalProtocolFeeResponse
- func (withdrawalResponse *WithdrawalProtocolFeeResponse) CalculateSize() uint64
- func (withdrawalResponse WithdrawalProtocolFeeResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (withdrawalResponse WithdrawalProtocolFeeResponse) Hash() *common.Hash
- func (withdrawalResponse *WithdrawalProtocolFeeResponse) SetSharedRandom(r []byte)
- func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateMetadataByItself() bool
- func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (withdrawalResponse WithdrawalProtocolFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawalProtocolFeeStatus
- type WithdrawalStakingRewardContent
- type WithdrawalStakingRewardRequest
- func (withdrawal *WithdrawalStakingRewardRequest) CalculateSize() uint64
- func (withdrawal *WithdrawalStakingRewardRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
- func (withdrawal WithdrawalStakingRewardRequest) Hash() *common.Hash
- func (withdrawal WithdrawalStakingRewardRequest) ValidateMetadataByItself() bool
- func (withdrawal WithdrawalStakingRewardRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawal WithdrawalStakingRewardRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- type WithdrawalStakingRewardResponse
- func (withdrawalResponse *WithdrawalStakingRewardResponse) CalculateSize() uint64
- func (withdrawalResponse WithdrawalStakingRewardResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, ...) bool
- func (withdrawalResponse WithdrawalStakingRewardResponse) Hash() *common.Hash
- func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateMetadataByItself() bool
- func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, ...) (bool, bool, error)
- func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ...) (bool, error)
- func (withdrawalResponse WithdrawalStakingRewardResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, ...) (bool, error)
- type WithdrawalStakingRewardStatus
Constants ¶
const ( BaseAmplifier = 10000 MaxPoolPairWithdrawalReceiver = 5 MaxStakingRewardWithdrawalReceiver = 15 )
const ( RequestAcceptedChainStatus = "accepted" RequestRejectedChainStatus = "rejected" ParamsModifyingFailedStatus = 0 ParamsModifyingSuccessStatus = 1 WithdrawLPFeeFailedStatus = 0 WithdrawLPFeeSuccessStatus = 1 WithdrawProtocolFeeFailedStatus = 0 WithdrawProtocolFeeSuccessStatus = 1 WithdrawStakingRewardFailedStatus = 0 WithdrawStakingRewardSuccessStatus = 1 )
const ( TradeAcceptedStatus = 1 TradeRefundedStatus = 0 OrderAcceptedStatus = 1 OrderRefundedStatus = 0 WithdrawOrderAcceptedStatus = 1 WithdrawOrderRejectedStatus = 0 MaxTradePathLength = 5 )
trade status
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptWithdrawLiquidity ¶
type AcceptedAddOrder ¶
type AcceptedAddOrder struct { PoolPairID string `json:"PoolPairID"` OrderID string `json:"OrderID"` NftID common.Hash `json:"NftID"` Token0Rate uint64 `json:"Token0Rate"` Token1Rate uint64 `json:"Token1Rate"` Token0Balance uint64 `json:"Token0Balance"` Token1Balance uint64 `json:"Token1Balance"` TradeDirection byte `json:"TradeDirection"` Receiver [2]string `json:"Receiver"` }
AcceptedAddOrder is added as Content for produced beacon instruction after to handling an order successfully
func (AcceptedAddOrder) GetStatus ¶
func (md AcceptedAddOrder) GetStatus() int
func (AcceptedAddOrder) GetType ¶
func (md AcceptedAddOrder) GetType() int
type AcceptedTrade ¶
type AcceptedTrade struct { Receiver privacy.OTAReceiver `json:"Receiver"` Amount uint64 `json:"Amount"` TradePath []string `json:"TradePath"` TokenToBuy common.Hash `json:"TokenToBuy"` PairChanges [][2]*big.Int `json:"PairChanges"` RewardEarned []map[common.Hash]uint64 `json:"RewardEarned"` OrderChanges []map[string][2]*big.Int `json:"OrderChanges"` }
AcceptedTrade is added as Content for produced beacon Instructions after handling a trade successfully
func (AcceptedTrade) GetStatus ¶
func (md AcceptedTrade) GetStatus() int
func (AcceptedTrade) GetType ¶
func (md AcceptedTrade) GetType() int
type AcceptedWithdrawOrder ¶
type AcceptedWithdrawOrder struct { PoolPairID string `json:"PoolPairID"` OrderID string `json:"OrderID"` TokenID common.Hash `json:"TokenID"` Receiver privacy.OTAReceiver `json:"Receiver"` Amount uint64 `json:"Amount"` }
func (AcceptedWithdrawOrder) GetStatus ¶
func (md AcceptedWithdrawOrder) GetStatus() int
func (AcceptedWithdrawOrder) GetType ¶
func (md AcceptedWithdrawOrder) GetType() int
type AddLiquidityRequest ¶
type AddLiquidityRequest struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewAddLiquidity ¶
func NewAddLiquidity() *AddLiquidityRequest
func NewAddLiquidityRequestWithValue ¶
func NewAddLiquidityRequestWithValue( poolPairID, pairHash, otaReceiver, tokenID, nftID string, tokenAmount uint64, amplifier uint, ) *AddLiquidityRequest
func (*AddLiquidityRequest) Amplifier ¶
func (request *AddLiquidityRequest) Amplifier() uint
func (*AddLiquidityRequest) CalculateSize ¶
func (request *AddLiquidityRequest) CalculateSize() uint64
func (*AddLiquidityRequest) GetOTADeclarations ¶
func (request *AddLiquidityRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (*AddLiquidityRequest) Hash ¶
func (request *AddLiquidityRequest) Hash() *common.Hash
func (*AddLiquidityRequest) MarshalJSON ¶
func (request *AddLiquidityRequest) MarshalJSON() ([]byte, error)
func (*AddLiquidityRequest) NftID ¶
func (request *AddLiquidityRequest) NftID() string
func (*AddLiquidityRequest) OtaReceiver ¶
func (request *AddLiquidityRequest) OtaReceiver() string
func (*AddLiquidityRequest) PairHash ¶
func (request *AddLiquidityRequest) PairHash() string
func (*AddLiquidityRequest) PoolPairID ¶
func (request *AddLiquidityRequest) PoolPairID() string
func (*AddLiquidityRequest) TokenAmount ¶
func (request *AddLiquidityRequest) TokenAmount() uint64
func (*AddLiquidityRequest) TokenID ¶
func (request *AddLiquidityRequest) TokenID() string
func (*AddLiquidityRequest) UnmarshalJSON ¶
func (request *AddLiquidityRequest) UnmarshalJSON(data []byte) error
func (*AddLiquidityRequest) ValidateMetadataByItself ¶
func (request *AddLiquidityRequest) ValidateMetadataByItself() bool
func (*AddLiquidityRequest) ValidateSanityData ¶
func (request *AddLiquidityRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*AddLiquidityRequest) ValidateTxWithBlockChain ¶
func (request *AddLiquidityRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
type AddLiquidityResponse ¶
type AddLiquidityResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewAddLiquidityResponse ¶
func NewAddLiquidityResponse() *AddLiquidityResponse
func NewAddLiquidityResponseWithValue ¶
func NewAddLiquidityResponseWithValue( status, txReqID string, ) *AddLiquidityResponse
func NewStakingResponseWithValue ¶
func NewStakingResponseWithValue( status, txReqID string, ) *AddLiquidityResponse
func (*AddLiquidityResponse) CalculateSize ¶
func (response *AddLiquidityResponse) CalculateSize() uint64
func (*AddLiquidityResponse) CheckTransactionFee ¶
func (response *AddLiquidityResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*AddLiquidityResponse) Hash ¶
func (response *AddLiquidityResponse) Hash() *common.Hash
func (*AddLiquidityResponse) MarshalJSON ¶
func (response *AddLiquidityResponse) MarshalJSON() ([]byte, error)
func (*AddLiquidityResponse) Status ¶
func (response *AddLiquidityResponse) Status() string
func (*AddLiquidityResponse) TxReqID ¶
func (response *AddLiquidityResponse) TxReqID() string
func (*AddLiquidityResponse) UnmarshalJSON ¶
func (response *AddLiquidityResponse) UnmarshalJSON(data []byte) error
func (*AddLiquidityResponse) ValidateMetadataByItself ¶
func (response *AddLiquidityResponse) ValidateMetadataByItself() bool
func (*AddLiquidityResponse) ValidateSanityData ¶
func (response *AddLiquidityResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*AddLiquidityResponse) ValidateTxWithBlockChain ¶
func (response *AddLiquidityResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*AddLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *AddLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type AddOrderRequest ¶
type AddOrderRequest struct { TokenToSell common.Hash `json:"TokenToSell"` PoolPairID string `json:"PoolPairID"` SellAmount uint64 `json:"SellAmount"` MinAcceptableAmount uint64 `json:"MinAcceptableAmount"` Receiver map[common.Hash]privacy.OTAReceiver `json:"Receiver"` NftID common.Hash `json:"NftID"` metadataCommon.MetadataBase }
AddOrderRequest
func NewAddOrderRequest ¶
func (*AddOrderRequest) CalculateSize ¶
func (req *AddOrderRequest) CalculateSize() uint64
func (*AddOrderRequest) GetOTADeclarations ¶
func (req *AddOrderRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (AddOrderRequest) Hash ¶
func (req AddOrderRequest) Hash() *common.Hash
func (AddOrderRequest) ValidateMetadataByItself ¶
func (req AddOrderRequest) ValidateMetadataByItself() bool
func (AddOrderRequest) ValidateSanityData ¶
func (req AddOrderRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (AddOrderRequest) ValidateTxWithBlockChain ¶
func (req AddOrderRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
type AddOrderResponse ¶
type AddOrderResponse struct { Status int `json:"Status"` RequestTxID common.Hash `json:"RequestTxID"` metadataCommon.MetadataBase }
AddOrderResponse is the metadata inside response tx for `add order` (applicable for refunded case only)
func (*AddOrderResponse) CalculateSize ¶
func (res *AddOrderResponse) CalculateSize() uint64
func (AddOrderResponse) CheckTransactionFee ¶
func (res AddOrderResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (AddOrderResponse) Hash ¶
func (res AddOrderResponse) Hash() *common.Hash
func (AddOrderResponse) ValidateMetadataByItself ¶
func (res AddOrderResponse) ValidateMetadataByItself() bool
func (AddOrderResponse) ValidateSanityData ¶
func (res AddOrderResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (AddOrderResponse) ValidateTxWithBlockChain ¶
func (res AddOrderResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
func (AddOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (res AddOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)
type AddOrderStatus ¶
AddOrderStatus containns the info tracked by feature statedb, which is then displayed in RPC status queries. For refunded `add order` requests, all fields except Status are ignored
type MatchAndReturnAddLiquidity ¶
type MatchAndReturnAddLiquidity struct { Contribution *statedb.Pdexv3ContributionState `json:"Contribution"` ReturnAmount uint64 `json:"ReturnAmount"` ExistedTokenActualAmount uint64 `json:"ExistedTokenActualAmount"` ExistedTokenReturnAmount uint64 `json:"ExistedTokenReturnAmount"` ExistedTokenID common.Hash `json:"ExistedTokenID"` NftID common.Hash `json:"NftID"` }
type MintBlockRewardContent ¶
type MintNftData ¶
type MintNftResponse ¶
type MintNftResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewMintNftResponse ¶
func NewMintNftResponse() *MintNftResponse
func NewMintNftResponseWithValue ¶
func NewMintNftResponseWithValue(nftID, otaReceiver string) *MintNftResponse
func (*MintNftResponse) CalculateSize ¶
func (response *MintNftResponse) CalculateSize() uint64
func (*MintNftResponse) CheckTransactionFee ¶
func (response *MintNftResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*MintNftResponse) Hash ¶
func (response *MintNftResponse) Hash() *common.Hash
func (*MintNftResponse) MarshalJSON ¶
func (response *MintNftResponse) MarshalJSON() ([]byte, error)
func (*MintNftResponse) NftID ¶
func (response *MintNftResponse) NftID() string
func (*MintNftResponse) OtaReceiver ¶
func (response *MintNftResponse) OtaReceiver() string
func (*MintNftResponse) UnmarshalJSON ¶
func (response *MintNftResponse) UnmarshalJSON(data []byte) error
func (*MintNftResponse) ValidateMetadataByItself ¶
func (response *MintNftResponse) ValidateMetadataByItself() bool
func (*MintNftResponse) ValidateSanityData ¶
func (response *MintNftResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*MintNftResponse) ValidateTxWithBlockChain ¶
func (response *MintNftResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*MintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *MintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type MintPDEXGenesisContent ¶
type MintPDEXGenesisResponse ¶
type MintPDEXGenesisResponse struct { metadataCommon.MetadataBase MintingPaymentAddress string `json:"MintingPaymentAddress"` MintingAmount uint64 `json:"MintingAmount"` }
func NewPdexv3MintPDEXGenesisResponse ¶
func NewPdexv3MintPDEXGenesisResponse( metaType int, mintingPaymentAddress string, mintingAmount uint64, ) *MintPDEXGenesisResponse
func (*MintPDEXGenesisResponse) CalculateSize ¶
func (mintResponse *MintPDEXGenesisResponse) CalculateSize() uint64
func (MintPDEXGenesisResponse) CheckTransactionFee ¶
func (mintResponse MintPDEXGenesisResponse) CheckTransactionFee( tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB, ) bool
func (MintPDEXGenesisResponse) Hash ¶
func (mintResponse MintPDEXGenesisResponse) Hash() *common.Hash
func (*MintPDEXGenesisResponse) SetSharedRandom ¶
func (mintResponse *MintPDEXGenesisResponse) SetSharedRandom(r []byte)
func (MintPDEXGenesisResponse) ValidateMetadataByItself ¶
func (mintResponse MintPDEXGenesisResponse) ValidateMetadataByItself() bool
func (MintPDEXGenesisResponse) ValidateSanityData ¶
func (mintResponse MintPDEXGenesisResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (MintPDEXGenesisResponse) ValidateTxWithBlockChain ¶
func (mintResponse MintPDEXGenesisResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
func (MintPDEXGenesisResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (mintResponse MintPDEXGenesisResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type ParamsModifyingContent ¶
type ParamsModifyingContent struct { Content Pdexv3Params `json:"Content"` ErrorMsg string `json:"ErrorMsg"` TxReqID common.Hash `json:"TxReqID"` ShardID byte `json:"ShardID"` }
type ParamsModifyingRequest ¶
type ParamsModifyingRequest struct { metadataCommon.MetadataBaseWithSignature Pdexv3Params `json:"Pdexv3Params"` }
func NewPdexv3ParamsModifyingRequest ¶
func NewPdexv3ParamsModifyingRequest( metaType int, params Pdexv3Params, ) (*ParamsModifyingRequest, error)
func (*ParamsModifyingRequest) CalculateSize ¶
func (paramsModifying *ParamsModifyingRequest) CalculateSize() uint64
func (ParamsModifyingRequest) Hash ¶
func (paramsModifying ParamsModifyingRequest) Hash() *common.Hash
func (ParamsModifyingRequest) HashWithoutSig ¶
func (paramsModifying ParamsModifyingRequest) HashWithoutSig() *common.Hash
func (ParamsModifyingRequest) ValidateMetadataByItself ¶
func (paramsModifying ParamsModifyingRequest) ValidateMetadataByItself() bool
func (ParamsModifyingRequest) ValidateSanityData ¶
func (paramsModifying ParamsModifyingRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (ParamsModifyingRequest) ValidateTxWithBlockChain ¶
func (paramsModifying ParamsModifyingRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
type ParamsModifyingRequestStatus ¶
type ParamsModifyingRequestStatus struct { Status int `json:"Status"` ErrorMsg string `json:"ErrorMsg"` Pdexv3Params `json:"Pdexv3Params"` }
type Pdexv3Params ¶
type Pdexv3Params struct { DefaultFeeRateBPS uint `json:"DefaultFeeRateBPS"` FeeRateBPS map[string]uint `json:"FeeRateBPS"` PRVDiscountPercent uint `json:"PRVDiscountPercent"` TradingProtocolFeePercent uint `json:"TradingProtocolFeePercent"` TradingStakingPoolRewardPercent uint `json:"TradingStakingPoolRewardPercent"` StakingRewardTokens []common.Hash `json:"StakingRewardTokens"` MintNftRequireAmount uint64 `json:"MintNftRequireAmount"` MaxOrdersPerNft uint `json:"MaxOrdersPerNft"` AutoWithdrawOrderLimitAmount uint `json:"AutoWithdrawOrderLimitAmount"` MinPRVReserveTradingRate uint64 `json:"MinPRVReserveTradingRate"` DefaultOrderTradingRewardRatioBPS uint `json:"DefaultOrderTradingRewardRatioBPS,omitempty"` OrderTradingRewardRatioBPS map[string]uint `json:"OrderTradingRewardRatioBPS,omitempty"` OrderLiquidityMiningBPS map[string]uint `json:"OrderLiquidityMiningBPS,omitempty"` DAOContributingPercent uint `json:"DAOContributingPercent,omitempty"` MiningRewardPendingBlocks uint64 `json:"MiningRewardPendingBlocks,omitempty"` OrderMiningRewardRatioBPS map[string]uint `json:"OrderMiningRewardRatioBPS,omitempty"` }
type ReceiverInfo ¶
type ReceiverInfo struct { Address privacy.OTAReceiver `json:"Address"` Amount uint64 `json:"Amount"` }
type RefundAddLiquidity ¶
type RefundAddLiquidity struct {
Contribution *statedb.Pdexv3ContributionState `json:"Contribution"`
}
type RefundedAddOrder ¶
type RefundedAddOrder struct { Receiver privacy.OTAReceiver `json:"Receiver"` TokenID common.Hash `json:"TokenID"` Amount uint64 `json:"Amount"` }
RefundedAddOrder is added as Content for produced beacon instruction after failure to handle an order
func (RefundedAddOrder) GetStatus ¶
func (md RefundedAddOrder) GetStatus() int
func (RefundedAddOrder) GetType ¶
func (md RefundedAddOrder) GetType() int
type RefundedTrade ¶
type RefundedTrade struct { Receiver privacy.OTAReceiver `json:"Receiver"` TokenID common.Hash `json:"TokenToSell"` Amount uint64 `json:"Amount"` }
RefundedTrade is added as Content for produced beacon instruction after failure to handle a trade
func (RefundedTrade) GetStatus ¶
func (md RefundedTrade) GetStatus() int
func (RefundedTrade) GetType ¶
func (md RefundedTrade) GetType() int
type RejectedWithdrawOrder ¶
type RejectedWithdrawOrder struct { PoolPairID string `json:"PoolPairID"` OrderID string `json:"OrderID"` }
func (RejectedWithdrawOrder) GetStatus ¶
func (md RejectedWithdrawOrder) GetStatus() int
func (RejectedWithdrawOrder) GetType ¶
func (md RejectedWithdrawOrder) GetType() int
type StakingRequest ¶
type StakingRequest struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewStakingRequest ¶
func NewStakingRequest() *StakingRequest
func NewStakingRequestWithValue ¶
func NewStakingRequestWithValue( tokenID, nftID, otaReceiver string, tokenAmount uint64, ) *StakingRequest
func (*StakingRequest) CalculateSize ¶
func (request *StakingRequest) CalculateSize() uint64
func (*StakingRequest) GetOTADeclarations ¶
func (request *StakingRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (*StakingRequest) Hash ¶
func (request *StakingRequest) Hash() *common.Hash
func (*StakingRequest) MarshalJSON ¶
func (request *StakingRequest) MarshalJSON() ([]byte, error)
func (*StakingRequest) NftID ¶
func (request *StakingRequest) NftID() string
func (*StakingRequest) OtaReceiver ¶
func (request *StakingRequest) OtaReceiver() string
func (*StakingRequest) TokenAmount ¶
func (request *StakingRequest) TokenAmount() uint64
func (*StakingRequest) TokenID ¶
func (request *StakingRequest) TokenID() string
func (*StakingRequest) UnmarshalJSON ¶
func (request *StakingRequest) UnmarshalJSON(data []byte) error
func (*StakingRequest) ValidateMetadataByItself ¶
func (request *StakingRequest) ValidateMetadataByItself() bool
func (*StakingRequest) ValidateSanityData ¶
func (request *StakingRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*StakingRequest) ValidateTxWithBlockChain ¶
func (request *StakingRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
type StakingResponse ¶
type StakingResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewStakingResponse ¶
func NewStakingResponse() *StakingResponse
func (*StakingResponse) CalculateSize ¶
func (response *StakingResponse) CalculateSize() uint64
func (*StakingResponse) CheckTransactionFee ¶
func (response *StakingResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*StakingResponse) Hash ¶
func (response *StakingResponse) Hash() *common.Hash
func (*StakingResponse) MarshalJSON ¶
func (response *StakingResponse) MarshalJSON() ([]byte, error)
func (*StakingResponse) Status ¶
func (response *StakingResponse) Status() string
func (*StakingResponse) TxReqID ¶
func (response *StakingResponse) TxReqID() string
func (*StakingResponse) UnmarshalJSON ¶
func (response *StakingResponse) UnmarshalJSON(data []byte) error
func (*StakingResponse) ValidateMetadataByItself ¶
func (response *StakingResponse) ValidateMetadataByItself() bool
func (*StakingResponse) ValidateSanityData ¶
func (response *StakingResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*StakingResponse) ValidateTxWithBlockChain ¶
func (response *StakingResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*StakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *StakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type TradeRequest ¶
type TradeRequest struct { TradePath []string `json:"TradePath"` TokenToSell common.Hash `json:"TokenToSell"` SellAmount uint64 `json:"SellAmount"` MinAcceptableAmount uint64 `json:"MinAcceptableAmount"` TradingFee uint64 `json:"TradingFee"` Receiver map[common.Hash]privacy.OTAReceiver `json:"Receiver"` metadataCommon.MetadataBase }
TradeRequest
func NewTradeRequest ¶
func (*TradeRequest) CalculateSize ¶
func (req *TradeRequest) CalculateSize() uint64
func (TradeRequest) GetOTADeclarations ¶
func (req TradeRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (TradeRequest) Hash ¶
func (req TradeRequest) Hash() *common.Hash
func (TradeRequest) ValidateMetadataByItself ¶
func (req TradeRequest) ValidateMetadataByItself() bool
func (TradeRequest) ValidateSanityData ¶
func (req TradeRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (TradeRequest) ValidateTxWithBlockChain ¶
func (req TradeRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
type TradeResponse ¶
type TradeResponse struct { Status int `json:"Status"` RequestTxID common.Hash `json:"RequestTxID"` metadataCommon.MetadataBase }
TradeResponse is the metadata inside response tx for trade
func (*TradeResponse) CalculateSize ¶
func (res *TradeResponse) CalculateSize() uint64
func (TradeResponse) CheckTransactionFee ¶
func (res TradeResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (TradeResponse) Hash ¶
func (res TradeResponse) Hash() *common.Hash
func (TradeResponse) ValidateMetadataByItself ¶
func (res TradeResponse) ValidateMetadataByItself() bool
func (TradeResponse) ValidateSanityData ¶
func (res TradeResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (TradeResponse) ValidateTxWithBlockChain ¶
func (res TradeResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
func (TradeResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (res TradeResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)
type TradeStatus ¶
type TradeStatus struct { Status int `json:"Status"` BuyAmount uint64 `json:"BuyAmount"` TokenToBuy common.Hash `json:"TokenToBuy"` }
TradeStatus containns the info tracked by feature statedb, which is then displayed in RPC status queries. For refunded trade, all fields except Status are ignored
type UnstakingRequest ¶
type UnstakingRequest struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewUnstakingRequest ¶
func NewUnstakingRequest() *UnstakingRequest
func NewUnstakingRequestWithValue ¶
func NewUnstakingRequestWithValue( stakingPoolID, nftID string, otaReceivers map[string]string, unstakingAmount uint64, ) *UnstakingRequest
func (*UnstakingRequest) CalculateSize ¶
func (request *UnstakingRequest) CalculateSize() uint64
func (*UnstakingRequest) GetOTADeclarations ¶
func (request *UnstakingRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (*UnstakingRequest) Hash ¶
func (request *UnstakingRequest) Hash() *common.Hash
func (*UnstakingRequest) MarshalJSON ¶
func (request *UnstakingRequest) MarshalJSON() ([]byte, error)
func (*UnstakingRequest) NftID ¶
func (request *UnstakingRequest) NftID() string
func (*UnstakingRequest) OtaReceivers ¶
func (request *UnstakingRequest) OtaReceivers() map[string]string
func (*UnstakingRequest) StakingPoolID ¶
func (request *UnstakingRequest) StakingPoolID() string
func (*UnstakingRequest) UnmarshalJSON ¶
func (request *UnstakingRequest) UnmarshalJSON(data []byte) error
func (*UnstakingRequest) UnstakingAmount ¶
func (request *UnstakingRequest) UnstakingAmount() uint64
func (*UnstakingRequest) ValidateMetadataByItself ¶
func (request *UnstakingRequest) ValidateMetadataByItself() bool
func (*UnstakingRequest) ValidateSanityData ¶
func (request *UnstakingRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*UnstakingRequest) ValidateTxWithBlockChain ¶
func (request *UnstakingRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
type UnstakingResponse ¶
type UnstakingResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewUnstakingResponse ¶
func NewUnstakingResponse() *UnstakingResponse
func NewUnstakingResponseWithValue ¶
func NewUnstakingResponseWithValue(status, txReqID string) *UnstakingResponse
func (*UnstakingResponse) CalculateSize ¶
func (response *UnstakingResponse) CalculateSize() uint64
func (*UnstakingResponse) CheckTransactionFee ¶
func (response *UnstakingResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*UnstakingResponse) Hash ¶
func (response *UnstakingResponse) Hash() *common.Hash
func (*UnstakingResponse) MarshalJSON ¶
func (response *UnstakingResponse) MarshalJSON() ([]byte, error)
func (*UnstakingResponse) Status ¶
func (response *UnstakingResponse) Status() string
func (*UnstakingResponse) TxReqID ¶
func (response *UnstakingResponse) TxReqID() string
func (*UnstakingResponse) UnmarshalJSON ¶
func (response *UnstakingResponse) UnmarshalJSON(data []byte) error
func (*UnstakingResponse) ValidateMetadataByItself ¶
func (response *UnstakingResponse) ValidateMetadataByItself() bool
func (*UnstakingResponse) ValidateSanityData ¶
func (response *UnstakingResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*UnstakingResponse) ValidateTxWithBlockChain ¶
func (response *UnstakingResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*UnstakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *UnstakingResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type UserMintNftRequest ¶
type UserMintNftRequest struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewUserMintNftRequest ¶
func NewUserMintNftRequest() *UserMintNftRequest
func NewUserMintNftRequestWithValue ¶
func NewUserMintNftRequestWithValue(otaReceiver string, amount uint64) *UserMintNftRequest
func (*UserMintNftRequest) Amount ¶
func (request *UserMintNftRequest) Amount() uint64
func (*UserMintNftRequest) CalculateSize ¶
func (request *UserMintNftRequest) CalculateSize() uint64
func (*UserMintNftRequest) GetOTADeclarations ¶
func (request *UserMintNftRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (*UserMintNftRequest) Hash ¶
func (request *UserMintNftRequest) Hash() *common.Hash
func (*UserMintNftRequest) MarshalJSON ¶
func (request *UserMintNftRequest) MarshalJSON() ([]byte, error)
func (*UserMintNftRequest) OtaReceiver ¶
func (request *UserMintNftRequest) OtaReceiver() string
func (*UserMintNftRequest) UnmarshalJSON ¶
func (request *UserMintNftRequest) UnmarshalJSON(data []byte) error
func (*UserMintNftRequest) ValidateMetadataByItself ¶
func (request *UserMintNftRequest) ValidateMetadataByItself() bool
func (*UserMintNftRequest) ValidateSanityData ¶
func (request *UserMintNftRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*UserMintNftRequest) ValidateTxWithBlockChain ¶
func (request *UserMintNftRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
type UserMintNftResponse ¶
type UserMintNftResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewUserMintNftResponse ¶
func NewUserMintNftResponse() *UserMintNftResponse
func NewUserMintNftResponseWithValue ¶
func NewUserMintNftResponseWithValue(status, txReqID string) *UserMintNftResponse
func (*UserMintNftResponse) CalculateSize ¶
func (response *UserMintNftResponse) CalculateSize() uint64
func (*UserMintNftResponse) CheckTransactionFee ¶
func (response *UserMintNftResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*UserMintNftResponse) Hash ¶
func (response *UserMintNftResponse) Hash() *common.Hash
func (*UserMintNftResponse) MarshalJSON ¶
func (response *UserMintNftResponse) MarshalJSON() ([]byte, error)
func (*UserMintNftResponse) Status ¶
func (response *UserMintNftResponse) Status() string
func (*UserMintNftResponse) TxReqID ¶
func (response *UserMintNftResponse) TxReqID() string
func (*UserMintNftResponse) UnmarshalJSON ¶
func (response *UserMintNftResponse) UnmarshalJSON(data []byte) error
func (*UserMintNftResponse) ValidateMetadataByItself ¶
func (response *UserMintNftResponse) ValidateMetadataByItself() bool
func (*UserMintNftResponse) ValidateSanityData ¶
func (response *UserMintNftResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*UserMintNftResponse) ValidateTxWithBlockChain ¶
func (response *UserMintNftResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*UserMintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *UserMintNftResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type WithdrawLiquidityRequest ¶
type WithdrawLiquidityRequest struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewWithdrawLiquidityRequest ¶
func NewWithdrawLiquidityRequest() *WithdrawLiquidityRequest
func NewWithdrawLiquidityRequestWithValue ¶
func NewWithdrawLiquidityRequestWithValue( poolPairID, nftID string, otaReceivers map[string]string, shareAmount uint64, ) *WithdrawLiquidityRequest
func (*WithdrawLiquidityRequest) CalculateSize ¶
func (request *WithdrawLiquidityRequest) CalculateSize() uint64
func (*WithdrawLiquidityRequest) GetOTADeclarations ¶
func (request *WithdrawLiquidityRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (*WithdrawLiquidityRequest) Hash ¶
func (request *WithdrawLiquidityRequest) Hash() *common.Hash
func (*WithdrawLiquidityRequest) MarshalJSON ¶
func (request *WithdrawLiquidityRequest) MarshalJSON() ([]byte, error)
func (*WithdrawLiquidityRequest) NftID ¶
func (request *WithdrawLiquidityRequest) NftID() string
func (*WithdrawLiquidityRequest) OtaReceivers ¶
func (request *WithdrawLiquidityRequest) OtaReceivers() map[string]string
func (*WithdrawLiquidityRequest) PoolPairID ¶
func (request *WithdrawLiquidityRequest) PoolPairID() string
func (*WithdrawLiquidityRequest) ShareAmount ¶
func (request *WithdrawLiquidityRequest) ShareAmount() uint64
func (*WithdrawLiquidityRequest) UnmarshalJSON ¶
func (request *WithdrawLiquidityRequest) UnmarshalJSON(data []byte) error
func (*WithdrawLiquidityRequest) ValidateMetadataByItself ¶
func (request *WithdrawLiquidityRequest) ValidateMetadataByItself() bool
func (*WithdrawLiquidityRequest) ValidateSanityData ¶
func (request *WithdrawLiquidityRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*WithdrawLiquidityRequest) ValidateTxWithBlockChain ¶
func (request *WithdrawLiquidityRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
type WithdrawLiquidityResponse ¶
type WithdrawLiquidityResponse struct { metadataCommon.MetadataBase // contains filtered or unexported fields }
func NewWithdrawLiquidityResponse ¶
func NewWithdrawLiquidityResponse() *WithdrawLiquidityResponse
func NewWithdrawLiquidityResponseWithValue ¶
func NewWithdrawLiquidityResponseWithValue(status, txReqID string) *WithdrawLiquidityResponse
func (*WithdrawLiquidityResponse) CalculateSize ¶
func (response *WithdrawLiquidityResponse) CalculateSize() uint64
func (*WithdrawLiquidityResponse) CheckTransactionFee ¶
func (response *WithdrawLiquidityResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (*WithdrawLiquidityResponse) Hash ¶
func (response *WithdrawLiquidityResponse) Hash() *common.Hash
func (*WithdrawLiquidityResponse) MarshalJSON ¶
func (response *WithdrawLiquidityResponse) MarshalJSON() ([]byte, error)
func (*WithdrawLiquidityResponse) Status ¶
func (response *WithdrawLiquidityResponse) Status() string
func (*WithdrawLiquidityResponse) TxReqID ¶
func (response *WithdrawLiquidityResponse) TxReqID() string
func (*WithdrawLiquidityResponse) UnmarshalJSON ¶
func (response *WithdrawLiquidityResponse) UnmarshalJSON(data []byte) error
func (*WithdrawLiquidityResponse) ValidateMetadataByItself ¶
func (response *WithdrawLiquidityResponse) ValidateMetadataByItself() bool
func (*WithdrawLiquidityResponse) ValidateSanityData ¶
func (response *WithdrawLiquidityResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (*WithdrawLiquidityResponse) ValidateTxWithBlockChain ¶
func (response *WithdrawLiquidityResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB, ) (bool, error)
func (*WithdrawLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (response *WithdrawLiquidityResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type WithdrawOrderRequest ¶
type WithdrawOrderRequest struct { PoolPairID string `json:"PoolPairID"` OrderID string `json:"OrderID"` Amount uint64 `json:"Amount"` Receiver map[common.Hash]privacy.OTAReceiver `json:"Receiver"` NftID common.Hash `json:"NftID"` metadataCommon.MetadataBase }
WithdrawOrderRequest
func NewWithdrawOrderRequest ¶
func (*WithdrawOrderRequest) CalculateSize ¶
func (req *WithdrawOrderRequest) CalculateSize() uint64
func (*WithdrawOrderRequest) GetOTADeclarations ¶
func (req *WithdrawOrderRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (WithdrawOrderRequest) Hash ¶
func (req WithdrawOrderRequest) Hash() *common.Hash
func (WithdrawOrderRequest) ValidateMetadataByItself ¶
func (req WithdrawOrderRequest) ValidateMetadataByItself() bool
func (WithdrawOrderRequest) ValidateSanityData ¶
func (req WithdrawOrderRequest) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (WithdrawOrderRequest) ValidateTxWithBlockChain ¶
func (req WithdrawOrderRequest) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
type WithdrawOrderResponse ¶
type WithdrawOrderResponse struct { Status int `json:"Status"` RequestTxID common.Hash `json:"RequestTxID"` metadataCommon.MetadataBase }
func (*WithdrawOrderResponse) CalculateSize ¶
func (res *WithdrawOrderResponse) CalculateSize() uint64
func (WithdrawOrderResponse) CheckTransactionFee ¶
func (res WithdrawOrderResponse) CheckTransactionFee(tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB) bool
func (WithdrawOrderResponse) Hash ¶
func (res WithdrawOrderResponse) Hash() *common.Hash
func (WithdrawOrderResponse) ValidateMetadataByItself ¶
func (res WithdrawOrderResponse) ValidateMetadataByItself() bool
func (WithdrawOrderResponse) ValidateSanityData ¶
func (res WithdrawOrderResponse) ValidateSanityData(chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction) (bool, bool, error)
func (WithdrawOrderResponse) ValidateTxWithBlockChain ¶
func (res WithdrawOrderResponse) ValidateTxWithBlockChain(tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, transactionStateDB *statedb.StateDB) (bool, error)
func (WithdrawOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (res WithdrawOrderResponse) VerifyMinerCreatedTxBeforeGettingInBlock(mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever) (bool, error)
type WithdrawOrderStatus ¶
type WithdrawOrderStatus struct { Status int `json:"Status"` TokenID common.Hash `json:"TokenID"` WithdrawAmount uint64 `json:"Amount"` }
WithdrawOrderStatus containns the info tracked by feature statedb, which is then displayed in RPC status queries. For refunded `add order` requests, all fields except Status are ignored
type WithdrawalLPFeeContent ¶
type WithdrawalLPFeeRequest ¶
type WithdrawalLPFeeRequest struct { metadataCommon.MetadataBase PoolPairID string `json:"PoolPairID"` NftID common.Hash `json:"NftID"` Receivers map[common.Hash]privacy.OTAReceiver `json:"Receivers"` }
func NewPdexv3WithdrawalLPFeeRequest ¶
func NewPdexv3WithdrawalLPFeeRequest( metaType int, pairID string, nftID common.Hash, receivers map[common.Hash]privacy.OTAReceiver, ) (*WithdrawalLPFeeRequest, error)
func (*WithdrawalLPFeeRequest) CalculateSize ¶
func (withdrawal *WithdrawalLPFeeRequest) CalculateSize() uint64
func (*WithdrawalLPFeeRequest) GetOTADeclarations ¶
func (withdrawal *WithdrawalLPFeeRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (WithdrawalLPFeeRequest) Hash ¶
func (withdrawal WithdrawalLPFeeRequest) Hash() *common.Hash
func (WithdrawalLPFeeRequest) ValidateMetadataByItself ¶
func (withdrawal WithdrawalLPFeeRequest) ValidateMetadataByItself() bool
func (WithdrawalLPFeeRequest) ValidateSanityData ¶
func (withdrawal WithdrawalLPFeeRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalLPFeeRequest) ValidateTxWithBlockChain ¶
func (withdrawal WithdrawalLPFeeRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
type WithdrawalLPFeeResponse ¶
type WithdrawalLPFeeResponse struct { metadataCommon.MetadataBase ReqTxID common.Hash `json:"ReqTxID"` }
func NewPdexv3WithdrawalLPFeeResponse ¶
func NewPdexv3WithdrawalLPFeeResponse( metaType int, reqTxID common.Hash, ) *WithdrawalLPFeeResponse
func (*WithdrawalLPFeeResponse) CalculateSize ¶
func (withdrawalResponse *WithdrawalLPFeeResponse) CalculateSize() uint64
func (WithdrawalLPFeeResponse) CheckTransactionFee ¶
func (withdrawalResponse WithdrawalLPFeeResponse) CheckTransactionFee( tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB, ) bool
func (WithdrawalLPFeeResponse) Hash ¶
func (withdrawalResponse WithdrawalLPFeeResponse) Hash() *common.Hash
func (WithdrawalLPFeeResponse) ValidateMetadataByItself ¶
func (withdrawalResponse WithdrawalLPFeeResponse) ValidateMetadataByItself() bool
func (WithdrawalLPFeeResponse) ValidateSanityData ¶
func (withdrawalResponse WithdrawalLPFeeResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalLPFeeResponse) ValidateTxWithBlockChain ¶
func (withdrawalResponse WithdrawalLPFeeResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
func (WithdrawalLPFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (withdrawalResponse WithdrawalLPFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type WithdrawalLPFeeStatus ¶
type WithdrawalLPFeeStatus struct { Status int `json:"Status"` Receivers map[common.Hash]ReceiverInfo `json:"Receivers"` }
type WithdrawalProtocolFeeRequest ¶
type WithdrawalProtocolFeeRequest struct { metadataCommon.MetadataBaseWithSignature PoolPairID string `json:"PoolPairID"` }
func NewPdexv3WithdrawalProtocolFeeRequest ¶
func NewPdexv3WithdrawalProtocolFeeRequest( metaType int, pairID string, ) (*WithdrawalProtocolFeeRequest, error)
func (*WithdrawalProtocolFeeRequest) CalculateSize ¶
func (withdrawal *WithdrawalProtocolFeeRequest) CalculateSize() uint64
func (WithdrawalProtocolFeeRequest) Hash ¶
func (withdrawal WithdrawalProtocolFeeRequest) Hash() *common.Hash
func (WithdrawalProtocolFeeRequest) HashWithoutSig ¶
func (withdrawal WithdrawalProtocolFeeRequest) HashWithoutSig() *common.Hash
func (WithdrawalProtocolFeeRequest) ValidateMetadataByItself ¶
func (withdrawal WithdrawalProtocolFeeRequest) ValidateMetadataByItself() bool
func (WithdrawalProtocolFeeRequest) ValidateSanityData ¶
func (withdrawal WithdrawalProtocolFeeRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalProtocolFeeRequest) ValidateTxWithBlockChain ¶
func (withdrawal WithdrawalProtocolFeeRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
type WithdrawalProtocolFeeResponse ¶
type WithdrawalProtocolFeeResponse struct { metadataCommon.MetadataBase Address string `json:"Address"` TokenID common.Hash `json:"TokenID"` Amount uint64 `json:"Amount"` ReqTxID common.Hash `json:"ReqTxID"` }
func (*WithdrawalProtocolFeeResponse) CalculateSize ¶
func (withdrawalResponse *WithdrawalProtocolFeeResponse) CalculateSize() uint64
func (WithdrawalProtocolFeeResponse) CheckTransactionFee ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) CheckTransactionFee( tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB, ) bool
func (WithdrawalProtocolFeeResponse) Hash ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) Hash() *common.Hash
func (*WithdrawalProtocolFeeResponse) SetSharedRandom ¶
func (withdrawalResponse *WithdrawalProtocolFeeResponse) SetSharedRandom(r []byte)
func (WithdrawalProtocolFeeResponse) ValidateMetadataByItself ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateMetadataByItself() bool
func (WithdrawalProtocolFeeResponse) ValidateSanityData ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalProtocolFeeResponse) ValidateTxWithBlockChain ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
func (WithdrawalProtocolFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (withdrawalResponse WithdrawalProtocolFeeResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type WithdrawalStakingRewardContent ¶
type WithdrawalStakingRewardContent struct { StakingPoolID string `json:"StakingPoolID"` NftID common.Hash `json:"NftID"` TokenID common.Hash `json:"TokenID"` Receiver ReceiverInfo `json:"Receiver"` IsLastInst bool `json:"IsLastInst"` TxReqID common.Hash `json:"TxReqID"` ShardID byte `json:"ShardID"` }
type WithdrawalStakingRewardRequest ¶
type WithdrawalStakingRewardRequest struct { metadataCommon.MetadataBase StakingPoolID string `json:"StakingPoolID"` NftID common.Hash `json:"NftID"` Receivers map[common.Hash]privacy.OTAReceiver `json:"Receivers"` }
func NewPdexv3WithdrawalStakingRewardRequest ¶
func NewPdexv3WithdrawalStakingRewardRequest( metaType int, stakingToken string, nftID common.Hash, receivers map[common.Hash]privacy.OTAReceiver, ) (*WithdrawalStakingRewardRequest, error)
func (*WithdrawalStakingRewardRequest) CalculateSize ¶
func (withdrawal *WithdrawalStakingRewardRequest) CalculateSize() uint64
func (*WithdrawalStakingRewardRequest) GetOTADeclarations ¶
func (withdrawal *WithdrawalStakingRewardRequest) GetOTADeclarations() []metadataCommon.OTADeclaration
func (WithdrawalStakingRewardRequest) Hash ¶
func (withdrawal WithdrawalStakingRewardRequest) Hash() *common.Hash
func (WithdrawalStakingRewardRequest) ValidateMetadataByItself ¶
func (withdrawal WithdrawalStakingRewardRequest) ValidateMetadataByItself() bool
func (WithdrawalStakingRewardRequest) ValidateSanityData ¶
func (withdrawal WithdrawalStakingRewardRequest) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalStakingRewardRequest) ValidateTxWithBlockChain ¶
func (withdrawal WithdrawalStakingRewardRequest) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
type WithdrawalStakingRewardResponse ¶
type WithdrawalStakingRewardResponse struct { metadataCommon.MetadataBase ReqTxID common.Hash `json:"ReqTxID"` }
func NewPdexv3WithdrawalStakingRewardResponse ¶
func NewPdexv3WithdrawalStakingRewardResponse( metaType int, reqTxID common.Hash, ) *WithdrawalStakingRewardResponse
func (*WithdrawalStakingRewardResponse) CalculateSize ¶
func (withdrawalResponse *WithdrawalStakingRewardResponse) CalculateSize() uint64
func (WithdrawalStakingRewardResponse) CheckTransactionFee ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) CheckTransactionFee( tx metadataCommon.Transaction, minFeePerKb uint64, minFeePerTx uint64, beaconHeight int64, db *statedb.StateDB, ) bool
func (WithdrawalStakingRewardResponse) Hash ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) Hash() *common.Hash
func (WithdrawalStakingRewardResponse) ValidateMetadataByItself ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateMetadataByItself() bool
func (WithdrawalStakingRewardResponse) ValidateSanityData ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateSanityData( chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, beaconHeight uint64, tx metadataCommon.Transaction, ) (bool, bool, error)
func (WithdrawalStakingRewardResponse) ValidateTxWithBlockChain ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) ValidateTxWithBlockChain( tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, shardID byte, db *statedb.StateDB, ) (bool, error)
func (WithdrawalStakingRewardResponse) VerifyMinerCreatedTxBeforeGettingInBlock ¶
func (withdrawalResponse WithdrawalStakingRewardResponse) VerifyMinerCreatedTxBeforeGettingInBlock( mintData *metadataCommon.MintData, shardID byte, tx metadataCommon.Transaction, chainRetriever metadataCommon.ChainRetriever, ac *metadataCommon.AccumulatedValues, shardViewRetriever metadataCommon.ShardViewRetriever, beaconViewRetriever metadataCommon.BeaconViewRetriever, ) (bool, error)
type WithdrawalStakingRewardStatus ¶
type WithdrawalStakingRewardStatus struct { Status int `json:"Status"` Receivers map[common.Hash]ReceiverInfo `json:"Receivers"` }
Source Files ¶
- add_liquidity_request.go
- add_liquidity_response.go
- add_order.go
- add_order_response.go
- constants.go
- mint_nft_response.go
- mint_pdex_token.go
- modify_params.go
- staking_request.go
- staking_response.go
- trade.go
- trade_response.go
- unstaking_request.go
- unstaking_response.go
- user_mint_nft_request.go
- user_mint_nft_response.go
- utils.go
- withdraw_liquidity_request.go
- withdraw_liquidity_response.go
- withdraw_lp_fee_request.go
- withdraw_lp_fee_response.go
- withdraw_order.go
- withdraw_order_response.go
- withdraw_protocol_fee_request.go
- withdraw_protocol_fee_response.go
- withdraw_staking_reward_request.go
- withdraw_staking_reward_response.go