{"id":13632881,"url":"https://github.com/HashEx/abiencoder","last_synced_at":"2025-04-18T05:33:31.410Z","repository":{"id":38256645,"uuid":"376258286","full_name":"HashEx/abiencoder","owner":"HashEx","description":"HashEx ABI Encoder","archived":false,"fork":false,"pushed_at":"2024-10-23T14:30:26.000Z","size":23903,"stargazers_count":120,"open_issues_count":4,"forks_count":54,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-23T17:20:03.808Z","etag":null,"topics":["ethereum","hacktoberfest","solidity"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HashEx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-06-12T10:12:13.000Z","updated_at":"2024-10-23T14:32:13.000Z","dependencies_parsed_at":"2024-01-14T07:18:10.087Z","dependency_job_id":"c71d6fbd-c497-4ca9-acb7-3277011ea919","html_url":"https://github.com/HashEx/abiencoder","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/HashEx%2Fabiencoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashEx%2Fabiencoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashEx%2Fabiencoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashEx%2Fabiencoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HashEx","download_url":"https://codeload.github.com/HashEx/abiencoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223775290,"owners_count":17200487,"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":["ethereum","hacktoberfest","solidity"],"created_at":"2024-08-01T22:03:21.658Z","updated_at":"2024-11-09T01:30:57.802Z","avatar_url":"https://github.com/HashEx.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# ABI Encoder\n\n[https://abi.hashex.org](https://abi.hashex.org)\n\n## Description\n\nFree [ABI](https://docs.soliditylang.org/en/v0.8.2/abi-spec.html) encoder online service that allows you to encode your [Solidity](https://docs.soliditylang.org/en/v0.8.6/) contract’s  functions and constructor arguments.\n\nABI itself is the description of the code interface. It’s a way for the contracts to interact within an ecosystem as well as contract-to-contract.\n\nSmart contract ABI parsing is required for verifying the contract on Etherscan or making a transaction to call a method, for example for a Timelock contract. For most actions regarding this code, you would require a special tool, and the arguments have to be encoded in a specific way. HashEx tool does it automatically, free, and doesn’t involve downloading any extra applications.\n\nCode itself is used in the byte format, so it’s harder to decode it correctly. For easy interactions with said code, HashEx has created its ABI decoder. An additional tool allows you to manually enter the values for the parameters.\n\n### Supported types\n\n- uint8..256\n- uint[]8..256\n- bytes8..32\n- bytes[]8..32\n- address\n- address[]\n- string\n- bool\n- bool[]\n- tuple (supports Struct from ABI)\n\nFeel free to open PR to add new types.\n\n## How to use\n\n### Manually enter\n\n1. Enter signature of function (Example: `transferFrom(adress, uint)`) manually with selecting \"your function\" option or use the \"constructor\" option.\n2. Add arguments, select the correct types.\n3. Fill the arguments.\n4. Encoded data will appear in the text area under the function. Click \"Copy\" button and paste it where ever you want.\n\n![image](./screenshots/manually-input.png)\n\n\n### Using ABI autoparse \n1. Enter your contract ABI into the text field and click \"Parse\" button.\n2. Select the function or constructor from the parsed list.\n3. Fill the arguments.\n4. Encoded data will appear in the text area under the function. Click \"Copy\" button and paste it where ever you want.\n\n![image](./screenshots/auto-parse.png)\n\n## How to encode struct arguments\n\n### Encode struct argument with existing ABI\n\n1. Enter your contract ABI into the text field and click \"Parse\" button.\n2. Select the function or constructor from the parsed list which has struct argument.\n3. Enter struct value according to example. Use Struct description under input as a hint.\n4. Encoded data will appear in the text area under the function. Click \"Copy\" button and paste it where ever you want.\n\n![image](./screenshots/struct-argument-example.png)\n\n### Encode struct argument without existing ABI\n\n0. Describe your function or constructor using ABI template.\n\nFunction example:\n\n```sol\n    contract MyCustomContract {\n        struct MyCustomStruct {\n            uint256 number;\n            address to;\n        }\n        constructor(MyCustomStruct memory _myCustomStruct) {\n            // some logic\n        }\n        function myCustomFunction(MyCustomStruct memory _myCustomStruct) {\n            // some logic\n        }\n    }\n```\n\nABI example:\n\n```js\n    [{\n        \"type\": \"constructor\",\n        \"name\": \"\",\n        \"inputs\": [{\n            \"components\": [{ \n                \"type\": \"uint256\",\n                \"name\": \"number\"\n            },{\n                \"type\": \"string\",\n                \"name\": \"note\"\n            }],\n            \"internalType\": \"struct MyCustomContract.MyCustomStruct\",\n            \"type\": \"tuple\",\n            \"name\": \"_myCustomStruct\"\n        }]\n    },{\n        \"type\": \"function\",\n        \"name\": \"myCustomFunction\",\n        \"inputs\": [{\n            \"components\": [{ \n                \"type\": \"uint256\",\n                \"name\": \"number\"\n            },{\n                \"type\": \"string\",\n                \"name\": \"note\"\n            }],\n            \"internalType\": \"struct MyCustomContract.MyCustomStruct\",\n            \"name\": \"_myCustomStruct\",\n            \"type\": \"tuple\"\n        }]\n    }]\n``` \n\n\n```js\n\"components\": [...],    // `components` field is for Struct fields description\n\"type\": \"tuple\",        // this type means you want to use Struct as argument\n```\n\nthen follow the [steps](#encode-struct-argument-with-existing-abi) as if you have ABI to parse.\n\n## How to run\n\n### Install dependencies\n`npm install` or `yarn`\n\n### Start project\n`npm start` or `yarn start`\n\n…and open http://localhost:3000 in your web browser.\n\n## Contributing\n\nThe site is powered by [CRA(Create React App)](https://reactjs.org/docs/create-a-new-react-app.html) using [React.js](https://reactjs.org/) and [ethers.js](https://github.com/ethers-io/ethers.js).\n\n1. Fork the repo on GitHub\n2. Clone the project to your own machine\n3. Commit changes to your own branch\n4. Push your work back up to your fork\n5. Submit a Pull request so that we can review your changes\n\nNOTE: Be sure to merge the latest from \"upstream\" before making a pull request!\n\n### Licenses\n\n[MIT](https://en.m.wikipedia.org/wiki/MIT_License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHashEx%2Fabiencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHashEx%2Fabiencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHashEx%2Fabiencoder/lists"}