{ "info": { "author": "Kyloon Chuah", "author_email": "kyloon@veriteos.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# Ethereum Contract\n\n[![Build Status](https://circleci.com/gh/ethereum/eth-abi.svg?style=shield)](https://circleci.com/gh/ethereum/eth-abi)\n[![Documentation Status](https://readthedocs.org/projects/eth-abi/badge/?version=latest)](https://readthedocs.org/projects/eth-abi/?badge=latest)\n[![PyPi version](https://img.shields.io/pypi/v/eth-abi.svg)](https://pypi.python.org/pypi/eth-abi)\n\n\nPython utilities for working with the Ethereum ABI\n\n\n## Installation\n\n```sh\npip install eth-abi\n```\n\n\n\n## Documentation\n\n### Decoding\n\n\nThese functions are intended for decoding return values from the EVM.\n\n\n* ``eth_abi.decode_single(type, data)``\n\nThis function tries to decode ``data`` into the python type that corresponds\nto the provided ``type``. This function accepts data of type bytes.\n\n\n.. code-block:: python\n\n >>> decode_single('uint256', b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0009')\n 12345\n\n\nThe **value** parameter is expected to be one of the recognized EVM types.\n\n\n.. note:: This function cannot be used to decode dynamic or array types such as ``bytes32[]``.\n\n\n* ``eth_abi.decode_abi(types, data)``\n\nThis function decodes ``data`` into the python type corresponding to the\nprovided ``types``. This function accepts arrays of type byte.\n\n\n.. code-block:: python\n\n >>> decode_abi(['uint256'], b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0009')\n [12345]\n >>> decode_abi(['bytes32', 'bytes32'], b'a\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00b\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00')\n ['a', 'b']\n\n\nThe **values** parameter is expected to be an iterable whose values are all one\nof the recognized EVM types.\n\n### Encoding\n\n\nThese functions are intended for encoding python values into representations\nthat are suitable for interacting with the EVM.\n\n\n* ``eth_abi.encode_single(type, value)``\n\nThis function encodes ``value`` in the ABI encoding for the provided ``type``.\n\n\n.. code-block:: python\n\n >>> encode_single('uint256', 12345)\n b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0009'\n\n\nThe **value** parameter is expected to be one of the recognized EVM types.\n\n.. note:: This function cannot be used to encode array types such as ``bytes32[]``.\n\n\n* ``eth_abi.encode_abi(types, values)``\n\nThis function encodes ``values`` in the ABI encoding for the corresponding type\nprovided by the ``types`` argument.\n\n\n.. code-block:: python\n\n >>> encode_abi(['uint256'], [12345])\n b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0009'\n >>> encode_abi(['bytes32', 'bytes32'], ['a', 'b'])\n b'a\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00b\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'\n\n\nThe **values** parameter is expected to be an iterable whose values are all one\nof the recognized EVM types.\n\n\n## Development\n\nClone the repository and then run:\n\n```sh\npip install -e . -r requirements-dev.txt\n```\n\n\n### Running the tests\n\nYou can run the tests with:\n\n```sh\npy.test tests\n```\n\nOr you can install `tox` to run the full test suite.\n\n\n### Releasing\n\nPandoc is required for transforming the markdown README to the proper format to\nrender correctly on pypi.\n\nFor Debian-like systems:\n\n```\napt install pandoc\n```\n\nOr on OSX:\n\n```sh\nbrew install pandoc\n```\n\nTo release a new version:\n\n```sh\nmake release bump=$$VERSION_PART_TO_BUMP$$\n```\n\n#### How to bumpversion\n\nThe version format for this repo is `{major}.{minor}.{patch}` for stable, and\n`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump,\nlike `make release bump=minor` or `make release bump=devnum`.\n\nIf you are in a beta version, `make release bump=stage` will switch to a stable.\n\nTo issue an unstable version when the current version is stable, specify the\nnew version explicitly, like `make release bump=\"--new-version 4.0.0-alpha.1 devnum\"`\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/veriteos/eth-abi", "keywords": "ethereum", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "veriteos-eth-abi", "package_url": "https://pypi.org/project/veriteos-eth-abi/", "platform": "", "project_url": "https://pypi.org/project/veriteos-eth-abi/", "project_urls": { "Homepage": "https://github.com/veriteos/eth-abi" }, "release_url": "https://pypi.org/project/veriteos-eth-abi/1.2.0.post0/", "requires_dist": [ "eth-utils (<2.0.0,>=1.2.0)", "eth-typing (<=2)", "parsimonious (==0.8.0)", "Sphinx (<2,>=1.6.5); extra == 'doc'", "sphinx-rtd-theme (>=0.1.9); extra == 'doc'" ], "requires_python": "", "summary": "Veriteos Ethereum ABI Utils", "version": "1.2.0.post0" }, "last_serial": 4306435, "releases": { "1.2.0.post0": [ { "comment_text": "", "digests": { "md5": "884ee32dcb507aff161088accf707bd8", "sha256": "a35952df26b2ecc28fc7bbcd2093fa137d6b20271e47d2c4b814a47c750fded8" }, "downloads": -1, "filename": "veriteos_eth_abi-1.2.0.post0-py2-none-any.whl", "has_sig": false, "md5_digest": "884ee32dcb507aff161088accf707bd8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20765, "upload_time": "2018-09-24T21:56:16", "url": "https://files.pythonhosted.org/packages/1a/90/3410db6d2c15255dc7551b3771d868875dfe8ff787486ac5d206eebe32a0/veriteos_eth_abi-1.2.0.post0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5215341df43ed2b905e4bf92bb45c51", "sha256": "70f12fa50917c198b1406dc695b96e257b6dc9885ca2d04931383e57be0b3b46" }, "downloads": -1, "filename": "veriteos-eth-abi-1.2.0.post0.tar.gz", "has_sig": false, "md5_digest": "f5215341df43ed2b905e4bf92bb45c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44320, "upload_time": "2018-09-24T21:56:17", "url": "https://files.pythonhosted.org/packages/e5/ed/63914c131201844e2935d0835c3b0daebeea7c1fb2373f7b9bd0ef6000ef/veriteos-eth-abi-1.2.0.post0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "884ee32dcb507aff161088accf707bd8", "sha256": "a35952df26b2ecc28fc7bbcd2093fa137d6b20271e47d2c4b814a47c750fded8" }, "downloads": -1, "filename": "veriteos_eth_abi-1.2.0.post0-py2-none-any.whl", "has_sig": false, "md5_digest": "884ee32dcb507aff161088accf707bd8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20765, "upload_time": "2018-09-24T21:56:16", "url": "https://files.pythonhosted.org/packages/1a/90/3410db6d2c15255dc7551b3771d868875dfe8ff787486ac5d206eebe32a0/veriteos_eth_abi-1.2.0.post0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5215341df43ed2b905e4bf92bb45c51", "sha256": "70f12fa50917c198b1406dc695b96e257b6dc9885ca2d04931383e57be0b3b46" }, "downloads": -1, "filename": "veriteos-eth-abi-1.2.0.post0.tar.gz", "has_sig": false, "md5_digest": "f5215341df43ed2b905e4bf92bb45c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44320, "upload_time": "2018-09-24T21:56:17", "url": "https://files.pythonhosted.org/packages/e5/ed/63914c131201844e2935d0835c3b0daebeea7c1fb2373f7b9bd0ef6000ef/veriteos-eth-abi-1.2.0.post0.tar.gz" } ] }