https://github.com/neptune-mutual/flatsol
This is a zero-dependency and lightweight Solidity flattener. This tool combines any given Solidity file's dependency and prints out the value in the shell.
https://github.com/neptune-mutual/flatsol
flatten flattener smart-contracts solidity truffle
Last synced: about 1 year ago
JSON representation
This is a zero-dependency and lightweight Solidity flattener. This tool combines any given Solidity file's dependency and prints out the value in the shell.
- Host: GitHub
- URL: https://github.com/neptune-mutual/flatsol
- Owner: neptune-mutual
- License: gpl-2.0
- Created: 2021-05-21T08:21:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T07:46:00.000Z (over 4 years ago)
- Last Synced: 2025-05-18T22:34:51.632Z (about 1 year ago)
- Topics: flatten, flattener, smart-contracts, solidity, truffle
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Flatsol
This is a zero-dependency and lightweight Solidity flattener. This tool combines any given Solidity file's dependency and prints out the value in the shell.
## Installation
```
npm install -g flatsol
```
## Usage
Compatible with truffle-flattener
Just intall it with npm in your truffle project and run
```
flatsol ./contracts/Token.sol > ./contracts/.Token.flat.sol
```
## Limitations
Aliased imports (eg: import {symbol1 as alias, symbol2} from "filename";) are not supported by flatsol.