Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solidity-unfolder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solidity-unfolder

A Python package to unfold soldity code with imports into a single file.

  • 1.0.1
  • PyPI
  • Socket score

Maintainers
1

Solidity Unfolder

Unfolds all local imports in a solidity file to generate a flat solidity file.

Introduction

Manually combining all imports in a solidity file when verifying your contract source on Etherscan is time-consuming and cumbersome. This tool automatically traverses the dependency graph of imports and combines them in the correct order, which is ready to be pasted into the contract verifier.

NOTE: This tool won't work with imports that are aliased (i.e. import "./foo.sol" as bar; )

Installation

There's no any requirements for this tool.

pip install solidity-unfolder

Usage

usage: solu [-h] [-o *.sol] *.sol *.*.*

Unfolds all local imports in a solidity file to generate a flat solidity file.
Put the output file into out/ folders.

positional arguments:
  *.sol                 target filename with imports
  *.*.*                 solidity compiler version e.g. 0.4.24

optional arguments:
  -h, --help            show this help message and exit
  -o *.sol, --output *.sol
                        output filename (default: flat.sol)

Contact

Feel free to contact me if there's any problems. And welcome to open issues and send pull requests.

Inspired by BlockCatIO

License

MIT License (2018), Jun-You Liu

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc