{"id":22520870,"url":"https://github.com/augmint/abiniser","last_synced_at":"2026-04-30T00:31:52.772Z","repository":{"id":31896428,"uuid":"130672428","full_name":"Augmint/abiniser","owner":"Augmint","description":"Truffle post processor to generate FE readable files","archived":false,"fork":false,"pushed_at":"2023-01-16T12:01:21.000Z","size":112,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-02T17:04:43.721Z","etag":null,"topics":["abi","ethereum","ethereum-contract","ethereum-dapp","truffle","truffle-post-processor"],"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/Augmint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-23T09:25:23.000Z","updated_at":"2020-09-13T09:55:07.000Z","dependencies_parsed_at":"2023-02-10T03:00:41.778Z","dependency_job_id":null,"html_url":"https://github.com/Augmint/abiniser","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augmint%2Fabiniser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augmint%2Fabiniser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augmint%2Fabiniser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Augmint%2Fabiniser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Augmint","download_url":"https://codeload.github.com/Augmint/abiniser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245961360,"owners_count":20700892,"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","ethereum","ethereum-contract","ethereum-dapp","truffle","truffle-post-processor"],"created_at":"2024-12-07T05:08:47.874Z","updated_at":"2026-04-30T00:31:52.744Z","avatar_url":"https://github.com/Augmint.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Abiniser\n\nTruffle post processor to generate and maintain ABI and deployments files for FE use. Abiniser aims to address the shortcoming of truffle-contract json format which can't handle multiple deployments of same contract source file and can't manage multiple ABI versions.\n\nAbiniser works on files generated by truffle and its output keeps track of abi version and deployments on different networks.\n\nAbineser's abi and deployment files output is intended to be added to repository so it can be used by front end code.\n\nIt's an alpha implementation, being tested on [Augmint](https://github.com/Augmint) projects. Expect breaking changes (e.g. output format changes) even with minor version bumps.\n\n# Usage\n\n## Install\n\n```\n$ npm -g install abiniser\n```\n\n## Workflow\n\nEach time your abis changed or a new deployment (to any network) done abiniser should be run. It will automatically create new abi file version (based on abi hash) and will add new entries to deployment files.\nThese can be safely checked in\n\nTODO: more description on the workflow\n\n## Run\n\n```\n$ abiniser -h\n\nUsage: abiniser [options] [command]\n\nTruffle post processor to generate ABI and deployment repository files\n\nOptions:\n  -V, --version                            output the version number\n  -h, --help                               output usage information\n\nCommands:\n  generate|gen [options]                   Generate deployment and abi files from Truffle generated JSON files\n  removeSourceEntries|removeSrc [options]  remove source entries from all deployment files\n  check [options]                          Basic integrity check of files generated. Checks references between Abi files and deployment files\n\n  More info: https://github.com/Augmint/abiniser\n\n  Examples:\n      abiniser generate\n        Creates abi and deployments jsons from all truffle contract json files listed in abiniser.json config file\n```\n\n###Generate deploy and abi files\n\n```\n$abiniser generate -h\nUsage: generate|gen [options]\n\nGenerate deployment and abi files from Truffle generated JSON files\n\nOptions:\n  -c, --config-file [value]             Sets abiniser config file. (default: \"./abiniser.json\")\n  -a, --abi-output-dir [value]          Sets abi output directory. (default: \"./abiniser/abis\")\n  -d, --deployments-output-dir [value]  Sets deployments output directory. (default: \"./abiniser/deployments\")\n  -n, --network-id [value]              Generate deployments file only for the given network id number\n  -i, --input-dir [value]               Sets input directory with truffle contract json files. (default: \"./build/contracts\")\n  -r, --regenerate                      Regenerate abi and deploy files even if they exists with same abi hash\n  -s, --source-include                  Include contract source in generated deploy file\n  -h, --help                            output usage information\n```\n\nCreate `abiniser.json` file with the list of contract files to work on:\n\n```\n{\n    \"truffleContractFiles\": [\"Contract1.json\", \"Contract2.json\"]\n}\n```\n\nYou can set command line options in `abiniser.json` too.\n\n# Output format\n\n## Abi files\n\nOne file per contract and abi version is generated:\n\n`abiniser/abis/\u003cContract Name\u003e_\u003cAbi version hash\u003e.json`\n\nEach file contains the contract's Abi in [Solidity ABI JSON format](https://solidity.readthedocs.io/en/develop/abi-spec.html#abi-json).\n\n## Deployment files\n\n`abiniser/deployments/\u003cNetwork Id\u003e/\u003cContract Name\u003e_DEPLOYS.json` files:\n\n```\n{\n    \"contractName\": \"\u003ccontract name\u003e\",\n    \"latestAbiHash\": \"7fde219f…\",\n    \"deployedAbis\": {\n        \"7fde219f…\": {\n            \"latestDeployedAddress\": \"7fde219f…\",\n            \"deployments\": {\n                \"7fde219f…\": {\n                    \"generatedAt\": \"\u003cISO86901 timestamp\u003e\",\n                    \"truffleContractFileUpdatedAt\": \"\u003cISO86901 timestamp when source truffle contracts json was generated\u003e\",\n                    \"deployTransactionHash\": \"0x12…\",\n                    \"compiler\": {\n                        \"name\": \"solc\",\n                        \"version\": \"0.4.23\"\n                    },\n                    \"sourceHash\": \"7fde219f…\",\n                    \"bytecodeHash\": \"a454e8ba…\",\n                    \"deployedBytecodeHash\": \"55abcee…\",\n                    \"source\": \"\u003csource code from truffle contract json\u003e\"\n                }\n                \"0xab444b...\": {…}\n            }\n        },\n\n        \"a454e8ba… \": {\n            \"latestDeployedAddress\": \"a9de219f…\",\n            \"deployments\": {…}\n        }\n    }\n}\n```\n\n## Maintenance features\n\n### Checks on generated files\n\n```\n$ abiniser check -h\nUsage: check [options]\n\nBasic integrity check of files generated. Checks references between Abi files and deployment files\n\nOptions:\n  -a, --abi-output-dir [value]          Sets abi output directory to work on. (default: \"./abiniser/abis\")\n  -d, --deployments-output-dir [value]  Sets deployments output directory to work on. (default: \"./abiniser/deployments\")\n  -h, --help                            output usage information\n```\n\n### Remove all source entries from deploy files already generated by abiniser\n\n```\n$ abiniser removeSourceEntries -h\nUsage: removeSourceEntries|removeSrc [options]\n\nremove source entries from all deployment files\n\nOptions:\n  -d, --deployments-output-dir [value]  Sets deployments output directory to work on. (default: \"./abiniser/deployments\")\n  -h, --help                            output usage information\n```\n\n## Contribution\n\nIssue reports, feature suggestions and PRs are more than welcome.\n\n## Authors\n\n### Initial version\n\n-   concept: [phraktle](https://github.com/phraktle) \u0026 [szerintedmi](https://github.com/szerintedmi)\n-   [szerintedmi](https://github.com/szerintedmi)\n\nCheck the whole team on [augmint.org](https://www.augmint.org)\n\n## Licence\n\nThis project is licensed under the MIT license - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugmint%2Fabiniser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugmint%2Fabiniser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugmint%2Fabiniser/lists"}