Flaterra
Inspired by "earth" in Portuguese, terra and the flatness of the Earth.
Flaterra parses the provided Solidity source file and adds any other imported files. This is useful if you want to upload your source code to a block explorer for verification, use it with Remix or to run analysis on it, for example with MythX or Mythril.
A way to make Solidity source code flat like the earth.
Install
Install it with pip from PyPI.
$ pip install --user flaterra
Usage
Specify the main contract you want flatten with --contract=.
$ flaterra --contract=ERC20.sol
INFO:root:Reading file .//ERC20.sol
INFO:root:Reading file .//./IERC20.sol
INFO:root:Reading file .//../../math/SafeMath.sol
INFO:root:Writing flattened file ERC20_flat.sol
It assumes the contract is in the current folder. If the contract is in another folder specify it with --folder=contracts/.
Details
It is able to read import formats like
import "./contract.sol";
import './another_contract.sol';
import {Contract1, Contract2} from "contracts.sol";
Pragmas are added only from the main Solidity file. These formats are supported.
pragma solidity 0.5.0;
pragma experimental ABIEncoderV2;
Metadata
Release files for flaterra 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flaterra-0.1.7.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flaterra-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / flaterra-0.1.7.tar.gz
| Download URL | flaterra-0.1.7.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93dfba5f181559aa7175cf517e5fb4d64ac546f6b32b6277848535c773349fca
|
|
BLAKE2b-256 checksum How to use checksums |
4a83b4750cbf07902c185f04de28e6f99223a8937a8d6a3ff5a6829a44a885ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / flaterra-0.1.7-py3-none-any.whl
| Download URL | flaterra-0.1.7-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
977a1e9a17bb7827a93378da344c06ef1116c83351f42bdc7491c2c9b3f1cb19
|
|
BLAKE2b-256 checksum How to use checksums |
8f7b1dad1416b9e3d18543ca8542cf6d94449c45aa3db7e94a0987534c0bef88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|