No project description provided
Project description
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;
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flaterra-0.1.7.tar.gz
.
File metadata
- Download URL: flaterra-0.1.7.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93dfba5f181559aa7175cf517e5fb4d64ac546f6b32b6277848535c773349fca |
|
MD5 | 87082b3997a3848b2c68604365a2fa29 |
|
BLAKE2b-256 | 4a83b4750cbf07902c185f04de28e6f99223a8937a8d6a3ff5a6829a44a885ac |
File details
Details for the file flaterra-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: flaterra-0.1.7-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 977a1e9a17bb7827a93378da344c06ef1116c83351f42bdc7491c2c9b3f1cb19 |
|
MD5 | 38b8a50697f052d02e7f637e2c40377c |
|
BLAKE2b-256 | 8f7b1dad1416b9e3d18543ca8542cf6d94449c45aa3db7e94a0987534c0bef88 |