GithubHelp home page GithubHelp logo

isabella232 / solidity-flattener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from poanetwork/solidity-flattener

0.0 0.0 0.0 338 KB

Utility to combine Solidity project to a flat file

License: Apache License 2.0

JavaScript 98.17% Solidity 1.83%

solidity-flattener's Introduction

Solidity smart-contract flattened source file generation

Build Status Known Vulnerabilities Coverage Status

Utility to combine all imports to one flatten .sol file

Installation from npm

npm i @poanet/solidity-flattener

Usage

./node_modules/.bin/poa-solidity-flattener ./contracts/example.sol

It will save flattened source of Solidity smart-contract into ./out directory

Installation from source

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"
}

solidity-flattener's People

Contributors

vbaranov avatar dependabot[bot] avatar oceanapplications avatar kongliangzhong avatar igorbarinov avatar karimkawambwa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.