Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 953 Bytes

forge-flatten.md

File metadata and controls

44 lines (26 loc) · 953 Bytes

forge flatten

NAME

forge-flatten - Flatten a source file and all of its imports into one file.

SYNOPSIS

forge flatten [options] file

DESCRIPTION

Flatten a source file and all of its imports into one file.

If --output <FILE> is not set, then the flattened contract will be output to stdout.

OPTIONS

Flatten Options

-o file
--output file
    The path to output the flattened contract. If not specified, the flattened contract will be output to stdout.

{{#include project-options.md}}

{{#include common-options.md}}

EXAMPLES

  1. Flatten src/Contract.sol:

    forge flatten src/Contract.sol
  2. Flatten src/Contract.sol and write the result to src/Contract.flattened.sol:

    forge flatten --output src/Contract.flattened.sol src/Contract.sol

SEE ALSO

forge, forge verify-contract