Enum beaker::WasmCmd

source ·
pub enum WasmCmd {
Show 13 variants New { contract_name: String, target_dir: Option<PathBuf>, version: Option<String>, template: 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>, 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

§template: Option<String>

Template name, prompt for template 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 schema

§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
§base_tx_args: BaseTxArgs

Execute contract messages

§

Query

Fields

§contract_name: String
§label: String
§base_tx_args: BaseTxArgs

Query contract state

Trait Implementations§

source§

impl Debug for WasmCmd

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for WasmCmd

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl FromArgMatches for WasmCmd

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl<'a> Module<'a, WasmConfig, WasmCmd, Error> for WasmModule

source§

fn execute<Ctx: Context<'a, WasmConfig>>( ctx: Ctx, cmd: &WasmCmd ) -> Result<(), Error>

source§

impl Subcommand for WasmCmd

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Any for Twhere T: Any,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,