{"id":15634768,"url":"https://github.com/paulrberg/prb-contracts","last_synced_at":"2025-04-13T00:43:52.587Z","repository":{"id":37970261,"uuid":"303152663","full_name":"PaulRBerg/prb-contracts","owner":"PaulRBerg","description":"Off-the-shelf Solidity smart contracts","archived":false,"fork":false,"pushed_at":"2025-04-08T17:18:18.000Z","size":6077,"stargazers_count":134,"open_issues_count":6,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-13T00:43:48.017Z","etag":null,"topics":["erc20","ethereum","hardhat","library","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/PaulRBerg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":"https://3cities.xyz/#/pay?c=CAESFAKY9DMuOFdjE4Wzl2YyUFipPiSfIgICATICCAJaFURvbmF0aW9uIHRvIFBhdWwgQmVyZw","github":"PaulRBerg"}},"created_at":"2020-10-11T15:33:22.000Z","updated_at":"2025-04-08T17:18:23.000Z","dependencies_parsed_at":"2023-12-24T19:27:40.397Z","dependency_job_id":"2b39d4b1-2382-456a-ae6c-6c95ef500db7","html_url":"https://github.com/PaulRBerg/prb-contracts","commit_stats":{"total_commits":284,"total_committers":7,"mean_commits":40.57142857142857,"dds":"0.22887323943661975","last_synced_commit":"61816529857ff28e806ada0169157d54af215718"},"previous_names":["paulrberg/contracts"],"tags_count":37,"template":false,"template_full_name":"PaulRBerg/hardhat-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRBerg%2Fprb-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRBerg%2Fprb-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRBerg%2Fprb-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaulRBerg%2Fprb-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaulRBerg","download_url":"https://codeload.github.com/PaulRBerg/prb-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"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":["erc20","ethereum","hardhat","library","smart-contracts","solidity"],"created_at":"2024-10-03T10:56:51.114Z","updated_at":"2025-04-13T00:43:52.581Z","avatar_url":"https://github.com/PaulRBerg.png","language":"Solidity","funding_links":["https://3cities.xyz/#/pay?c=CAESFAKY9DMuOFdjE4Wzl2YyUFipPiSfIgICATICCAJaFURvbmF0aW9uIHRvIFBhdWwgQmVyZw","https://github.com/sponsors/PaulRBerg"],"categories":[],"sub_categories":[],"readme":"# PRBContracts [![GitHub Actions][gha-badge]][gha] [![Foundry][foundry-badge]][foundry] [![License: MIT][license-badge]][license]\n\n[gha]: https://github.com/PaulRBerg/prb-contracts/actions\n[gha-badge]: https://github.com/PaulRBerg/prb-contracts/actions/workflows/ci.yml/badge.svg\n[foundry]: https://getfoundry.sh/\n[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg\n[license]: https://opensource.org/licenses/MIT\n[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg\n\nOff-the-shelf Solidity smart contracts.\n\n- Designed for Solidity \u003e=0.8.4\n- Uses custom errors instead of revert reason strings\n- Complementary to [OpenZeppelin's library](https://github.com/OpenZeppelin/openzeppelin-contracts)\n- Well-documented via NatSpec comments\n- Thoroughly tested with Foundry\n\nI initially created this library to streamline my personal workflow, as I was tired of having to maintain identical\ncontracts across multiple repositories. However, if you find this library beneficial to your own projects, that's a\nwin-win situation for both of us.\n\n## Install\n\n### Foundry\n\nFirst, run the install step:\n\n```sh\nforge install --no-commit PaulRBerg/prb-contracts@v5\n```\n\nYour `.gitmodules` file should now contain the following entry:\n\n```toml\n[submodule \"lib/prb-contracts\"]\n  branch = \"v5\"\n  path = \"lib/prb-contracts\"\n  url = \"https://github.com/PaulRBerg/prb-contracts\"\n```\n\nFinally, add this to your `remappings.txt` file:\n\n```text\n@prb/contracts/=lib/prb-contracts/src/\n```\n\n### Hardhat\n\n```sh\npnpm add @prb/contracts\n```\n\n## Usage\n\nOnce installed, you can use the contracts like this:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity \u003e=0.8.4;\n\nimport { ERC20 } from \"@prb/contracts/token/erc20/ERC20.sol\";\nimport { ERC20Permit } from \"@prb/contracts/token/erc20/ERC20Permit.sol\";\n\ncontract MyToken is ERC20, ERC20Permit {\n  constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20Permit(name_, symbol_, decimals_) {}\n}\n```\n\n## Contributing\n\nFeel free to dive in! [Open](https://github.com/PaulRBerg/prb-proxy/issues/new) an issue,\n[start](https://github.com/PaulRBerg/prb-proxy/discussions/new) a discussion or submit a PR.\n\n### Pre Requisites\n\nYou will need the following software on your machine:\n\n- [Git](https://git-scm.com/downloads)\n- [Foundry](https://github.com/foundry-rs/foundry)\n- [Node.Js](https://nodejs.org/en/download/)\n- [Pnpm](https://pnpm.io)\n\nIn addition, familiarity with [Solidity](https://soliditylang.org/) is requisite.\n\n### Set Up\n\nClone this repository:\n\n```sh\n$ git clone git@github.com:PaulRBerg/prb-contracts.git\n```\n\nThen, inside the project's directory, run this to install the Node.js dependencies:\n\n```sh\n$ pnpm install\n```\n\nNow you can start making changes.\n\n### Syntax Highlighting\n\nYou will need the following VSCode extensions:\n\n- [hardhat-solidity](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)\n- [vscode-tree-language](https://marketplace.visualstudio.com/items?itemName=CTC.vscode-tree-extension)\n\n## Security\n\nWhile I have strict standards for code quality and test coverage, it's important to note that this project may not be\nentirely risk-free. Although I have taken measures to ensure the security of the contracts, they have not yet been\naudited by a third-party security researcher.\n\n### Caveat Emptor\n\nPlease be aware that this software is experimental and is provided on an \"as is\" and \"as available\" basis. I do not\noffer any warranties, and I cannot be held responsible for any direct or indirect loss resulting from the continued use\nof this codebase.\n\n### Contact\n\nIf you discover any bugs or security issues, please report them via [Telegram](https://t.me/PaulRBerg).\n\n## Related Efforts\n\n- [openzeppelin-contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)\n- Alberto Cuesta Cañada's [ERC20Permit](https://github.com/alcueca/ERC20Permit) and\n  [Orchestrated](https://github.com/alcueca/Orchestrated)\n\n## License\n\nThis project is licensed under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulrberg%2Fprb-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulrberg%2Fprb-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulrberg%2Fprb-contracts/lists"}