Documentation ¶
Index ¶
- func AssertGetAllBalances(t *testing.T, n *network.Network, addr string) (sdk.Coins, bool)
- func AssertGetGovProp(t *testing.T, n *network.Network, propID string) (*govv1.Proposal, bool)
- func AssertGetLastGovProp(t *testing.T, n *network.Network) (*govv1.Proposal, bool)
- func AssertGetModuleAccountByName(t *testing.T, n *network.Network, moduleName string) (sdk.ModuleAccountI, bool)
- func AssertGetRequest[T proto.Message](t *testing.T, n *network.Network, url string, emptyResp T) (T, bool)
- func AssertGetSpendableBalances(t *testing.T, n *network.Network, addr string) (sdk.Coins, bool)
- func AssertGetTxFromResponse(t *testing.T, n *network.Network, txRespBz []byte) (sdk.TxResponse, bool)
- func CmdGetAllGovProps(n *network.Network) *cobra.Command
- func GetAllBalances(t *testing.T, n *network.Network, addr string) sdk.Coins
- func GetGovProp(t *testing.T, n *network.Network, propID string) *govv1.Proposal
- func GetLastGovProp(t *testing.T, n *network.Network) *govv1.Proposal
- func GetModuleAccountByName(t *testing.T, n *network.Network, moduleName string) sdk.ModuleAccountI
- func GetSpendableBalances(t *testing.T, n *network.Network, addr string) sdk.Coins
- func GetTxFromResponse(t *testing.T, n *network.Network, txRespBz []byte) sdk.TxResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertGetAllBalances ¶
AssertGetAllBalances executes a query to get all balances for an account, asserting that everything is okay. The returned bool will be true on success, or false if something goes wrong.
func AssertGetGovProp ¶
AssertGetGovProp executes a query to get the requested governance proposal, asserting that everything is okay. The returned bool will be true on success, or false if something goes wrong.
func AssertGetLastGovProp ¶
AssertGetLastGovProp executes a query to get the most recent governance proposal, asserting that everything is okay. The returned bool will be true on success, or false if something goes wrong.
func AssertGetModuleAccountByName ¶
func AssertGetModuleAccountByName(t *testing.T, n *network.Network, moduleName string) (sdk.ModuleAccountI, bool)
AssertGetModuleAccountByName executes a query to get a module account by name, asserting that everything is okay. The returned bool will be true on success, or false if something goes wrong.
func AssertGetRequest ¶
func AssertGetRequest[T proto.Message](t *testing.T, n *network.Network, url string, emptyResp T) (T, bool)
AssertGetRequest does an HTTP get on the provided url and unmarshalls the response into the provided emptyResp. The returned bool will be true on success, or false if something goes wrong.
The url should start with a / and should just contain the portion as defined in the proto.
func AssertGetSpendableBalances ¶
AssertGetSpendableBalances executes a query to get spendable balances for an account, asserting that everything is okay. The returned bool will be true on success, or false if something goes wrong.
func AssertGetTxFromResponse ¶
func AssertGetTxFromResponse(t *testing.T, n *network.Network, txRespBz []byte) (sdk.TxResponse, bool)
AssertGetTxFromResponse gets the TxResponse from the provided ExecTestCLICmd output bytes. If the provided output indicates a code other than 0, that is what is returned. If the provided output has a code of 0, the tx hash is extracted from it, and queries are executed to get the TxResponse for it. Four attempts are made to query for the tx, waiting a block between each attempt.
This asserts that there are no problems getting the TxResponse, returning true if no assertions failed.
func CmdGetAllGovProps ¶
CmdGetAllGovProps returns a cobra.Command that will execute a query to get all governance proposals.
func GetAllBalances ¶
GetAllBalances executes a query to get all balances for an account, requiring everything to be okay.
func GetGovProp ¶
GetGovProp executes a query to get the requested governance proposal, requiring everything to be okay.
func GetLastGovProp ¶
GetLastGovProp executes a query to get the most recent governance proposal, requiring everything to be okay.
func GetModuleAccountByName ¶
GetModuleAccountByName executes a query to get a module account by name, requiring everything to be okay.
func GetSpendableBalances ¶
GetSpendableBalances executes a query to get spendable balances for an account, requiring everything to be okay.
func GetTxFromResponse ¶
GetTxFromResponse gets the TxResponse from the provided ExecTestCLICmd output bytes. If the provided output indicates a code other than 0, that is what is returned. If the provided output has a code of 0, the tx hash is extracted from it, and queries are executed to get the TxResponse for it. Three attempts are made to query for the tx, waiting a block between each attempt.
This requires that there are no problems getting the TxResponse.
Types ¶
This section is empty.