Documentation ¶
Index ¶
- func InstantiateTestContract(t *testing.T, chain *TestChain) sdk.AccAddress
- type DesmosChainMsg
- type MsgTestContractQueryRequest
- type MsgTestContractQueryResponse
- type TestChain
- func (chain *TestChain) InstantiateContract(codeID uint64, initMsg []byte) sdk.AccAddress
- func (chain *TestChain) SmartQuery(contractAddr string, queryMsg interface{}, response interface{}) error
- func (chain *TestChain) StoreCode(byteCode []byte) types.MsgStoreCodeResponse
- func (chain *TestChain) StoreCodeFile(filename string) types.MsgStoreCodeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstantiateTestContract ¶
func InstantiateTestContract(t *testing.T, chain *TestChain) sdk.AccAddress
InstantiateTestContract store and instantiate a test contract instance
Types ¶
type DesmosChainMsg ¶
type DesmosChainMsg struct {
Request wasmvmtypes.QueryRequest `json:"request"`
}
DesmosChainMsg represents the request message of Desmos for test contract query
type MsgTestContractQueryRequest ¶
type MsgTestContractQueryRequest struct {
DesmosChain DesmosChainMsg `json:"desmos_chain"`
}
MsgTestContractQueryRequest represents the request type of test contract query
type MsgTestContractQueryResponse ¶
type MsgTestContractQueryResponse struct {
Data json.RawMessage `json:"data"`
}
MsgTestContractQueryResponse represents the response type of test contract query
type TestChain ¶
type TestChain struct {
*chaintesting.TestChain
}
func (*TestChain) InstantiateContract ¶
func (chain *TestChain) InstantiateContract(codeID uint64, initMsg []byte) sdk.AccAddress
InstantiateContract instantiates contract by the given code ID
func (*TestChain) SmartQuery ¶
func (chain *TestChain) SmartQuery(contractAddr string, queryMsg interface{}, response interface{}) error
SmartQuery This will serialize the query message and submit it to the contract. The response is parsed into the provided interface. Usage: SmartQuery(addr, QueryMsg{Foo: 1}, &response)
func (*TestChain) StoreCode ¶
func (chain *TestChain) StoreCode(byteCode []byte) types.MsgStoreCodeResponse
StoreCode stores byte code on chain
func (*TestChain) StoreCodeFile ¶
func (chain *TestChain) StoreCodeFile(filename string) types.MsgStoreCodeResponse
StoreCodeFile compresses code file then stores its byte code on chain