{"id":23425371,"url":"https://github.com/temarusanov/hardhat-boilerplate","last_synced_at":"2025-06-18T10:34:55.277Z","repository":{"id":175557742,"uuid":"486512743","full_name":"temarusanov/hardhat-boilerplate","owner":"temarusanov","description":"Handy hardhat boilerplate for smart contracts development on Solidity","archived":false,"fork":false,"pushed_at":"2022-06-09T10:55:00.000Z","size":198,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T12:11:19.575Z","etag":null,"topics":["ethereum","ethereum-contract","hardhat","hardhat-boilerplate","hardhat-deploy","hardhat-deployment","solidity","solidity-contracts"],"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/temarusanov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-28T08:42:03.000Z","updated_at":"2022-09-09T19:08:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8094321-5e3c-4e25-bc55-164255132022","html_url":"https://github.com/temarusanov/hardhat-boilerplate","commit_stats":null,"previous_names":["temarusanov/hardhat-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temarusanov%2Fhardhat-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temarusanov%2Fhardhat-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temarusanov%2Fhardhat-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temarusanov%2Fhardhat-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temarusanov","download_url":"https://codeload.github.com/temarusanov/hardhat-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609493,"owners_count":21132914,"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","ethereum-contract","hardhat","hardhat-boilerplate","hardhat-deploy","hardhat-deployment","solidity","solidity-contracts"],"created_at":"2024-12-23T05:11:47.351Z","updated_at":"2025-04-12T17:44:54.737Z","avatar_url":"https://github.com/temarusanov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat solidity boilerplate\n\nThis repository contains a template that you can use to develop smart contracts on Solidity. It use hardhat and hardhat plugins. Feel free to contribute this repo\n\n\n## Features\n\n- Customized hardhat config\n- Handy compilied dir (`/build`) with deployments, abis, artifacts and typechain \n- Fully typed tests with examples\n- Mocha gas reporter plugin\n- Hardhat deploy plugin\n- One-command verifier (etherscan-verify)\n- Examples for deploy, tasks and tests\n\n## What’s Included?\n\nYour environment will have everything you need to build a Dapp powered by Hardhat and React.\n\n- [Hardhat](https://hardhat.org/): An Ethereum development task runner and testing network.\n- [Mocha](https://mochajs.org/): A JavaScript test runner.\n- [Chai](https://www.chaijs.com/): A JavaScript assertion library.\n- [Ethers.js](https://docs.ethers.io/v5/): A JavaScript library for interacting with Ethereum.\n- [Waffle](https://github.com/EthWorks/Waffle/): To have Ethereum-specific Chai assertions/mathers.\n- [Mocha gas reporter](https://github.com/cgewecke/eth-gas-reporter): A Mocha reporter for Ethereum test suites\n- [Hardhat deploy](https://github.com/wighawag/hardhat-deploy): A hardhat plugin for replicable deployments and easy testing\n\n## TODO\n\n- [ ] Solhint\n\n## Installation\n\n```bash\n$ nvm use \u0026\u0026 yarn install\n```\n\n## Quick start\n\n### Deploy\n\nUse this command to deploy your contracts from `/deploy` dir\n\n```\n$ npx hardhat deploy \n```\n\n- `--network \u003cnetwork\u003e`. Select network to deploy\n- `--reset`. This flag resets the deployments from scratch. Previously deployed contract are not considered and deleted from disk.\n- `--tags \u003ctag1\u003e \u003ctag2\u003e`. Only excute deploy scripts with the given tags (separated by commas) and their dependencies\n\nMore about options you can read [here](https://github.com/wighawag/hardhat-deploy#1-hardhat-deploy)\n\n### Verify\n\nThis task will submit the contract source and other info of all deployed contracts to allow etherscan to verify and record the sources.\n\n```\n$ npx hardhat etherscan-verify --solc-input\n```\n\nMore about options you can read [here](https://github.com/wighawag/hardhat-deploy#4-hardhat-etherscan-verify)\n\n\n### Export\n\nThis task will export the contract deployed (saved in `deployments` folder) to a file with a simple format containing only contract addresses and abi, useful for web apps.\n\n```\n$ npx hardhat --network \u003cnetwork\u003e export --export deployments/\u003cnetwork\u003e.json\n```\n\nMore about options you can read [here](https://github.com/wighawag/hardhat-deploy#6-hardhat-export)\n\n### Testing\n\nRun tests for your smart contracts. Boilerplate offers you fully typed test through Mocha context redeclare. With `mocha.context.d.ts` you can types all your contracts, variables and then use it with your context.\n\n```\n$ npx hardhat test \u003ctest_path\u003e\n```\n\n```ts\n// example in tests/ERC20Mock.test.ts\nit(\"Should transfer tokens between accounts\", async function () {\n    const transferAmount = ethers.utils.parseUnits(\"100\", 6)\n    // this.token1 type is ERC20Mock\n    // this.bob type is SignerWithAddress\n    await this.token1.connect(this.bob).transfer(this.alice.address, transferAmount)\n\n    const aliceBalance = await this.token1.balanceOf(this.alice.address)\n    expect(aliceBalance).to.equal(transferAmount)\n})\n```\n\nUse gas reporter to get actual transaction fee for your Mocha tests\n\n```bash\n# Get free CMC api key\nCOINMARKETCAP_API_KEY=\n# Enable/Disable gas reposter\nREPORT_GAS=false\n# Paste blockchain native token name\nTOKEN=AVAX\n# Gas price api if you use not Ethereum blockchain\nGAS_PRICE_API=https://api.snowtrace.io/api?module=proxy\u0026action=eth_gasPrice\n```\n\nRead about gas reposter more [here](https://github.com/cgewecke/eth-gas-reporter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemarusanov%2Fhardhat-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemarusanov%2Fhardhat-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemarusanov%2Fhardhat-boilerplate/lists"}