pub enum SandboxCommand {
    Publish {
        source_files: Vec<String>,
        no_republish: bool,
        ignore_breaking_changes: bool,
        override_ordering: Option<Vec<String>>,
    },
    Run {
        script_file: String,
        script_name: Option<String>,
        signers: Vec<String>,
        args: Vec<TransactionArgument>,
        type_args: Vec<TypeTag>,
        gas_budget: Option<u64>,
        dry_run: bool,
    },
    Test {
        path: String,
        use_temp_dir: bool,
        track_cov: bool,
        create: bool,
    },
    View {
        file: String,
    },
    Clean {},
    Doctor {},
    Link {
        source_files: Vec<String>,
        no_republish: bool,
    },
    Generate {
        cmd: GenerateCommand,
    },
}

Variants§

§

Publish

Fields

§source_files: Vec<String>

The source files containing modules to publish

§no_republish: bool

If set, fail during compilation when attempting to publish a module that already exists in global storage

§ignore_breaking_changes: bool

By default, code that might cause breaking changes for bytecode linking or data layout compatibility checks will not be published. Set this flag to ignore breaking changes checks and publish anyway

§override_ordering: Option<Vec<String>>

fix publishing order

Compile the specified modules and publish the resulting bytecodes in global storage

§

Run

Fields

§script_file: String

Path to .mv file containing either script or module bytecodes. If the file is a module, the script_name parameter must be set.

§script_name: Option<String>

Name of the script function inside script_file to call. Should only be set if script_file points to a module.

§signers: Vec<String>

Possibly-empty list of signers for the current transaction (e.g., account in main(&account: signer)). Must match the number of signers expected by script_file.

§args: Vec<TransactionArgument>

Possibly-empty list of arguments passed to the transaction (e.g., i in main(i: u64)). Must match the arguments types expected by script_file. Supported argument types are bool literals (true, false), u64 literals (e.g., 10, 58), address literals (e.g., 0x12, 0x0000000000000000000000000000000f), hexadecimal strings (e.g., x“0012“ will parse as the vector value [00, 12]), and ASCII strings (e.g., ’b“hi“ will parse as the vector value [68, 69])

§type_args: Vec<TypeTag>

Possibly-empty list of type arguments passed to the transaction (e.g., T in main<T>()). Must match the type arguments kinds expected by script_file.

§gas_budget: Option<u64>

Maximum number of gas units to be consumed by execution. When the budget is exhaused, execution will abort. By default, no gas-budget is specified and gas metering is disabled.

§dry_run: bool

If set, the effects of executing script_file (i.e., published, updated, and deleted resources) will NOT be committed to disk.

Compile/run a Move script that reads/writes resources stored on disk in storage. This command compiles the script first before running it.

§

Test

Fields

§path: String

a directory path in which all the tests will be executed

§use_temp_dir: bool

Use an ephemeral directory to serve as the testing workspace. By default, the directory containing the args.txt will be the workspace

§track_cov: bool

Show coverage information after tests are done. By default, coverage will not be tracked nor shown.

§create: bool

Create a new test directory scaffold with the specified

Run expected value tests using the given batch file

§

View

Fields

§file: String

Path to a resource, events file, or module stored on disk.

View Move resources, events files, and modules stored on disk

§

Clean

Fields

Delete all resources, events, and modules stored on disk under storage. Does not delete anything in src.

§

Doctor

Fields

Run well-formedness checks on the storage and build directories.

Fields

§source_files: Vec<String>

The source files containing modules to publish

§no_republish: bool

If set, fail when attempting to typecheck a module that already exists in global storage

Typecheck and verify the scripts and/or modules under src.

§

Generate

Generate struct layout bindings for the modules stored on disk under storage

Trait Implementations§

source§

impl StructOpt for SandboxCommand

source§

fn clap<'a, 'b>() -> App<'a, 'b>

Returns clap::App corresponding to the struct.
source§

fn from_clap(matches: &ArgMatches<'_>) -> Self

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by [StructOpt::clap] called on the same type, otherwise it must panic.
§

fn from_args() -> Selfwhere Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program.
§

fn from_args_safe() -> Result<Self, Error>where Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Unlike [StructOpt::from_args], returns clap::Error on failure instead of aborting the program, so calling .exit is up to you.
§

fn from_iter<I>(iter: I) -> Selfwhere Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more
§

fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Read more

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · 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>,

const: unstable · 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> Same<T> 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.
const: unstable · 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.
const: unstable · 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