{"id":19975437,"url":"https://github.com/briangershon/openzeppelin-solidity-hardhat-playground","last_synced_at":"2026-04-12T19:57:10.003Z","repository":{"id":40234665,"uuid":"443425096","full_name":"briangershon/openzeppelin-solidity-hardhat-playground","owner":"briangershon","description":"Develop, test and deploy Solidity contracts based on OpenZeppelin framework and Hardhat development environment. Deploy to Polygon blockchain.","archived":false,"fork":false,"pushed_at":"2022-05-18T21:22:09.000Z","size":896,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T09:45:05.483Z","etag":null,"topics":["ethereum","evm","github-actions","hardhat","openzeppelin","polygon","solidity","solidity-contracts","starter-template","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/briangershon.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":"2021-12-31T21:02:58.000Z","updated_at":"2022-05-18T20:37:48.000Z","dependencies_parsed_at":"2022-09-11T17:11:37.516Z","dependency_job_id":null,"html_url":"https://github.com/briangershon/openzeppelin-solidity-hardhat-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fopenzeppelin-solidity-hardhat-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fopenzeppelin-solidity-hardhat-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fopenzeppelin-solidity-hardhat-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fopenzeppelin-solidity-hardhat-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/briangershon","download_url":"https://codeload.github.com/briangershon/openzeppelin-solidity-hardhat-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241411480,"owners_count":19958746,"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","evm","github-actions","hardhat","openzeppelin","polygon","solidity","solidity-contracts","starter-template","testing"],"created_at":"2024-11-13T03:18:21.338Z","updated_at":"2025-12-31T01:06:46.513Z","avatar_url":"https://github.com/briangershon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openzeppelin-solidity-hardhat-playground\n\n![Solidity tests](https://github.com/briangershon/openzeppelin-solidity-hardhat-playground/actions/workflows/continuous-integration.yaml/badge.svg)\n\nDevelop, test and deploy Solidity contracts based on OpenZeppelin. Use Hardhat development environment. Deploy to Polygon.\n\nUse as a starter template for new Solidity projects.\n\nInitially based on the [OpenZeppelin Learn tutorial](https://docs.openzeppelin.com/learn/).\n\nTested with Node v16.15 (LTS).\n\nAdded:\n\n-   additional testing features\n    -   run tests locally (via `npm test`)\n    -   use [Chai matchers from Waffle](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html) (instead of OpenZeppelin Test Helpers)\n    -   includes Github Action to run tests\n-   solhint linter config (and then install plugin for your editor that supports solhint syntax highlighting)\n-   format files with Prettier (`npm run style`)\n-   configuration to deploy to Polygon Mumbai test network\n-   turn on Solidity optimization (1000 means optimize for more high-frequency usage of contract). [Compiler Options](https://docs.soliditylang.org/en/v0.7.2/using-the-compiler.html#input-description)\n-   add hardhat-etherscan for verifying contracts on PolygonScan (or Etherscan), which means uploading the source code so it's available for contract users to view/verify. For more info see [hardhat-etherscan plugin](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html).\n\n## Deploying\n\n### Deploy to Polygon Mumbai Testnet\n\n-   copy `.env.sample` to `.env`\n    -   add your Ethereum node RPC URL, for example a url from [Alchemy](https://www.alchemy.com/) or another Ethereum node services.\n    -   add your wallet account's private key used for deploying, for example an account created via MetaMask.\n    -   to verify contract in a later step, create and add your ETHERSCAN_API_KEY by grabbing your key at \u003chttps://polygonscan.com/myapikey\u003e\n-   ensure your wallet account has some MATIC via \u003chttps://faucet.polygon.technology/\u003e\n-   deploy via `npx hardhat run --network mumbai scripts/deploy.js`\n-   grab the resulting contract address that you just deployed, let's call that `NEW_CONTRACT_ADDRESS_HERE`\n-   optionally, test manually via console -- see [Playing with Contract](#playing-with-contract) below\n-   upload source code so others can verify it on-chain via `npx hardhat verify --network mumbai NEW_CONTRACT_ADDRESS_HERE`\n-   view contract (and/or call methods directly) in Polygonscan \u003chttps://mumbai.polygonscan.com/\u003e, just look up `NEW_CONTRACT_ADDRESS_HERE`\n\n### Deploy to Polygon Mainnet\n\nUse same instructions above for Polygon `Mumbai` testnet but use `--network mainnet` command option instead.\n\n\u003ca id=\"playing-with-contract\"\u003e\u003c/a\u003e\n\n### Playing with Contract\n\nInteract with it via the console (`npx hardhat console --network mumbai`)\n\n```\nawait ethers.provider.listAccounts();    // you should see your public wallet account (the match for your private key) listed\n\nconst Box = await ethers.getContractFactory('Box');\nconst box = await Box.attach('\u003ccontract address goes here\u003e');\nawait box.store(42);\n// you'll need to wait a bit until value is stored on the blockchain before retrieving in next step\nawait box.retrieve();   // you'll ultimately see `BigNumber { value: \"42\" }`\n```\n\n### Example deploys\n\n-   On Mumbai testnet: https://mumbai.polygonscan.com/address/0x46d67851d088fa20Bfde7f9516ec22e35D9C7504\n-   On Polygon Mainnet: https://polygonscan.com/address/0xD4465A11EAD02D81Bb9BeCfD720f1bDAe36B39F6\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fopenzeppelin-solidity-hardhat-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbriangershon%2Fopenzeppelin-solidity-hardhat-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fopenzeppelin-solidity-hardhat-playground/lists"}