slither-flat produces a flattened version of the codebase.
Features
- Code flattening
- Support multiple strategies
- Support circular dependency
- Support all the compilation platforms (Truffle, embark, buidler, etherlime, ...).
Usage
slither-flat target
--contract ContractName: flatten only one contract (standalone file)
Strategies
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 fileLocalImport: Export every contract in one separate file, and include import ".." in their preludes
Default: MostDerived
Patching
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().
Export option
--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))