Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbip-sg/sol-flattener
Mimimal solidity flattener script
https://github.com/sbip-sg/sol-flattener
Last synced: 8 days ago
JSON representation
Mimimal solidity flattener script
- Host: GitHub
- URL: https://github.com/sbip-sg/sol-flattener
- Owner: sbip-sg
- License: mit
- Created: 2022-10-24T10:11:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-15T06:36:25.000Z (about 2 years ago)
- Last Synced: 2024-12-23T01:54:14.567Z (11 days ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sol-flattener
Mimimal solidity flattener script. No dependencies.Most analysis tools require the file to be self-contained and compilable directly with `solc`. This helps flatten solidity file from
project folder structure to a single file to be used for tools or to be uploaded to etherscan.# Requirements:
* Python 3
# Usage:
Normal project:* `python flatten.py --path yourfile.sol `
* `python flatten.py --path yourfile.sol --output /temp/`Hardhat + truffle projects:
* Install npm dependencies
* `cd project_folder`
* `npm install` or `yarn install`
* `python flatten.py --path project_folder/contracts/Contract.sol --include project_folder/node_modules`Test the flattened sol file with the correct solc version : `solc Contract_flattened.sol --binary`