Documentation ¶
Index ¶
- func CheckTxCode(network *network.Network, clientCtx client.Context, txHash string, ...) error
- func ExecTestCLICmd(clientCtx client.Context, cmd *cobra.Command, extraArgs []string) (testutil.BufferWriter, error)
- func GetTxResponse(network *network.Network, clientCtx client.Context, txHash string) (sdk.TxResponse, error)
- func MsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error)
- func QueryBalancesExec(clientCtx client.Context, address fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error)
- type MockTendermintRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTxCode ¶ added in v0.47.0
func CheckTxCode(network *network.Network, 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 ¶ added in v0.47.0
func GetTxResponse(network *network.Network, 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 MsgSendExec ¶ added in v0.47.0
func QueryBalancesExec ¶ added in v0.47.0
Types ¶
type MockTendermintRPC ¶ added in v0.47.0
type MockTendermintRPC struct { rpcclientmock.Client // contains filtered or unexported fields }
func NewMockTendermintRPC ¶ added in v0.47.0
func NewMockTendermintRPC(respQuery abci.ResponseQuery) MockTendermintRPC
NewMockTendermintRPC returns a mock TendermintRPC implementation. It is used for CLI testing.
func (MockTendermintRPC) ABCIQueryWithOptions ¶ added in v0.47.0
func (m MockTendermintRPC) ABCIQueryWithOptions( _ context.Context, _ string, _ tmbytes.HexBytes, _ rpcclient.ABCIQueryOptions, ) (*coretypes.ResultABCIQuery, error)
func (MockTendermintRPC) BroadcastTxSync ¶ added in v0.47.0
func (MockTendermintRPC) BroadcastTxSync(context.Context, tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
Click to show internal directories.
Click to hide internal directories.