Documentation
¶
Index ¶
- func CheckTxCode(network network.NetworkI, clientCtx client.Context, txHash string, ...) error
- func ExecTestCLICmd(clientCtx client.Context, cmd *cobra.Command, extraArgs []string) (testutil.BufferWriter, error)
- func GetTxResponse(network network.NetworkI, clientCtx client.Context, txHash string) (sdk.TxResponse, error)
- func SubmitTestTx(clientCtx client.Context, msg proto.Message, from sdk.AccAddress, ...) (testutil.BufferWriter, error)
- type MockCometRPC
- type TestTxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTxCode ¶
func CheckTxCode(network network.NetworkI, clientCtx client.Context, txHash string, expectedCode uint32) error
CheckTxCode verifies that the transaction result returns a specific code Takes a network, wait for two blocks and fetch the transaction from its hash
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 GetTxResponse ¶
func GetTxResponse(network network.NetworkI, clientCtx client.Context, txHash string) (sdk.TxResponse, error)
GetTxResponse returns queries the transaction response of a transaction from its hash Takes a network, wait for two blocks and fetch the transaction from its hash
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 NewMockCometRPCWithValue ¶
func NewMockCometRPCWithValue(bz []byte) MockCometRPC
NewMockCometRPCWithValue 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)
Click to show internal directories.
Click to hide internal directories.