Documentation ¶
Index ¶
- func DefaultMockSuccessTxResponse() sdk.TxResponse
- type MockClient
- func (mc *MockClient) Auth() exposed.Auth
- func (mc *MockClient) BuildAccAddrListBytes(accAddr ...sdk.AccAddress) []byte
- func (mc *MockClient) BuildAccountBytes(accAddrStr, accPubkeyStr, codeHash, coinsStr string, accNum, seqNum uint64) []byte
- func (mc *MockClient) BuildBookResBytes(askPrice, askQuantity, bidPrice, bidQuantity string) []byte
- func (mc *MockClient) BuildDelegatorBytes(delAddr, proxyAddr sdk.AccAddress, valAddrs []sdk.ValAddress, ...) []byte
- func (mc *MockClient) BuildFarmPoolBytes(poolName, ownerAddrStr, tokenSymbol string, height int64, amountDec sdk.Dec) []byte
- func (mc *MockClient) BuildFarmPoolNameListBytes(poolName ...string) []byte
- func (mc *MockClient) BuildFarmPoolsBytes(poolName1, poolName2, ownerAddrStr, tokenSymbol string, height int64, ...) []byte
- func (mc *MockClient) BuildLockInfoBytes(accAddr sdk.AccAddress, poolName, tokenSymbol string, amountDec sdk.Dec, ...) []byte
- func (mc *MockClient) BuildOrderDetailBytes(txHash, orderID, extraInfo, product, side string, ...) []byte
- func (mc *MockClient) BuildProposalsBytes(proposalID uint64, status govtypes.ProposalStatus, mockTime time.Time, ...) []byte
- func (mc *MockClient) BuildQueryResCode(codeStr string) []byte
- func (mc *MockClient) BuildQueryResStorage(storageStr string) []byte
- func (mc *MockClient) BuildTokenInfoBytes(description, symbol, originalSymbol, wholeName string, ...) []byte
- func (mc *MockClient) BuildTokenPairsResponseBytes(baseAssetSymbol1, baseAssetSymbol2, quoteAssetSymbol string, ...) []byte
- func (mc *MockClient) BuildUndelegationBytes(delAddr sdk.AccAddress, quantity sdk.Dec, completionTime time.Time) []byte
- func (mc *MockClient) BuildValidatorsBytes(valAddr sdk.ValAddress, consPubKey, moniker, identity, website, details string, ...) []byte
- func (mc *MockClient) Dex() exposed.Dex
- func (mc *MockClient) Distribution() exposed.Distribution
- func (mc *MockClient) Evm() exposed.Evm
- func (mc *MockClient) Farm() exposed.Farm
- func (mc *MockClient) GetCodec() *codec.Codec
- func (mc *MockClient) GetConfig() gosdktypes.ClientConfig
- func (mc *MockClient) GetRawCommitResultPointer(canonicalCommit bool, chainID string, height int64, time time.Time, ...) *ctypes.ResultCommit
- func (mc *MockClient) GetRawResultBlockPointer(chainID string, height int64, time time.Time, ...) *ctypes.ResultBlock
- func (mc *MockClient) GetRawResultBlockResultsPointer(power, height int64, pkType, eventType string, kvPairKey []byte) *ctypes.ResultBlockResults
- func (mc *MockClient) GetRawResultTxSearchPointer(totalCount int, height int64, code uint32, log, hashHexStr, eventType string, ...) *ctypes.ResultTxSearch
- func (mc *MockClient) GetRawTxResultPointer(height int64, code uint32, log, hashHexStr, eventType string, tx []byte) *ctypes.ResultTx
- func (mc *MockClient) GetRawValidatorsResultPointer(height, votingPower, proposerPriority int64, consPubkey crypto.PubKey) *ctypes.ResultValidators
- func (mc *MockClient) Governance() exposed.Governance
- func (mc *MockClient) Order() exposed.Order
- func (mc *MockClient) RegisterModule(mods ...gosdktypes.Module)
- func (mc *MockClient) Slashing() exposed.Slashing
- func (mc *MockClient) Staking() exposed.Staking
- func (mc *MockClient) Tendermint() exposed.Tendermint
- func (mc *MockClient) Token() exposed.Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMockSuccessTxResponse ¶
func DefaultMockSuccessTxResponse() sdk.TxResponse
DefaultMockSuccessTxResponse returns the default mock success tx response for transaction testing
Types ¶
type MockClient ¶
type MockClient struct { *gosdktypes.MockBaseClient // contains filtered or unexported fields }
MockClient - structure of the mock client for gosdk testing
func NewMockClient ¶
func NewMockClient(t *testing.T, ctrl *gomock.Controller, config gosdktypes.ClientConfig) MockClient
NewMockClient creates a new instance of MockClient
func (*MockClient) BuildAccAddrListBytes ¶
func (mc *MockClient) BuildAccAddrListBytes(accAddr ...sdk.AccAddress) []byte
BuildAccAddrList generates the account address list bytes for test
func (*MockClient) BuildAccountBytes ¶
func (mc *MockClient) BuildAccountBytes(accAddrStr, accPubkeyStr, codeHash, coinsStr string, accNum, seqNum uint64) []byte
BuildAccountBytes generates the account bytes for test
func (*MockClient) BuildBookResBytes ¶
func (mc *MockClient) BuildBookResBytes(askPrice, askQuantity, bidPrice, bidQuantity string) []byte
BuildBookResBytes generates the book result bytes for test
func (*MockClient) BuildDelegatorBytes ¶
func (mc *MockClient) BuildDelegatorBytes(delAddr, proxyAddr sdk.AccAddress, valAddrs []sdk.ValAddress, shares, tokens, totalDelegatedTokens sdk.Dec, isProxy bool) []byte
BuildDelegatorBytes generates the delegator bytes for test
func (*MockClient) BuildFarmPoolBytes ¶
func (mc *MockClient) BuildFarmPoolBytes(poolName, ownerAddrStr, tokenSymbol string, height int64, amountDec sdk.Dec) []byte
BuildFarmPoolBytes generates the farm pool bytes for test
func (*MockClient) BuildFarmPoolNameListBytes ¶
func (mc *MockClient) BuildFarmPoolNameListBytes(poolName ...string) []byte
BuildFarmPoolNameList generates the farm pool name list bytes for test
func (*MockClient) BuildFarmPoolsBytes ¶
func (mc *MockClient) BuildFarmPoolsBytes(poolName1, poolName2, ownerAddrStr, tokenSymbol string, height int64, amountDec sdk.Dec) []byte
BuildFarmPoolsBytes generates the farm pools bytes for test
func (*MockClient) BuildLockInfoBytes ¶
func (mc *MockClient) BuildLockInfoBytes(accAddr sdk.AccAddress, poolName, tokenSymbol string, amountDec sdk.Dec, height int64, referencePeriod uint64) []byte
BuildLockInfoBytes generates the lock info bytes for test
func (*MockClient) BuildOrderDetailBytes ¶
func (mc *MockClient) BuildOrderDetailBytes(txHash, orderID, extraInfo, product, side string, status, timestamp, orderExpireBlocks int64, sender sdk.AccAddress, price, quantity, filledAvgPrice, remainQuantity, remainLocked sdk.Dec, feePerBlock sdk.DecCoin) []byte
BuildOrderDetailBytes generates the order detail bytes for test
func (*MockClient) BuildProposalsBytes ¶
func (mc *MockClient) BuildProposalsBytes(proposalID uint64, status govtypes.ProposalStatus, mockTime time.Time, totalDeposit sdk.DecCoins, mockPower sdk.Dec) []byte
BuildProposalsBytes generates the proposals bytes for test
func (*MockClient) BuildQueryResCode ¶
func (mc *MockClient) BuildQueryResCode(codeStr string) []byte
BuildQueryResCode generates query res code bytes for test
func (*MockClient) BuildQueryResStorage ¶
func (mc *MockClient) BuildQueryResStorage(storageStr string) []byte
BuildQueryResStorage generates query res storage bytes for test
func (*MockClient) BuildTokenInfoBytes ¶
func (mc *MockClient) BuildTokenInfoBytes(description, symbol, originalSymbol, wholeName string, originalTotalSupply, totalSupply sdk.Dec, owner sdk.AccAddress, mintable, isSlice bool, tokenType int) []byte
BuildTokenInfoBytes generates the token info bytes for test
func (*MockClient) BuildTokenPairsResponseBytes ¶
func (mc *MockClient) BuildTokenPairsResponseBytes(baseAssetSymbol1, baseAssetSymbol2, quoteAssetSymbol string, initPrice, minQuantity sdk.Dec, maxPriceDigit, maxQuantityDigit, blockHeight1, blockHeight2 int64, ID1, ID2 uint64, delisting bool, owner sdk.AccAddress, deposits sdk.DecCoin) []byte
BuildTokenPairsResponseBytes generates the response of token pairs bytes for test
func (*MockClient) BuildUndelegationBytes ¶
func (mc *MockClient) BuildUndelegationBytes(delAddr sdk.AccAddress, quantity sdk.Dec, completionTime time.Time) []byte
BuildUndelegationBytes generates the undelegation bytes for test
func (*MockClient) BuildValidatorsBytes ¶
func (mc *MockClient) BuildValidatorsBytes(valAddr sdk.ValAddress, consPubKey, moniker, identity, website, details string, status byte, delegatorShares, minSelfDelegation sdk.Dec, unbondingHeight int64, unbondingCompletionTime time.Time, jailed, isSlice bool) []byte
BuildValidatorsBytes generates the validator bytes for test
func (*MockClient) Dex ¶
func (mc *MockClient) Dex() exposed.Dex
func (*MockClient) Distribution ¶
func (mc *MockClient) Distribution() exposed.Distribution
func (*MockClient) Evm ¶
func (mc *MockClient) Evm() exposed.Evm
func (*MockClient) Farm ¶
func (mc *MockClient) Farm() exposed.Farm
func (*MockClient) GetCodec ¶
func (mc *MockClient) GetCodec() *codec.Codec
GetCodec returns the client codec
func (*MockClient) GetConfig ¶
func (mc *MockClient) GetConfig() gosdktypes.ClientConfig
GetConfig returns the client config
func (*MockClient) GetRawCommitResultPointer ¶
func (mc *MockClient) GetRawCommitResultPointer(canonicalCommit bool, chainID string, height int64, time time.Time, appHash, blockIDHash tmbytes.HexBytes) *ctypes.ResultCommit
GetRawCommitResultPointer generates the raw tendermint commit result pointer for test
func (*MockClient) GetRawResultBlockPointer ¶
func (mc *MockClient) GetRawResultBlockPointer(chainID string, height int64, time time.Time, appHash, blockIDHash tmbytes.HexBytes) *ctypes.ResultBlock
GetRawResultBlockPointer generates the raw tendermint block result pointer for test
func (*MockClient) GetRawResultBlockResultsPointer ¶
func (mc *MockClient) GetRawResultBlockResultsPointer(power, height int64, pkType, eventType string, kvPairKey []byte) *ctypes.ResultBlockResults
GetRawResultBlockResultsPointer generates the raw tendermint result block results pointer for test
func (*MockClient) GetRawResultTxSearchPointer ¶
func (mc *MockClient) GetRawResultTxSearchPointer(totalCount int, height int64, code uint32, log, hashHexStr, eventType string, tx []byte) *ctypes.ResultTxSearch
GetRawTxResultPointer generates the raw tendermint tx search result pointer for test
func (*MockClient) GetRawTxResultPointer ¶
func (mc *MockClient) GetRawTxResultPointer(height int64, code uint32, log, hashHexStr, eventType string, tx []byte) *ctypes.ResultTx
GetRawTxResultPointer generates the raw tendermint tx result pointer for test
func (*MockClient) GetRawValidatorsResultPointer ¶
func (mc *MockClient) GetRawValidatorsResultPointer(height, votingPower, proposerPriority int64, consPubkey crypto.PubKey) *ctypes.ResultValidators
GetRawValidatorsResultPointer generates the raw tendermint validators result pointer for test
func (*MockClient) Governance ¶
func (mc *MockClient) Governance() exposed.Governance
func (*MockClient) Order ¶
func (mc *MockClient) Order() exposed.Order
func (*MockClient) RegisterModule ¶
func (mc *MockClient) RegisterModule(mods ...gosdktypes.Module)
RegisterModule registers the specific module for MockClient
func (*MockClient) Slashing ¶
func (mc *MockClient) Slashing() exposed.Slashing
func (*MockClient) Staking ¶
func (mc *MockClient) Staking() exposed.Staking
func (*MockClient) Tendermint ¶
func (mc *MockClient) Tendermint() exposed.Tendermint
func (*MockClient) Token ¶
func (mc *MockClient) Token() exposed.Token