wasm
The `wasm` module allows you to manage CosmWasm smart contract.
Query:
Name | Description |
---|---|
Build contract address | |
Downloads wasm bytecode for given code id | |
Prints out metadata of a code id | |
Prints out metadata of a contract given its address | |
Prints out the code history for a contract given its address | |
Querying commands for the wasm module | |
Get libwasmvm version | |
List all wasm bytecode on the chain | |
List wasm all bytecode on the chain for given code id | |
List all contracts by creator | |
Query the current wasm parameters | |
List all pinned code ids |
Tx:
Name | Description |
---|---|
Clears admin for a contract to prevent further migrations | |
Execute a command on a wasm contract | |
Grant authorization to an address | |
Instantiate a wasm contract | |
Instantiate a wasm contract with predictable address | |
Migrate a wasm contract to a new code version | |
Set new admin for a contract | |
Upload a wasm binary | |
Update instantiate config for a codeID |
Common flags in wasm
query
wasm
queryCommon flags for the wasm
query command are summarized.
Flags:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
--grpc-addr | string | the gRPC endpoint to use for this chain | ||
--grpc-insecure | allow gRPC over insecure channels, if not TLS the server must use TLS | |||
--height | int | Use a specific height to query state at (this can error if the node is pruning state) | ||
-h, --help | Help for <module name> | |||
--node | string | tcp://localhost:26657 | <host>:<port> to Tendermint RPC interface for this chain | |
-o, --output | string | text | Output format (text | json) |
Global Flags:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
--chain-id | string | The network chain ID | ||
--home | string | $HOME/.ununifi | directory for config and data | |
--log_format | string | The logging format (json | plain) (default "plain") | ||
--log_level | string | info | The logging level (trace | debug | info | warn | error | fatal | panic) | |
--trace | print out full stack trace on errors |
Encode Flags
Flags:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
--ascii | ascii encoded salt | |||
--b64 | base64 encoded salt | |||
--hex | hex encoded salt |
Pagination Flags
Flags:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
--count-total | a count total number of records in contract history to query for | |||
--limit | uint | pagination limit of contract history to query for (default 100) | ||
--offset | uint | pagination offset of contract history to query for | ||
--page | uint | pagination page of contract history to query for. This sets offset to a multiple of limit (default 1) | ||
--page-key | string | pagination page-key of contract history to query for | ||
--reverse | results are sorted in descending order |
Query
ununifid query wasm build-address
Build contract address
Flags:
Please refer to Common flags & Encode flags for details of flags.
ununifid query wasm code
Downloads wasm bytecode for given code id
Flags:
Please refer to Common flags for details of flags.
ununifid query wasm code-info
Prints out metadata of a code id
Flags:
Please refer to Common flags for details of flags.
ununifid query wasm contract
Prints out metadata of a contract given its address
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
Flags:
Please refer to Common flags & Pagination flags for details of flags.
ununifid query wasm contract-state
Querying commands for the wasm module
Command:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
all | Prints out all internal state of a contract given its address | |||
raw | Prints out internal state for key of a contract given its address | |||
smart | Calls contract with given address with query data and prints the returned result |
Flags:
Please refer to Common flags & Pagination flags for details of flags.
Flags:
Please refer to Common flags & Encode flags for details of flags.
ununifid query wasm libwasmvm-version
Get libwasmvm version
Flags:
Please refer to Common flags for details of flags.
ununifid query wasm list-code
List all wasm bytecode on the chain
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
Flags:
Please refer to Common flags & Pagination flags for details of flags.
ununifid query wasm list-contracts-by-creator
List all contracts by creator
Flags:
Please refer to Common flags & Pagination flags for details of flags.
ununifid query wasm params
Query the current wasm parameters
Flags:
Please refer to Common flags for details of flags.
ununifid query wasm pinned
List all pinned code ids
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:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
-a, --account-number | uint | The account number of the signing account (offline mode only) | ||
--aux | Generate aux signer data instead of sending a tx | |||
-b, --broadcast-mode | string | sync | Transaction broadcasting mode (sync | async | block) | |
--dry-run | ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible) | |||
--fee-granter | string | Fee granter grants fees for the transaction | ||
--fee-payer | string | Fee payer pays fees for the transaction instead of deducting from the signer | ||
--fees | string | Fees to pay along with transaction; eg: 10uatom | ||
--from | string | Name or address of private key with which to sign | ||
--gas | string | 200000 | gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically | |
--gas-adjustment | float | 1 | adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored | |
--gas-prices | string | Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom) | ||
--generate-only | Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name) | |||
-h, --help | help for <module name> | |||
--keyring-backend | string | test | Select keyring's backend (os | file | kwallet | pass | test | memory) | |
--keyring-dir | string | The client Keyring directory; if omitted, the default 'home' directory will be used | ||
--ledger | Use a connected Ledger device | |||
--node | string | tcp://localhost:26657 | <host>:<port> to tendermint rpc interface for this chain | |
--note | string | Note to add a description to the transaction (previously --memo) | ||
--offline | Offline mode (does not allow any online functionality) | |||
-o, --output | string | json | Output format (text | json) | |
-s, --sequence | uint | The sequence number of the signing account (offline mode only) | ||
--sign-mode | string | Choose sign mode (direct | amino-json | direct-aux), this is an advanced feature | ||
--timeout-height | uint | Set a block timeout height to prevent the tx from being committed past a certain height | ||
--tip | string | Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator | ||
-y, --yes | Skip tx broadcasting prompt confirmation |
Global Flags:
Name, shorthand | Type | Required | Default | Description |
---|---|---|---|---|
--chain-id | string | The network chain ID | ||
--home | string | $HOME/.ununifi | directory for config and data | |
--log_format | string | The logging format (json | plain) (default "plain") | ||
--log_level | string | info | The logging level (trace | debug | info | warn | error | fatal | panic) | |
--trace | print out full stack trace on errors |
Tx
ununifid tx wasm clear-contract-admin
Clears admin for a contract to prevent further migrations
Flags:
Please refer to Common flags in cosmwasm tx for details of flags.
ununifid tx wasm execute
Execute a command on a wasm contract
Flags:
Please refer to Common flags in cosmwasm tx for details of flags.
ununifid tx wasm grant
Grant authorization to an address
Example:
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.
Example:
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.
Predictable address example (also see 'ununifid query wasm build-address -h'):
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
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
Flags:
Please refer to Common flags in cosmwasm tx for details of flags.
ununifid tx wasm store
Upload a wasm binary
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
Flags:
Please refer to Common flags in cosmwasm tx for details of flags.
Last updated