wasm

package
v6.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL