pub enum WasmCmd {
Show 13 variants New { contract_name: String, target_dir: Option<PathBuf>, version: Option<String>, }, Build { no_wasm_opt: bool, aarch64: bool, }, StoreCode { contract_name: String, no_wasm_opt: bool, permit_instantiate_only: Option<String>, base_tx_args: BaseTxArgs, }, TsGen { contract_name: String, schema_gen_cmd: Option<String>, schema_dir: Option<PathBuf>, out_dir: Option<PathBuf>, node_package_manager: NodePackageManager, }, UpdateAdmin { contract_name: String, label: String, new_admin: String, base_tx_args: BaseTxArgs, }, ClearAdmin { contract_name: String, label: String, base_tx_args: BaseTxArgs, }, Instantiate { contract_name: String, label: String, raw: Option<String>, admin: Option<String>, funds: Option<String>, no_proposal_sync: bool, yes: bool, base_tx_args: BaseTxArgs, }, Migrate { contract_name: String, label: String, raw: Option<String>, no_proposal_sync: bool, yes: bool, base_tx_args: BaseTxArgs, }, Deploy { contract_name: String, label: String, raw: Option<String>, permit_instantiate_only: Option<String>, admin: Option<String>, funds: Option<String>, no_rebuild: bool, no_wasm_opt: bool, base_tx_args: BaseTxArgs, }, Upgrade { contract_name: String, label: String, raw: Option<String>, no_rebuild: bool, no_wasm_opt: bool, permit_instantiate_only: Option<String>, base_tx_args: BaseTxArgs, }, Proposal { cmd: ProposalCmd, }, Execute { contract_name: String, label: String, raw: Option<String>, funds: Option<String>, base_tx_args: BaseTxArgs, }, Query { contract_name: String, label: String, raw: Option<String>, base_tx_args: BaseTxArgs, },
}

Variants

New

Fields

contract_name: String

Contract name

target_dir: Option<PathBuf>

Path to store generated contract

version: Option<String>

Template’s version, using main branch if not specified

Create new CosmWasm contract from boilerplate

Build

Fields

no_wasm_opt: bool

If set, the contract(s) will not be optimized by wasm-opt after build (only use in dev)

aarch64: bool

Option for m1 user for wasm optimization, FOR TESTING ONLY, PRODUCTION BUILD SHOULD USE INTEL BUILD

Build .wasm for storing contract code on the blockchain

StoreCode

Fields

contract_name: String

Name of the contract to store

no_wasm_opt: bool

If set, use non wasm-opt optimized wasm to store code (only use in dev)

permit_instantiate_only: Option<String>

Restricting the code to be able to instantiate only by given address, no restriction by default

base_tx_args: BaseTxArgs

Store .wasm on chain for later initialization

TsGen

Fields

contract_name: String

Name of the contract to store

schema_gen_cmd: Option<String>

Sschema generation command, default: cargo run -p {contract_name} --example schema

schema_dir: Option<PathBuf>

Directory of input schema for ts generation

out_dir: Option<PathBuf>

Code output directory, ignore remaining ts build process if custom out_dir is specified

node_package_manager: NodePackageManager

Code output directory

UpdateAdmin

Fields

contract_name: String

Name of the contract to store

label: String

Label for the instantiated contract for later reference

new_admin: String

Address of new admin

base_tx_args: BaseTxArgs

Update admin that can migrate contract

ClearAdmin

Fields

contract_name: String

Name of the contract to store

label: String

Label for the instantiated contract for later reference

base_tx_args: BaseTxArgs

Clear admin so no one can migrate contract

Instantiate

Fields

contract_name: String

Name of the contract to instantiate

label: String

Label for the instantiated contract for later reference

raw: Option<String>

Raw json string to use as instantiate msg

admin: Option<String>

Specifying admin required for contract migration. Use “signer” for setting tx signer as admin. Use bech32 address (eg. “osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks”) for custom admin.

funds: Option<String>

Funds to send to instantiated contract

no_proposal_sync: bool

Skip the check for proposal’s updated code_id

yes: bool

Agree to all prompts

base_tx_args: BaseTxArgs

Instanitate .wasm stored on chain

Migrate

Fields

contract_name: String

Name of the contract to instantiate

label: String

Label for the instantiated contract for selcting migration target

raw: Option<String>

Raw json string to use as instantiate msg

no_proposal_sync: bool

Skip the check for proposal’s updated code_id

yes: bool

Agree to all prompts

base_tx_args: BaseTxArgs

Migrated instanitate contract to use other code stored on chain

Deploy

Fields

contract_name: String

Name of the contract to deploy

label: String

Label for the instantiated contract for later reference

raw: Option<String>

Raw json string to use as instantiate msg

permit_instantiate_only: Option<String>

Restricting the code to be able to instantiate only by given address, no restriction by default

admin: Option<String>

Specifying admin required for contract migration. Use “signer” for setting tx signer as admin. Use bech32 address (eg. “osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks”) for custom admin.

funds: Option<String>

Funds to send to instantiated contract

no_rebuild: bool

Use existing .wasm file to deploy if set to true

no_wasm_opt: bool

If set, skip wasm-opt and store the unoptimized code (only use in dev)

base_tx_args: BaseTxArgs

Build, Optimize, Store code, and instantiate contract

Upgrade

Fields

contract_name: String

Name of the contract to deploy

label: String

Label for the instantiated contract for later reference

raw: Option<String>

Raw json string to use as instantiate msg

no_rebuild: bool

Use existing .wasm file to deploy if set to true

no_wasm_opt: bool

If set, skip wasm-opt and store the unoptimized code (only use in dev)

permit_instantiate_only: Option<String>

Restricting the code to be able to instantiate only by given address, no restriction by default

base_tx_args: BaseTxArgs

Build, Optimize, Store code, and migrate contract

Proposal

Fields

cmd: ProposalCmd

Execute

Fields

contract_name: String
label: String
raw: Option<String>
funds: Option<String>
base_tx_args: BaseTxArgs

Execute contract messages

Query

Fields

contract_name: String
label: String
raw: Option<String>
base_tx_args: BaseTxArgs

Query contract state

Trait Implementations

Formats the value using the given formatter. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more

Assign values from ArgMatches to self.

Assign values from ArgMatches to self.

Append to Command so it can instantiate Self. Read more

Append to Command so it can update self. Read more

Test whether Self can parse a specific subcommand

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more