Wasm

Send CosmWasm messages to the chain.

Available Commands

Command
Description

Executes a wasm message.

Instantiates a contract by code Id.

Migrate a contract.

Queries a contract.

Upload a contract wasm.

Queries general information about the contract.

Queries base information about the ADO.

Execute

Executes a wasm message.

Usage

wasm execute <contract address> <message>

Flags

Flag
Description
Usage

funds

Funds to send with the message

--funds 100uandr

memo

An optional memo to attach to the message

--memo 'Wow what a great transaction!'

simulate

Simulates the transaction without broadcasting it. Useful to estimate gas costs.

-- simulate

help

Displays info about the current command.

--help

Example

The CLI will promt a confirmation. After confirming, the output is similar to:

Instantiate

Instantiates a contract by code Id.

Usage

Flags

Flag
Description
Usage

label

Used to provide a label assigned to the instantiation.

--label 'This is a great label'

admin

Used to provide an alternative admin address for the contract.

--admin andr1...

simulate

Simulates the transaction without broadcasting it. Useful to estimate gas costs.

--simulate

print

Prints the constructed message before simulating.

--print

help

Displays info about the current command.

--help

Example

Migrate

Migrates a contract.

Usage:

Example:

Query

Performs a contract query.

Usage

Example

Here I am queriying the account of a user (which is empty) from one of our contracts, we get:

Upload

Upload a contract wasm.

Usage

Example

Info

Query general information about the ADO.

Usage

Example

Query Raw

Queries base information about the ADO.

Usage

Example

Flag
Description
Usage

limit

The number of resutls to return. Defaults to 10.

--limit 5

offset

Number of results to skip from the start. Defaults to 0.

--offset 3

Last updated

Was this helpful?