Go to file
Victor Baranov b072c7ef89 Update name 2020-05-20 16:07:01 +03:00
demo Last portion of refactoring 2018-09-06 16:48:46 +03:00
helpers Fix 1st pragma identification 2019-08-02 20:47:47 +03:00
test Update test constants 2018-09-06 17:09:18 +03:00
.eslintrc.json Unit test for changeRelativePathToAbsoluteTest 2018-09-06 13:30:13 +03:00
.gitignore Unit test for changeRelativePathToAbsoluteTest 2018-09-06 13:30:13 +03:00
.travis.yml rename Travis config 2018-09-06 17:11:16 +03:00
LICENSE.md added Apache2 license 2017-07-26 10:58:32 -07:00
README.md Build status badge 2018-09-06 17:46:37 +03:00
config.json Flat .sol file generation utility 2017-07-26 19:13:45 +03:00
index.js Fix 1st pragma identification 2019-08-02 20:47:47 +03:00
package-lock.json Update name 2020-05-20 16:07:01 +03:00
package.json Update name 2020-05-20 16:07:01 +03:00

README.md

Solidity flat file generation

Build Status Known Vulnerabilities Coverage Status

Combines all local imports to one .sol file
git clone https://github.com/poanetwork/solidity-flattener
cd solidity-flattener
npm install

You can start script either

npm start "path_to_not_flat_contract_definition_file.sol"

or without paramaters (path to input file will be extracted from ./config.json)

npm start

Expected result:

Success! Flat file ORIGINAL_FILE_NAME_flat.sol is generated to ./out directory

./flatContract.sol - flat .sol file is created in output directory (./out/ by default)

Note: utility doesn't support aliases at import statements

Config

path ./config.json

{
	"inputFilePath": "./demo/src/Oracles.sol",
	"outputDir": "./out"
}