{"id":28197057,"url":"https://github.com/solidstate-network/hardhat-abi-exporter","last_synced_at":"2025-05-16T17:02:19.767Z","repository":{"id":41379105,"uuid":"284350044","full_name":"solidstate-network/hardhat-abi-exporter","owner":"solidstate-network","description":"🧰 Export Ethereum contract ABIs on compilation ⚙️","archived":false,"fork":false,"pushed_at":"2025-05-07T03:18:44.000Z","size":605,"stargazers_count":77,"open_issues_count":3,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T04:25:34.149Z","etag":null,"topics":["abi","blockchain","buidler","dapps","eth","ether","ethereum","hardhat","smart-contracts","solc","solidity","version-control","wow"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/solidstate-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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":"2020-08-01T22:36:20.000Z","updated_at":"2025-04-30T18:01:12.000Z","dependencies_parsed_at":"2024-01-20T18:44:29.531Z","dependency_job_id":"c7f5f490-b1dd-4425-9052-38981940efa5","html_url":"https://github.com/solidstate-network/hardhat-abi-exporter","commit_stats":{"total_commits":115,"total_committers":10,"mean_commits":11.5,"dds":"0.26086956521739135","last_synced_commit":"f79ddd8a41213bc52c6eebe2b9aae47098020c80"},"previous_names":["itsnickbarry/buidler-abi-exporter","solidstate-network/hardhat-abi-exporter"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-abi-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-abi-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-abi-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-abi-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidstate-network","download_url":"https://codeload.github.com/solidstate-network/hardhat-abi-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254573589,"owners_count":22093731,"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","blockchain","buidler","dapps","eth","ether","ethereum","hardhat","smart-contracts","solc","solidity","version-control","wow"],"created_at":"2025-05-16T17:00:46.715Z","updated_at":"2025-05-16T17:02:17.364Z","avatar_url":"https://github.com/solidstate-network.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat ABI Exporter\n\nExport Ethereum smart contract ABIs on compilation via Hardhat.\n\n\u003e Versions of this plugin prior to `2.0.0` were released as `buidler-abi-exporter`.\n\n## Installation\n\n```bash\nnpm install --save-dev hardhat-abi-exporter\n# or\nyarn add --dev hardhat-abi-exporter\n```\n\n## Usage\n\nLoad plugin in Hardhat config:\n\n```javascript\nrequire('hardhat-abi-exporter');\n```\n\nAdd configuration under the `abiExporter` key:\n\n| option         | description                                                                                                                                                  | default      |\n| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |\n| `path`         | path to ABI export directory (relative to Hardhat root)                                                                                                      | `'./abi'`    |\n| `runOnCompile` | whether to automatically export ABIs during compilation                                                                                                      | `false`      |\n| `clear`        | whether to delete old ABI files in `path` on compilation and on clean                                                                                        | `false`      |\n| `flat`         | whether to flatten output directory (may cause name collisions)                                                                                              | `false`      |\n| `only`         | `Array` of `String` matchers used to select included contracts, defaults to all contracts if `length` is 0                                                   | `[]`         |\n| `except`       | `Array` of `String` matchers used to exclude contracts                                                                                                       | `[]`         |\n| `spacing`      | number of spaces per indentation level of formatted output                                                                                                   | `2`          |\n| `pretty`       | whether to use interface-style formatting of output for better readability                                                                                   | `false`      |\n| `format`       | format type (\"json\", \"minimal\", \"fullName\"). Alternative to `pretty`                                                                                         | `json`       |\n| `filter`       | `Function` with signature `(abiElement: any, index: number, abi: any, fullyQualifiedName: string) =\u003e boolean` used to filter elements from each exported ABI | `() =\u003e true` |\n| `rename`       | `Function` with signature `(sourceName: string, contractName: string) =\u003e string` used to rename an exported ABI (incompatible with `flat` option)            | `undefined`  |\n\nNote that the configuration formatted as either a single `Object`, or an `Array` of objects. An `Array` may be used to specify multiple outputs.\n\n```javascript\nabiExporter: {\n  path: './data/abi',\n  runOnCompile: true,\n  clear: true,\n  flat: true,\n  only: [':ERC20$'],\n  spacing: 2,\n  pretty: true,\n  format: \"minimal\",\n}\n\n// or\n\nabiExporter: [\n  {\n    path: './abi/pretty',\n    pretty: true,\n  },\n  {\n    path: './abi/ugly',\n    pretty: false,\n  },\n]\n\n// or\n\nabiExporter: [\n  {\n    path: './abi/json',\n    format: \"json\",\n  },\n  {\n    path: './abi/minimal',\n    format: \"minimal\",\n  },\n  {\n    path: './abi/fullName',\n    format: \"fullName\",\n  },\n]\n```\n\nThe included Hardhat tasks may be run manually:\n\n```bash\nnpx hardhat export-abi\nnpx hardhat clear-abi\n# or\nyarn run hardhat export-abi\nyarn run hardhat clear-abi\n```\n\nBy default, the hardhat `compile` task is run before exporting ABIs. This behavior can be disabled with the `--no-compile` flag:\n\n```bash\nnpx hardhat export-abi --no-compile\n# or\nyarn run hardhat export-abi --no-compile\n```\n\nThe `path` directory will be created if it does not exist.\n\nThe `clear` option is set to `false` by default because it represents a destructive action, but should be set to `true` in most cases.\n\nABIs files are saved in the format `[CONTRACT_NAME].json`.\n\n## Development\n\nInstall dependencies via Yarn:\n\n```bash\nyarn install\n```\n\nSetup Husky to format code on commit:\n\n```bash\nyarn prepare\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-abi-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidstate-network%2Fhardhat-abi-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-abi-exporter/lists"}