Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ejwessel/truffle-flatten


https://github.com/ejwessel/truffle-flatten

Last synced: about 20 hours ago
JSON representation

Awesome Lists containing this project

README

        

# truffle-flatten

Thanks to [Nomic Labs](https://github.com/nomiclabs/truffle-flattener) for the heavy lifting.

This truffle plugin does very little in addition to what the base tool Nomic Labs has provided.

- It extracts all pragmas to the top of the flattened file
- the highest pragma version is selected
- saves the flattened source into `flatten/Flattened.sol`

## Installation
1. Install the plugin with npm
```
npm install truffle-flatten
```
1. Add the plugin to your `truffle.js` or `truffle-config.js` file
```js
module.exports = {
/* ... rest of truffle-config */

plugins: [
'truffle-flatten'
]
}
```

## Usage
```
truffle run flatten
```