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

Variants

Publish

Fields

no_republish: bool

If set, fail 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>>

Manually specify the publishing order of modules.

Compile the modules in this package and its dependencies and publish the resulting bytecodes in global storage.

Run

Fields

script_file: PathBuf

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.

Run a Move script that reads/writes resources stored on disk in storage-dir. The script must be defined in the package.

Test

Fields

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.

Run expected value tests using the given batch file.

View

Fields

file: PathBuf

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-dir. Does not delete anything in src.

Doctor

Fields

Run well-formedness checks on the storage-dir and install-dir directories.

Generate

Fields

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

Implementations

Trait Implementations

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command

Deprecated, replaced with CommandFactory::command

👎 Deprecated since 3.1.0:

Replaced with `CommandFactory::command_for_update

Deprecated, replaced with CommandFactory::command_for_update

Build a Command that can instantiate Self. Read more

Build a Command that can update self. Read more

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

Assign values from ArgMatches to self.

Parse from std::env::args_os(), exit on error

Parse from std::env::args_os(), return Err on error.

Parse from iterator, exit on error

Parse from iterator, return Err on error.

Update from iterator, exit on error

Update from iterator, return Err on error.

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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