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. |
Execute
Executes a wasm message.
Usage
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 |
Prints the constructed message before simulating. | ||
help | Displays info about the current command. | --help |
Example
The transaction link, as well as the new contract address are returned.
Migrate
Migrates a contract.
Usage:
Example:
Query
Performs a contract query.
Usage
Example
Unlike the other messages, the query does not require single quotes around the message.
Here I am queriying the account of a user (which is empty) from one of our contracts, we get:
Upload
Upload a contract wasm.
The path is relative to where the CLI was run.