Documentation ¶
Index ¶
- Constants
- Variables
- func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
- func SignAndDeliver(tb testing.TB, txCfg client.TxConfig, app *baseapp.BaseApp, msgs []sdk.Msg, ...) (*abci.ResponseFinalizeBlock, error)
- func SignAndDeliverWithAuthenticator(ctx sdk.Context, txCfg client.TxConfig, app *baseapp.BaseApp, ...) (*abci.ResponseFinalizeBlock, error)
- func SignAndDeliverWithAuthenticatorAndCompoundSigs(ctx sdk.Context, txCfg client.TxConfig, app *baseapp.BaseApp, ...) (*abci.ResponseFinalizeBlock, error)
- func SignAuthenticatorMsg(ctx sdk.Context, gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, ...) (sdk.Tx, error)
- func SignAuthenticatorMsgWithCompoundSigs(ctx sdk.Context, gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, ...) (sdk.Tx, error)
- type TestChain
- func (chain *TestChain) ExecuteContract(contract, sender sdk.AccAddress, msg []byte, funds sdk.Coins) ([]byte, error)
- func (chain *TestChain) GetOsmosisApp() *app.OsmosisApp
- func (chain *TestChain) InstantiateContract(suite *suite.Suite, msg string, codeID uint64) sdk.AccAddress
- func (chain *TestChain) InstantiateRLContract(suite *suite.Suite, quotas string) sdk.AccAddress
- func (chain *TestChain) InstantiateRLContractRaw(codeId uint64, suite *suite.Suite, quotas string) sdk.AccAddress
- func (chain *TestChain) MigrateContract(contract, sender sdk.AccAddress, newCodeId uint64, msg []byte) ([]byte, error)
- func (chain *TestChain) MoveEpochsToTheFuture() error
- func (chain *TestChain) QueryContract(suite *suite.Suite, contract sdk.AccAddress, key []byte) string
- func (chain *TestChain) QueryContractJson(suite *suite.Suite, contract sdk.AccAddress, key []byte) gjson.Result
- func (chain *TestChain) RegisterRateLimitingContract(addr []byte)
- func (chain *TestChain) SendMsgsFromPrivKeys(privKeys []cryptotypes.PrivKey, msgs ...sdk.Msg) (*abci.ExecTxResult, error)
- func (chain *TestChain) SendMsgsFromPrivKeysWithAuthenticator(signers, signatures []cryptotypes.PrivKey, selectedAuthenticators []uint64, ...) (*abci.ExecTxResult, error)
- func (chain *TestChain) SendMsgsFromPrivKeysWithAuthenticatorAndCompoundSigs(signers []cryptotypes.PrivKey, signatures [][]cryptotypes.PrivKey, ...) (*abci.ExecTxResult, error)
- func (chain *TestChain) SendMsgsNoCheck(msgs ...sdk.Msg) (*abci.ExecTxResult, error)
- func (chain *TestChain) StoreContractCode(suite *suite.Suite, path string)
- func (chain *TestChain) StoreContractCodeDirect(suite *suite.Suite, path string) uint64
Constants ¶
const SimAppChainID = "simulation-app"
Variables ¶
var TestingDirectories []string
NOTE: we create a global variable here to deal with testing directories, this is necessary as there is now a lock file in the latest wasm that will panics our tests, this is a workaround, we should do something smarter that sets the home dir and removes the home dir
Functions ¶
func SetupTestingApp ¶
func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
func SignAndDeliver ¶
func SignAndDeliver( tb testing.TB, txCfg client.TxConfig, app *baseapp.BaseApp, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, blockTime time.Time, nextValHash []byte, priv ...cryptotypes.PrivKey, ) (*abci.ResponseFinalizeBlock, error)
SignAndDeliver signs and delivers a transaction without asserting the results. This overrides the function from ibctesting
func SignAndDeliverWithAuthenticator ¶
func SignAndDeliverWithAuthenticator( ctx sdk.Context, txCfg client.TxConfig, app *baseapp.BaseApp, header cmtproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, blockTime time.Time, nextValHash []byte, signers, signatures []cryptotypes.PrivKey, selectedAuthenticators []uint64, ) (*abci.ResponseFinalizeBlock, error)
SignAndDeliver signs and delivers a transaction without asserting the results. This overrides the function from ibctesting
func SignAndDeliverWithAuthenticatorAndCompoundSigs ¶
func SignAndDeliverWithAuthenticatorAndCompoundSigs( ctx sdk.Context, txCfg client.TxConfig, app *baseapp.BaseApp, header cmtproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, blockTime time.Time, nextValHash []byte, signers []cryptotypes.PrivKey, signatures [][]cryptotypes.PrivKey, selectedAuthenticators []uint64, ) (*abci.ResponseFinalizeBlock, error)
func SignAuthenticatorMsg ¶
func SignAuthenticatorMsg( ctx sdk.Context, gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, signers, signatures []cryptotypes.PrivKey, selectedAuthenticators []uint64, ) (sdk.Tx, error)
GenTx generates a signed mock transaction.
func SignAuthenticatorMsgWithCompoundSigs ¶
func SignAuthenticatorMsgWithCompoundSigs( ctx sdk.Context, gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, signers []cryptotypes.PrivKey, signatures [][]cryptotypes.PrivKey, selectedAuthenticators []uint64, ) (sdk.Tx, error)
SignAuthenticatorMsgWithCompoundSigs generates a transaction signed with compound signatures.
Types ¶
type TestChain ¶
type TestChain struct {
*ibctesting.TestChain
}
func (*TestChain) ExecuteContract ¶
func (*TestChain) GetOsmosisApp ¶
func (chain *TestChain) GetOsmosisApp() *app.OsmosisApp
GetOsmosisApp returns the current chain's app as an OsmosisApp
func (*TestChain) InstantiateContract ¶
func (*TestChain) InstantiateRLContract ¶
func (*TestChain) InstantiateRLContractRaw ¶
func (*TestChain) MigrateContract ¶
func (*TestChain) MoveEpochsToTheFuture ¶
Move epochs to the future to avoid issues with minting
func (*TestChain) QueryContract ¶
func (*TestChain) QueryContractJson ¶
func (*TestChain) RegisterRateLimitingContract ¶
func (*TestChain) SendMsgsFromPrivKeys ¶
func (chain *TestChain) SendMsgsFromPrivKeys(privKeys []cryptotypes.PrivKey, msgs ...sdk.Msg) (*abci.ExecTxResult, error)
SendMsgsNoCheck is an alternative to ibctesting.TestChain.SendMsgs so that it doesn't check for errors. That should be handled by the caller
func (*TestChain) SendMsgsFromPrivKeysWithAuthenticator ¶
func (chain *TestChain) SendMsgsFromPrivKeysWithAuthenticator( signers, signatures []cryptotypes.PrivKey, selectedAuthenticators []uint64, msgs ...sdk.Msg, ) (*abci.ExecTxResult, error)
SendMsgsNoCheck is an alternative to ibctesting.TestChain.SendMsgs so that it doesn't check for errors. That should be handled by the caller
func (*TestChain) SendMsgsFromPrivKeysWithAuthenticatorAndCompoundSigs ¶
func (chain *TestChain) SendMsgsFromPrivKeysWithAuthenticatorAndCompoundSigs( signers []cryptotypes.PrivKey, signatures [][]cryptotypes.PrivKey, selectedAuthenticators []uint64, msgs ...sdk.Msg, ) (*abci.ExecTxResult, error)
func (*TestChain) SendMsgsNoCheck ¶
SendMsgsNoCheck is an alternative to ibctesting.TestChain.SendMsgs so that it doesn't check for errors. That should be handled by the caller