[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10566":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},10566,"hardhat-template","PaulRBerg\u002Fhardhat-template","PaulRBerg","Hardhat-based template for developing Solidity smart contracts","",null,"TypeScript",1971,562,32,3,0,1,21.25,"MIT License",false,"main",[23,24,25,26,27,28,29,30,31],"blockchain","ethereum","ethers","hardhat","smart-contracts","solidity","template","typechain","typescript","2026-06-12 02:02:23","# Hardhat Template [![Open in Gitpod][gitpod-badge]][gitpod] [![Github Actions][gha-badge]][gha] [![Hardhat][hardhat-badge]][hardhat] [![License: MIT][license-badge]][license]\n\n[gitpod]: https:\u002F\u002Fgitpod.io\u002F#https:\u002F\u002Fgithub.com\u002Fpaulrberg\u002Fhardhat-template\n[gitpod-badge]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitpod-Open%20in%20Gitpod-FFB45B?logo=gitpod\n[gha]: https:\u002F\u002Fgithub.com\u002Fpaulrberg\u002Fhardhat-template\u002Factions\n[gha-badge]: https:\u002F\u002Fgithub.com\u002Fpaulrberg\u002Fhardhat-template\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\n[hardhat]: https:\u002F\u002Fhardhat.org\u002F\n[hardhat-badge]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuilt%20with-Hardhat-FFDB1C.svg\n[license]: https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\n[license-badge]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue.svg\n\nA Hardhat-based template for developing Solidity smart contracts, with sensible defaults.\n\n- [Hardhat](https:\u002F\u002Fgithub.com\u002Fnomiclabs\u002Fhardhat): compile, run and test smart contracts\n- [TypeChain](https:\u002F\u002Fgithub.com\u002Fethereum-ts\u002FTypeChain): generate TypeScript bindings for smart contracts\n- [Ethers](https:\u002F\u002Fgithub.com\u002Fethers-io\u002Fethers.js\u002F): renowned Ethereum library and wallet implementation\n- [Solhint](https:\u002F\u002Fgithub.com\u002Fprotofire\u002Fsolhint): code linter\n- [Solcover](https:\u002F\u002Fgithub.com\u002Fsc-forks\u002Fsolidity-coverage): code coverage\n- [Prettier Plugin Solidity](https:\u002F\u002Fgithub.com\u002Fprettier-solidity\u002Fprettier-plugin-solidity): code formatter\n\n## Getting Started\n\nClick the [`Use this template`](https:\u002F\u002Fgithub.com\u002Fpaulrberg\u002Fhardhat-template\u002Fgenerate) button at the top of the page to\ncreate a new repository with this repo as the initial state.\n\n## Features\n\nThis template builds upon the frameworks and libraries mentioned above, so for details about their specific features,\nplease consult their respective documentations.\n\nFor example, for Hardhat, you can refer to the [Hardhat Tutorial](https:\u002F\u002Fhardhat.org\u002Ftutorial) and the\n[Hardhat Docs](https:\u002F\u002Fhardhat.org\u002Fdocs). You might be in particular interested in reading the\n[Testing Contracts](https:\u002F\u002Fhardhat.org\u002Ftutorial\u002Ftesting-contracts) section.\n\n### Sensible Defaults\n\nThis template comes with sensible default configurations in the following files:\n\n```text\n├── .editorconfig\n├── .eslintignore\n├── .eslintrc.yml\n├── .gitignore\n├── .prettierignore\n├── .prettierrc.yml\n├── .solcover.js\n├── .solhint.json\n└── hardhat.config.ts\n```\n\n### VSCode Integration\n\nThis template is IDE agnostic, but for the best user experience, you may want to use it in VSCode alongside Nomic\nFoundation's [Solidity extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=NomicFoundation.hardhat-solidity).\n\n### GitHub Actions\n\nThis template comes with GitHub Actions pre-configured. Your contracts will be linted and tested on every push and pull\nrequest made to the `main` branch.\n\nNote that by default, the CI uses test values for `MNEMONIC` and `INFURA_API_KEY`. If you want to use your own values,\nyou can set them as GitHub secrets.\n\nFor more information on how to set up GitHub secrets, check out the\n[docs](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fsecurity-guides\u002Fusing-secrets-in-github-actions).\n\nYou can edit the CI script in [.github\u002Fworkflows\u002Fci.yml](.\u002F.github\u002Fworkflows\u002Fci.yml).\n\n## Usage\n\n### Pre Requisites\n\nFirst, you need to install the dependencies:\n\n```sh\nbun install\n```\n\nThen, you need to set up all the required\n[Hardhat Configuration Variables](https:\u002F\u002Fhardhat.org\u002Fhardhat-runner\u002Fdocs\u002Fguides\u002Fconfiguration-variables). You might\nalso want to install some that are optional.\n\nTo assist with the setup process, run `bunx hardhat vars setup`. To set a particular value, such as a BIP-39 mnemonic\nvariable, execute this:\n\n```sh\nbunx hardhat vars set MNEMONIC\n? Enter value: ‣ here is where your twelve words mnemonic should be put my friend\n```\n\nIf you do not already have a mnemonic, you can generate one using this [website](https:\u002F\u002Fiancoleman.io\u002Fbip39\u002F).\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```sh\nbun run compile\n```\n\n### TypeChain\n\nCompile the smart contracts and generate TypeChain bindings:\n\n```sh\nbun run typechain\n```\n\n### Test\n\nRun the tests with Hardhat:\n\n```sh\nbun run test\n```\n\n### Lint Solidity\n\nLint the Solidity code:\n\n```sh\nbun run lint:sol\n```\n\n### Lint TypeScript\n\nLint the TypeScript code:\n\n```sh\nbun run lint:ts\n```\n\n### Coverage\n\nGenerate the code coverage report:\n\n```sh\nbun run coverage\n```\n\n### Report Gas\n\nSee the gas usage per unit test and average gas per method call:\n\n```sh\nREPORT_GAS=true bun run test\n```\n\n### Clean\n\nDelete the smart contract artifacts, the coverage reports and the Hardhat cache:\n\n```sh\nbun run clean\n```\n\n### Deploy\n\nDeploy the contracts to Hardhat Network:\n\n```sh\nbun run deploy:contracts\n```\n\n### Tasks\n\n#### Deploy Lock\n\nDeploy a new instance of the Lock contract via a task:\n\n```sh\nbun run task:deployLock --unlock 100 --value 0.1\n```\n\n### Syntax Highlighting\n\nIf you use VSCode, you can get Solidity syntax highlighting with the\n[hardhat-solidity](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=NomicFoundation.hardhat-solidity) extension.\n\n## Using GitPod\n\n[GitPod](https:\u002F\u002Fwww.gitpod.io\u002F) is an open-source developer platform for remote development.\n\nTo view the coverage report generated by `bun run coverage`, just click `Go Live` from the status bar to turn the server\non\u002Foff.\n\n## Local development with Ganache\n\n### Install Ganache\n\n```sh\nnpm i -g ganache\n```\n\n### Run a Development Blockchain\n\n```sh\nganache -s test\n```\n\n> The `-s test` passes a seed to the local chain and makes it deterministic\n\nMake sure to set the mnemonic using `bunx hardhat vars set MNEMONIC` to that of the instance running with Ganache.\n\n## License\n\nThis project is licensed under MIT.\n","该项目是一个基于Hardhat的Solidity智能合约开发模板，旨在为开发者提供一个快速启动智能合约项目的框架。它集成了多种工具和技术，如TypeChain用于生成智能合约的TypeScript绑定，Ethers作为以太坊库和钱包实现，Solhint用于代码检查，以及Solcover进行代码覆盖率分析等。此外，该模板还预设了合理的默认配置文件，支持VSCode集成，并且预先配置了GitHub Actions来自动化测试和代码检查流程。此项目非常适合需要高效构建、测试和部署以太坊智能合约的应用场景。",2,"2026-06-11 03:29:09","top_topic"]