forc-run

Run script project. Crafts a script transaction then sends it to a running node

USAGE:

forc run [OPTIONS] [NODE_URL]

ARGS:

<NODE_URL> URL of the Fuel Client Node

[env: FUEL_NODE_URL=]

OPTIONS:

--contract <CONTRACT>

32-byte contract ID that will be called during the transaction

-d, --data <DATA>

Hex string of data to input to script

--dry-run

Only craft transaction and print it out

-g, --debug-outfile <DEBUG_OUTFILE>

If set, outputs source file mapping in JSON format

--gas-limit <GAS_LIMIT>

Set the transaction gas limit. Defaults to the maximum gas limit

--gas-price <GAS_PRICE>

Set the transaction gas price. Defaults to 0

--generate-logged-types

Include logged types in the JSON ABI

-h, --help

Print help information

-k, --kill-node

Kill Fuel Node Client after running the code. This is only available if the node is started from forc run

--locked

Requires that the Forc.lock file is up-to-date. If the lock file is missing, or it needs to be updated, Forc will exit with an error

--minify-json-abi

By default the JSON for ABIs is formatted for human readability. By using this option JSON output will be "minified", i.e. all on one line without whitespace

--minify-json-storage-slots

By default the JSON for initial storage slots is formatted for human readability. By using this option JSON output will be "minified", i.e. all on one line without whitespace

-o <BINARY_OUTFILE>

If set, outputs a binary file representing the script bytes

--output-directory <OUTPUT_DIRECTORY>

The directory in which the sway compiler output artifacts are placed.

By default, this is <project-root>/out.

-p, --path <PATH>

Path to the project, if not specified, current working directory will be used

--print-ast

Print the generated Sway AST (Abstract Syntax Tree)

--print-finalized-asm

Print the finalized ASM.

This is the state of the ASM with registers allocated and optimisations applied.

--print-intermediate-asm

Print the generated ASM.

This is the state of the ASM prior to performing register allocation and other ASM optimisations.

--print-ir

Print the generated Sway IR (Intermediate Representation)

-r, --pretty-print

Pretty-print the outputs from the node

-s, --silent

Silent mode. Don't output any warnings or errors to the command line

--simulate

Execute the transaction and return the final mutated transaction along with receipts (which includes whether the transaction reverted or not). The transaction is not inserted in the node's view of the blockchain, (i.e. it does not affect the chain state)

--time-phases

Output the time elapsed over each part of the compilation process

--unsigned

Do not sign the transaction

-V, --version

Print version information