-
Couldn't load subscription status.
- Fork 1.1k
Contract Flattening
Feist Josselin edited this page Jun 8, 2020
·
6 revisions
slither-flat produces a flattened version of the codebase.
- Code flattening
- Support multiple strategies
- Support circular dependency
- Support all the compilation platforms (Truffle, embark, buidler, etherlime, ...).
slither-flat target
-
--contract ContractName: flatten only one contract (standalone file)
slither-flat contains three strategies that can be specified with the --strategy flag:
-
MostDerived: Export all the most derived contracts (every file is standalone) -
OneFile: Export all the contracts in one standalone file -
LocalImport: Export every contract in one separate file, and include import ".." in their preludes
Default: MostDerived
slither-flat can transform the codebase to help some usage (eg. Echidna)
-
--convert-external: convertexternalfunction topublic. This is meant to facilitate Echidna usage. -
--contract name: To flatten only a target contract -
--remove-assert: Remove call to assert().
-
--dir DirName: output directory -
--json file.json: export the results to a json file (--json -output to the standard output -
--zip file.zip: export to a zip file -
--zip-type type: Zip compression type (default lzma))