{ "info": { "author": "Ben Hauser", "author_email": "b.hauser@zerolaw.tech", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# abi2solc\n\n[![Pypi Status](https://img.shields.io/pypi/v/abi2solc.svg)](https://pypi.org/project/abi2solc/) [![Build Status](https://img.shields.io/travis/com/iamdefinitelyahuman/abi2solc.svg)](https://travis-ci.com/iamdefinitelyahuman/abi2solc) [![Coverage Status](https://coveralls.io/repos/github/iamdefinitelyahuman/abi2solc/badge.svg?branch=master)](https://coveralls.io/github/iamdefinitelyahuman/abi2solc?branch=master)\n\nA library for generating Solidity interfaces from ABIs.\n\n## Installation\n\nYou can install the latest release via ``pip``:\n\n```bash\n$ pip install abi2solc\n```\n\nOr clone the repo and use ``setuptools`` for the most up-to-date version:\n\n```bash\n$ python setup.py install\n```\n\n## Usage\n\n```python\n>>> import abi2solc\n\n>>> abi = [{'constant': False, 'inputs': [{'name': 'spender', 'type': 'address'}, ...\n>>> interface = abi2solc.generate_interface(abi, \"TestInterface\")\n\n>>> print(interface)\n'''pragma solidity ^0.5.0;\n\ninterface ExampleInterface {\n event Approval (address indexed tokenOwner, address indexed spender, uint256 tokens);\n event Transfer (address indexed from, address indexed to, uint256 tokens);\n\n function approve (address spender, uint256 tokens) external returns (bool success);\n function transfer (address to, uint256 tokens) external returns (bool success);\n function transferFrom (address from, address to, uint256 tokens) external returns (bool success);\n function allowance (address tokenOwner, address spender) external view returns (uint256 remaining);\n function balanceOf (address tokenOwner) external view returns (uint256 balance);\n function totalSupply () external view returns (uint256);\n}'''\n```\n\n## Supported Versions\n\n* By default, `abi2solc` generates interfaces with pragma `^0.5.0`\n* With the `solc4=True` kwarg, interfaces are generated with pragma `^0.4.17`\n* If `solc4=True` and the ABI also contains tuple types, an [abstract base contract](https://solidity.readthedocs.io/en/v0.4.25/contracts.html#abstract-contracts) is generated with pragma `^0.4.22`\n\n## Tests\n\nTo run the test suite:\n\n```bash\n$ tox\n```\n\nTests make use of [``py-solc-x``](https://github.com/iamdefinitelyahuman/py-solc-x).\n\n## Development\n\nThis project is still under active development and should be considered a beta. Comments, questions, criticisms and pull requests are welcomed! Feel free to open an issue if you encounter a problem or would like to suggest a new feature.\n\n## License\n\nThis project is licensed under the [MIT license](LICENSE).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iamdefinitelyahuman/abi2solc", "keywords": "ethereum,solidity,solc,abi", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "abi2solc", "package_url": "https://pypi.org/project/abi2solc/", "platform": "", "project_url": "https://pypi.org/project/abi2solc/", "project_urls": { "Homepage": "https://github.com/iamdefinitelyahuman/abi2solc" }, "release_url": "https://pypi.org/project/abi2solc/0.1.0/", "requires_dist": null, "requires_python": ">=3.6, <4", "summary": "A library for generating Solidity interfaces from ABIs.", "version": "0.1.0" }, "last_serial": 5906363, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "70443e8307cbfea72be2fca3766802ea", "sha256": "61ab3975e6b5247a8a069b04a645c2e43ab985f4cd062b7726654ea87a3eed68" }, "downloads": -1, "filename": "abi2solc-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "70443e8307cbfea72be2fca3766802ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 4826, "upload_time": "2019-09-30T10:13:24", "url": "https://files.pythonhosted.org/packages/09/2c/c941d6311ae79373ce911ed24c9d4efb49537494f0220db2a139ad5fd439/abi2solc-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d7b9c223b138c6c78b86e9c41c336c7", "sha256": "0a7a214b4ab645fb69e5a570feda9ccbb2d69793ed510c147b3846ee97014caf" }, "downloads": -1, "filename": "abi2solc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7d7b9c223b138c6c78b86e9c41c336c7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 4097, "upload_time": "2019-09-30T10:13:27", "url": "https://files.pythonhosted.org/packages/cd/58/2e3e69384b776f6756a7efa313ebe7b15dc7633e480d12cea582fc63a7ce/abi2solc-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70443e8307cbfea72be2fca3766802ea", "sha256": "61ab3975e6b5247a8a069b04a645c2e43ab985f4cd062b7726654ea87a3eed68" }, "downloads": -1, "filename": "abi2solc-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "70443e8307cbfea72be2fca3766802ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6, <4", "size": 4826, "upload_time": "2019-09-30T10:13:24", "url": "https://files.pythonhosted.org/packages/09/2c/c941d6311ae79373ce911ed24c9d4efb49537494f0220db2a139ad5fd439/abi2solc-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d7b9c223b138c6c78b86e9c41c336c7", "sha256": "0a7a214b4ab645fb69e5a570feda9ccbb2d69793ed510c147b3846ee97014caf" }, "downloads": -1, "filename": "abi2solc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7d7b9c223b138c6c78b86e9c41c336c7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 4097, "upload_time": "2019-09-30T10:13:27", "url": "https://files.pythonhosted.org/packages/cd/58/2e3e69384b776f6756a7efa313ebe7b15dc7633e480d12cea582fc63a7ce/abi2solc-0.1.0.tar.gz" } ] }