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 | Provenance | Actions |
|---|---|---|---|---|
| flaterra-0.1.7.tar.gz | 3.7 kB | Without provenance | Details for flaterra-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flaterra-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for flaterra-0.1.7-py3-none-any.whl |
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
|
Security for flaterra 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.