{"id":15538848,"url":"https://github.com/ethjs/ethjs-abi","last_synced_at":"2025-05-07T15:08:20.232Z","repository":{"id":57147886,"uuid":"74624832","full_name":"ethjs/ethjs-abi","owner":"ethjs","description":"Just the encoding and decoding from the ethers-wallet module.","archived":false,"fork":false,"pushed_at":"2024-08-27T20:34:47.000Z","size":520,"stargazers_count":32,"open_issues_count":9,"forks_count":31,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T15:08:20.058Z","etag":null,"topics":["abi","decode","encoding","ethereum","ethjs","js","module","solidity","web3"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-24T00:36:21.000Z","updated_at":"2024-07-07T20:43:22.000Z","dependencies_parsed_at":"2025-04-28T06:00:57.007Z","dependency_job_id":"5a9fcfae-5f9d-481e-a1e0-0aee3715efea","html_url":"https://github.com/ethjs/ethjs-abi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-abi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-abi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-abi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethjs%2Fethjs-abi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethjs","download_url":"https://codeload.github.com/ethjs/ethjs-abi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902614,"owners_count":21822261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abi","decode","encoding","ethereum","ethjs","js","module","solidity","web3"],"created_at":"2024-10-02T12:06:57.559Z","updated_at":"2025-05-07T15:08:20.203Z","avatar_url":"https://github.com/ethjs.png","language":"JavaScript","readme":"## ethjs-abi\n\nJust method and event encoding and decoding from the [`ethers-wallet`](https://github.com/ethers-io/ethers-wallet).\n\nNote, this package is experimental, and is not ready for production use.\n\n\u003cdiv\u003e\n  \u003c!-- Dependency Status --\u003e\n  \u003ca href=\"https://david-dm.org/ethjs/ethjs-abi\"\u003e\n    \u003cimg src=\"https://david-dm.org/ethjs/ethjs-abi.svg\"\n    alt=\"Dependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- devDependency Status --\u003e\n  \u003ca href=\"https://david-dm.org/ethjs/ethjs-abi#info=devDependencies\"\u003e\n    \u003cimg src=\"https://david-dm.org/ethjs/ethjs-abi/dev-status.svg\" alt=\"devDependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Build Status --\u003e\n  \u003ca href=\"https://travis-ci.org/ethjs/ethjs-abi\"\u003e\n    \u003cimg src=\"https://travis-ci.org/ethjs/ethjs-abi.svg\"\n    alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- NPM Version --\u003e\n  \u003ca href=\"https://www.npmjs.org/package/ethjs-abi\"\u003e\n    \u003cimg src=\"http://img.shields.io/npm/v/ethjs-abi.svg\"\n    alt=\"NPM version\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Test Coverage --\u003e\n  \u003ca href=\"https://coveralls.io/r/ethjs/ethjs-abi\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/ethjs/ethjs-abi/badge.svg\" alt=\"Test Coverage\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Javascript Style --\u003e\n  \u003ca href=\"http://airbnb.io/javascript/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-airbnb-brightgreen.svg\" alt=\"js-airbnb-style\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## Usage\n\n```js\nconst abi = require('ethjs-abi');\nconst SimpleStoreABI = [{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"get\",\"outputs\":[{\"name\":\"storeValue\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_newValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"_sender\",\"type\":\"address\"}],\"name\":\"SetComplete\",\"type\":\"event\"}];\n\n\nconst setInputBytecode = abi.encodeMethod(SimpleStoreABI[0], [24000]);\n\n// returns 0x60fe47b10000000000000000000000000000000000000000000000000000000000005dc0\n\nconst setOutputBytecode = abi.decodeMethod(SimpleStoreABI[0], \"0x0000000000000000000000000000000000000000000000000000000000000001\");\n\n// returns  Result { '0': true }\n\n\n\nconst getInputBytecode = abi.encodeMethod(SimpleStoreABI[1], []);\n\n// returns 0x6d4ce63c\n\nconst getMethodOutputBytecode = abi.decodeMethod(SimpleStoreABI[1], \"0x000000000000000000000000000000000000000000000000000000000000b26e\");\n\n// returns Result { '0': \u003cBN: b26e\u003e, storeValue: \u003cBN: b26e\u003e }\n\n\n\nconst SetCompleteInputBytecode = abi.encodeEvent(SimpleStoreABI[2], [24000, \"0xca35b7d915458ef540ade6068dfe2f44e8fa733c\"]);\n\n// returns 0x10e8e9bc0000000000000000000000000000000000000000000000000000000000005dc0000000000000000000000000ca35b7d915458ef540ade6068dfe2f44e8fa733c\n\nconst SetCompleteOutputBytecode = abi.decodeEvent(SimpleStoreABI[2], \"0x0000000000000000000000000000000000000000000000000000000000000d7d000000000000000000000000ca35b7d915458ef540ade6068dfe2f44e8fa733c\", [\"0xc36800ebd6079fdafc3a7100d0d1172815751804a6d1b7eb365b85f6c9c80e61\"]);\n\n/* returns   Result {\n  '0': \u003cBN: d7d\u003e,\n  '1': '0xca35b7d915458ef540ade6068dfe2f44e8fa733c',\n  _newValue: \u003cBN: d7d\u003e,\n  _sender: '0xca35b7d915458ef540ade6068dfe2f44e8fa733c' }\n*/\n\nconst methodSig = abi.encodeSignature(SimpleStoreABI[2]);\n\n/* returns 0x10e8e9bc */\n```\n\nfor contract SimpleStore:\n\n```\npragma solidity ^0.4.4;\n\ncontract SimpleStore {\n  uint store;\n\n  function set(uint256 _value) returns (bool) {\n    store = _value;\n\n    SetComplete(store, msg.sender);\n\n    return true;\n  }\n\n  function get() returns (uint256 storeValue) {\n    return store;\n  }\n\n  event SetComplete(uint256 _newValue, address _sender);\n}\n```\n\n## About\n\nJust the encoding and decoding of contract data.\n\n## Contributing\n\nPlease help better the ecosystem by submitting issues and pull requests to default. We need all the help we can get to build the absolute best linting standards and utilities. We follow the AirBNB linting standard and the unix philosophy.\n\n## Guides\n\nYou'll find more detailed information on using `ethjs-abi` and tailoring it to your needs in our guides:\n\n- [User guide](docs/user-guide.md) - Usage, configuration, FAQ and complementary tools.\n- [Developer guide](docs/developer-guide.md) - Contributing to `ethjs-abi` and writing your own code and coverage.\n\n## Help out\n\nThere is always a lot of work to do, and will have many rules to maintain. So please help out in any way that you can:\n\n- Create, enhance, and debug ethjs rules (see our guide to [\"Working on rules\"](./github/CONTRIBUTING.md)).\n- Improve documentation.\n- Chime in on any open issue or pull request.\n- Open new issues about your ideas for making `ethjs-abi` better, and pull requests to show us how your idea works.\n- Add new tests to *absolutely anything*.\n- Create or contribute to ecosystem tools, like modules for encoding or contracts.\n- Spread the word.\n\nWe communicate via [issues](https://github.com/ethjs/ethjs-abi/issues) and [pull requests](https://github.com/ethjs/ethjs-abi/pulls).\n\n## Important documents\n\n- [Changelog](CHANGELOG.md)\n- [Code of Conduct](CODE_OF_CONDUCT.md)\n- [License](https://raw.githubusercontent.com/ethjs/ethjs-abi/master/LICENSE)\n\n## Licence\n\nThis project is licensed under the MIT license, Copyright (c) 2016 Nick Dodson/2014 Richard Moore. For more information see LICENSE.md.\n\n```\nThe MIT License (MIT)\n \nCopyright (c) 2016 Nick Dodson\nCopyright (c) 2014 Richard Moore\n \nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n## Original Port Author\n\nRichard Moore \u003cme@ricmoo.com\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethjs%2Fethjs-abi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethjs%2Fethjs-abi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethjs%2Fethjs-abi/lists"}