wasm

The `wasm` module allows you to manage CosmWasm smart contract.

Query:

Tx:

Common flags in wasm query

Common flags for the wasm query command are summarized.

Flags:

Global Flags:

Encode Flags

Flags:

Pagination Flags

Flags:

Query

ununifid query wasm build-address

Build contract address

ununifid query wasm build-address [code-hash] [creator-address] [salt-hex-encoded] [json_encoded_init_args (required when set as fixed)] [flags]

Flags:

Please refer to Common flags & Encode flags for details of flags.

ununifid query wasm code

Downloads wasm bytecode for given code id

ununifid query wasm code [code_id] [output filename] [flags]

Flags:

Please refer to Common flags for details of flags.

ununifid query wasm code-info

Prints out metadata of a code id

ununifid query wasm code-info [code_id] [flags]

Flags:

Please refer to Common flags for details of flags.

ununifid query wasm contract

Prints out metadata of a contract given its address

ununifid query wasm contract [bech32_address] [flags]

Flags:

Please refer to Common flags for details of flags.

ununifid query wasm contract-history

Prints out the code history for a contract given its address

ununifid query wasm contract-history [bech32_address] [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

ununifid query wasm contract-state

Querying commands for the wasm module

ununifid query wasm contract-state [flags]
ununifid query wasm contract-state [command]

Command:

ununifid query wasm contract-state all [bech32_address] [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

ununifid query wasm contract-state raw [bech32_address] [key] [flags]
ununifid query wasm contract-state smart [bech32_address] [query] [flags]

Flags:

Please refer to Common flags & Encode flags for details of flags.

ununifid query wasm libwasmvm-version

Get libwasmvm version

ununifid query wasm libwasmvm-version [flags]

Flags:

Please refer to Common flags for details of flags.

ununifid query wasm list-code

List all wasm bytecode on the chain

ununifid query wasm list-code [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

ununifid query wasm list-contract-by-code

List wasm all bytecode on the chain for given code id

ununifid query wasm list-contract-by-code [code_id] [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

ununifid query wasm list-contracts-by-creator

List all contracts by creator

ununifid query wasm list-contracts-by-creator [creator] [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

ununifid query wasm params

Query the current wasm parameters

ununifid query wasm params [flags]

Flags:

Please refer to Common flags for details of flags.

ununifid query wasm pinned

List all pinned code ids

ununifid query wasm pinned [flags]

Flags:

Please refer to Common flags & Pagination flags for details of flags.

Common flags in nftmint tx

Common flags for the nftmint tx command are summarized.

Flags:

Global Flags:

Tx

ununifid tx wasm clear-contract-admin

Clears admin for a contract to prevent further migrations

ununifid tx wasm clear-contract-admin [contract_addr_bech32] [flags]```

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm execute

Execute a command on a wasm contract

ununifid tx wasm execute [contract_addr_bech32] [json_encoded_send_args] --amount [coins,optional] [flags]

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm grant

Grant authorization to an address

ununifid tx wasm grant [grantee] [message_type="execution"|"migration"] [contract_addr_bech32] --allow-raw-msgs [msg1,msg2,...] --allow-msg-keys [key1,key2,...] --allow-all-messages [flags]

Example:

$ ununifid tx grant <grantee_addr> execution <contract_addr> --allow-all-messages --max-calls 1 --no-token-transfer --expiration 1667979596

$ ununifid tx grant <grantee_addr> execution <contract_addr> --allow-all-messages --max-funds 100000uwasm --expiration 1667979596

$ ununifid tx grant <grantee_addr> execution <contract_addr> --allow-all-messages --max-calls 5 --max-funds 100000uwasm --expiration 1667979596

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm instantiate

Creates a new instance of an uploaded wasm code with the given 'constructor' message. Each contract instance has a unique address assigned.

ununifid tx wasm instantiate [code_id_int64] [json_encoded_init_args] --label [text] --admin [address,optional] --amount [coins,optional]  [flags]

Example:

$ ununifid tx wasm instantiate 1 '{"foo":"bar"}' --admin="$(ununifid keys show mykey -a)" \
  --from mykey --amount="100ustake" --label "local0.1.0"

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm instantiate2

Creates a new instance of an uploaded wasm code with the given 'constructor' message. Each contract instance has a unique address assigned. They are assigned automatically but in order to have predictable addresses for special use cases, the given 'salt' argument and '--fix-msg' parameters can be used to generate a custom address.

ununifid tx wasm instantiate2 [code_id_int64] [json_encoded_init_args] [salt] --label [text] --admin [address,optional] --amount [coins,optional] --fix-msg [bool,optional] [flags]

Predictable address example (also see 'ununifid query wasm build-address -h'):

$ ununifid tx wasm instantiate2 1 '{"foo":"bar"}' $(echo -n "testing" | xxd -ps) --admin="$(ununifid keys show mykey -a)" \
  --from mykey --amount="100ustake" --label "local0.1.0" \
   --fix-msg

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm migrate

Migrate a wasm contract to a new code version

ununifid tx wasm migrate [contract_addr_bech32] [new_code_id_int64] [json_encoded_migration_args] [flags]

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm set-contract-admin

Set new admin for a contract

ununifid tx wasm set-contract-admin [contract_addr_bech32] [new_admin_addr_bech32] [flags]

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm store

Upload a wasm binary

ununifid tx wasm store [wasm file] [flags]

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

ununifid tx wasm update-instantiate-config

Update instantiate config for a codeID

ununifid tx wasm update-instantiate-config [code_id_int64] [flags]

Flags:

Please refer to Common flags in cosmwasm tx for details of flags.

Last updated