Documentation
¶
Index ¶
- func ExecTestCLICmd(clientCtx client.Context, cmd *cobra.Command, extraArgs []string) (testutil.BufferWriter, error)
- func SubmitTestTx(clientCtx client.Context, msg proto.Message, from sdk.AccAddress, ...) (testutil.BufferWriter, error)
- type FilterTxsFn
- type MockCometRPC
- type MockCometTxSearchRPC
- func (mock MockCometTxSearchRPC) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
- func (MockCometTxSearchRPC) BroadcastTxSync(context.Context, cmttypes.Tx) (*coretypes.ResultBroadcastTx, error)
- func (mock MockCometTxSearchRPC) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, ...) (*coretypes.ResultTxSearch, error)
- func (m MockCometTxSearchRPC) Txs() []cmttypes.Tx
- func (m *MockCometTxSearchRPC) WithFilterTxsFn(fn FilterTxsFn)
- func (m *MockCometTxSearchRPC) WithTxConfig(cfg client.TxConfig)
- func (m *MockCometTxSearchRPC) WithTxs(txs [][]byte)
- type TestTxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecTestCLICmd ¶
func ExecTestCLICmd(clientCtx client.Context, cmd *cobra.Command, extraArgs []string) (testutil.BufferWriter, error)
ExecTestCLICmd builds the client context, mocks the output and executes the command.
func SubmitTestTx ¶
func SubmitTestTx(clientCtx client.Context, msg proto.Message, from sdk.AccAddress, config TestTxConfig) (testutil.BufferWriter, error)
Types ¶
type MockCometRPC ¶
type MockCometRPC struct { rpcclientmock.Client // contains filtered or unexported fields }
func NewMockCometRPC ¶
func NewMockCometRPC(respQuery abci.QueryResponse) MockCometRPC
NewMockCometRPC returns a mock CometBFT RPC implementation. It is used for CLI testing.
func NewMockCometRPCWithResponseQueryValue ¶
func NewMockCometRPCWithResponseQueryValue(bz []byte) MockCometRPC
NewMockCometRPCWithResponseQueryValue returns a mock CometBFT RPC implementation with value only. It is used for CLI testing.
func (MockCometRPC) ABCIQueryWithOptions ¶
func (m MockCometRPC) ABCIQueryWithOptions( _ context.Context, _ string, _ cmtbytes.HexBytes, _ rpcclient.ABCIQueryOptions, ) (*coretypes.ResultABCIQuery, error)
func (MockCometRPC) BroadcastTxSync ¶
func (MockCometRPC) BroadcastTxSync(context.Context, cmttypes.Tx) (*coretypes.ResultBroadcastTx, error)
type MockCometTxSearchRPC ¶
type MockCometTxSearchRPC struct { rpcclientmock.Client // contains filtered or unexported fields }
func (MockCometTxSearchRPC) Block ¶
func (mock MockCometTxSearchRPC) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
func (MockCometTxSearchRPC) BroadcastTxSync ¶
func (MockCometTxSearchRPC) BroadcastTxSync(context.Context, cmttypes.Tx) (*coretypes.ResultBroadcastTx, error)
func (MockCometTxSearchRPC) TxSearch ¶
func (mock MockCometTxSearchRPC) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error)
func (MockCometTxSearchRPC) Txs ¶
func (m MockCometTxSearchRPC) Txs() []cmttypes.Tx
func (*MockCometTxSearchRPC) WithFilterTxsFn ¶
func (m *MockCometTxSearchRPC) WithFilterTxsFn(fn FilterTxsFn)
func (*MockCometTxSearchRPC) WithTxConfig ¶
func (m *MockCometTxSearchRPC) WithTxConfig(cfg client.TxConfig)
func (*MockCometTxSearchRPC) WithTxs ¶
func (m *MockCometTxSearchRPC) WithTxs(txs [][]byte)
accept [][]byte so that module that use this for testing dont have to import comet directly
Click to show internal directories.
Click to hide internal directories.