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: StringContract name
Create new CosmWasm contract from boilerplate
Build
Fields
no_wasm_opt: boolIf set, the contract(s) will not be optimized by wasm-opt after build (only use in dev)
aarch64: boolOption 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: StringName of the contract to store
no_wasm_opt: boolIf set, use non wasm-opt optimized wasm to store code (only use in dev)
Store .wasm on chain for later initialization
TsGen
Fields
contract_name: StringName of the contract to store
schema_gen_cmd: Option<String>Sschema generation command, default: cargo run -p {contract_name} --example schema
UpdateAdmin
Fields
contract_name: StringName of the contract to store
label: StringLabel for the instantiated contract for later reference
new_admin: StringAddress of new admin
Update admin that can migrate contract
ClearAdmin
Fields
contract_name: StringName of the contract to store
label: StringLabel for the instantiated contract for later reference
Clear admin so no one can migrate contract
Instantiate
Fields
contract_name: StringName of the contract to instantiate
label: StringLabel for the instantiated contract for later reference
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.
no_proposal_sync: boolSkip the check for proposal’s updated code_id
yes: boolAgree to all prompts
Instanitate .wasm stored on chain
Migrate
Fields
contract_name: StringName of the contract to instantiate
label: StringLabel for the instantiated contract for selcting migration target
no_proposal_sync: boolSkip the check for proposal’s updated code_id
yes: boolAgree to all prompts
Migrated instanitate contract to use other code stored on chain
Deploy
Fields
contract_name: StringName of the contract to deploy
label: StringLabel for the instantiated contract for later reference
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.
no_rebuild: boolUse existing .wasm file to deploy if set to true
no_wasm_opt: boolIf set, skip wasm-opt and store the unoptimized code (only use in dev)
Build, Optimize, Store code, and instantiate contract
Upgrade
Fields
contract_name: StringName of the contract to deploy
label: StringLabel for the instantiated contract for later reference
no_rebuild: boolUse existing .wasm file to deploy if set to true
no_wasm_opt: boolIf set, skip wasm-opt and store the unoptimized code (only use in dev)
Build, Optimize, Store code, and migrate contract
Proposal
Execute
Execute contract messages
Query
Query contract state
Trait Implementations
sourceimpl FromArgMatches for WasmCmd
impl FromArgMatches for WasmCmd
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches to self.
sourcefn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches to self.
sourceimpl<'a> Module<'a, WasmConfig, WasmCmd, Error> for WasmModule
impl<'a> Module<'a, WasmConfig, WasmCmd, Error> for WasmModule
sourceimpl Subcommand for WasmCmd
impl Subcommand for WasmCmd
sourcefn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
sourcefn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether Self can parse a specific subcommand
Auto Trait Implementations
impl RefUnwindSafe for WasmCmd
impl Send for WasmCmd
impl Sync for WasmCmd
impl Unpin for WasmCmd
impl UnwindSafe for WasmCmd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more