{"id":14989759,"url":"https://github.com/ahmedali8/hardhat-js-starterkit","last_synced_at":"2025-08-07T02:21:45.083Z","repository":{"id":107966131,"uuid":"366159564","full_name":"ahmedali8/hardhat-js-starterkit","owner":"ahmedali8","description":"hardhat environment starterkit for testing and deployment of smart contracts","archived":false,"fork":false,"pushed_at":"2023-07-07T18:24:36.000Z","size":4015,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T06:34:26.921Z","etag":null,"topics":["chai","ethereum","hardhat","javascript","mocha","smart-contracts","solidity"],"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/ahmedali8.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-05-10T19:52:38.000Z","updated_at":"2024-01-09T20:22:35.000Z","dependencies_parsed_at":"2023-12-30T10:15:10.934Z","dependency_job_id":null,"html_url":"https://github.com/ahmedali8/hardhat-js-starterkit","commit_stats":{"total_commits":124,"total_committers":2,"mean_commits":62.0,"dds":"0.016129032258064502","last_synced_commit":"461e1dd159d72b8712dc9ee9fb1226d74d713eff"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/ahmedali8/hardhat-js-starterkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedali8%2Fhardhat-js-starterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedali8%2Fhardhat-js-starterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedali8%2Fhardhat-js-starterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedali8%2Fhardhat-js-starterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedali8","download_url":"https://codeload.github.com/ahmedali8/hardhat-js-starterkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedali8%2Fhardhat-js-starterkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185986,"owners_count":24374710,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chai","ethereum","hardhat","javascript","mocha","smart-contracts","solidity"],"created_at":"2024-09-24T14:18:52.539Z","updated_at":"2025-08-07T02:21:45.063Z","avatar_url":"https://github.com/ahmedali8.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat Starterkit (JavaScript) [![Open in Gitpod][gitpod-badge]][gitpod] [![Github Actions][gha-badge]][gha] [![Hardhat][hardhat-badge]][hardhat]\n\n[gitpod]: https://gitpod.io/#https://github.com/ahmedali8/hardhat-js-starterkit\n[gitpod-badge]:\n  https://img.shields.io/badge/Gitpod-Open%20in%20Gitpod-FFB45B?logo=gitpod\n[gha]: https://github.com/ahmedali8/hardhat-js-starterkit/actions\n[gha-badge]:\n  https://github.com/ahmedali8/hardhat-js-starterkit/actions/workflows/ci.yml/badge.svg\n[hardhat]: https://hardhat.org/\n[hardhat-badge]: https://img.shields.io/badge/Built%20with-Hardhat-FFDB1C.svg\n\nA Hardhat-based template for developing Solidity smart contracts, with sensible\ndefaults.\n\n#### Inspiration - [Hardhat Template](https://github.com/paulrberg/hardhat-template) and [Hardhat TS Template](https://github.com/ahmedali8/hardhat-ts-template)\n\n- [Hardhat](https://github.com/nomiclabs/hardhat): compile, run and test smart\n  contracts\n- [Ethers](https://github.com/ethers-io/ethers.js/): renowned Ethereum library\n  and wallet implementation\n- [Solhint Community](https://github.com/solhint-community/solhint-community):\n  code linter\n- [Solcover](https://github.com/sc-forks/solidity-coverage): code coverage\n- [Prettier Plugin Solidity](https://github.com/prettier-solidity/prettier-plugin-solidity):\n  code formatter\n\n## Getting Started\n\nClick the\n[`Use this template`](https://github.com/ahmedali8/hardhat-js-starterkit/generate)\nbutton at the top of the page to create a new repository with this repo as the\ninitial state.\n\n## Features\n\nThis template builds upon the frameworks and libraries mentioned above, so for\ndetails about their specific features, please consult their respective\ndocumentations.\n\nFor example, for Hardhat, you can refer to the\n[Hardhat Tutorial](https://hardhat.org/tutorial) and the\n[Hardhat Docs](https://hardhat.org/docs). You might be in particular interested\nin reading the\n[Testing Contracts](https://hardhat.org/tutorial/testing-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.js\n├── .gitignore\n├── .prettierignore\n├── .prettierrc\n├── .solcover.js\n├── .solhintignore\n├── .solhint.json\n├── .yarnrc.yml\n└── hardhat.config.js\n```\n\n### GitHub Actions\n\nThis template comes with GitHub Actions pre-configured. Your contracts will be\nlinted and tested on every push and pull request made to the `main` branch.\n\nNote though that by default it injects `.env.example` env variables into github\naction's `$GITHUB_ENV`.\n\nYou can edit the CI script in\n[.github/workflows/ci.yml](./.github/workflows/ci.yml).\n\n## Usage\n\n### Pre Requisites\n\nBefore running any command, you need to create a `.env` file and set all\nnecessary environment variables. Follow the example in `.env.example`. You can\neither use mnemonic or individual private keys by setting\n\n```sh\n$ ACCOUNT_TYPE=\"MNEMONIC\" (Default)\nor\n$ ACCOUNT_TYPE=\"PRIVATE_KEYS\"\n```\n\nIf you don't already have a mnemonic, use this\n[mnemonic-website](https://iancoleman.io/bip39/) to generate one Or if you don't\nalready have a private key, use this\n[privatekey-website](https://vanity-eth.tk/) to generate one.\n\nThen, proceed with installing dependencies:\n\n```sh\n$ yarn install\n```\n\n### Run a Hardhat chain\n\nTo run a local network with all your contracts in it, run the following:\n\n```\n$ yarn chain\n```\n\n### Compile\n\nCompile the smart contracts with Hardhat:\n\n```sh\n$ yarn compile\n```\n\n### Test\n\nRun the tests with Hardhat:\n\n```sh\n$ yarn test\n\nor\n\n$ yarn test:gas         # shows gas report and contract size\n\nor\n\n$ yarn test:trace       # shows logs + calls\n\nor\n\n$ yarn test:fulltrace   # shows logs + calls + sloads + sstores\n```\n\nOptional:\n\n- See the actual fiat currency rates by setting your coingecko api key from\n  [here](https://coinmarketcap.com/api/pricing/) in `.env` file or command.\n\n- Set custom gas price (gwei) in `.env` file or command or let it automatically\n  fetched by ethgasstationapi.\n\n```sh\n$ GAS_PRICE=20\n$ COIN_MARKET_CAP_API_KEY=\"your_api_key\"\n```\n\n### Lint Solidity\n\nLint the Solidity code:\n\n```sh\n$ yarn lint:sol\n```\n\n### Forking mainnet\n\nStarts a local hardhat chain with the state of the last `mainnet` block\n\n```\n$ yarn fork\n```\n\n### Coverage\n\nGenerate the code coverage report:\n\n```sh\n$ yarn coverage\n```\n\n### Clean\n\nDelete the smart contract artifacts, the coverage reports and the Hardhat cache:\n\n```sh\n$ yarn clean\n```\n\n### Deploy\n\nDeploy the contracts to Hardhat Network:\n\n```sh\n$ yarn deploy\n```\n\nDeploy the contracts to a specific network, such as the Goerli testnet:\n\n```sh\n$ yarn deploy:network goerli\n```\n\n### Generate Natspec Doc\n\nGenerate natspec documentation for your contracts by runing\n\n```\n$ yarn dodoc\n```\n\nFor more information on Natspec\n[click here](https://docs.soliditylang.org/en/v0.8.12/natspec-format.html#natspec)\nand for dodoc repo\n[click here](https://github.com/primitivefinance/primitive-dodoc)\n\n### View Contracts Size\n\n```\n$ yarn size\n```\n\nor turn on for every compile\n\n```\n$ CONTRACT_SIZER=true\n```\n\n## Verify Contract\n\n### Manual Verify\n\n```sh\n$ npx hardhat verify --network \u003cnetwork\u003e DEPLOYED_CONTRACT_ADDRESS \"Constructor argument 1\" \"Constructor argument 2\"\n```\n\nFor complex arguments you can refer\n[here](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)\n\n```sh\n$ npx hardhat verify --contract contracts/CONTRACT_NAME.sol:CONTRACT_NAME --network \u003cnetwork\u003e --constructor-args arguments.js DEPLOYED_CONTRACT_ADDRESS\n```\n\n### Verify Contract Programmatically\n\nVerify the contract using `verifyContract` function in\n[verify.js](./utils/verify.js)\n\nSet block explorer api key in `.env` file or using command, refer to\n`.env.example` for more insight.\n\nExample deploy script with `verifyContract` function is\n[here](./scripts/deploy.js)\n\n## Syntax Highlighting\n\nIf you use VSCode, you can enjoy syntax highlighting for your Solidity code via\nthe [vscode-solidity](https://github.com/juanfranblanco/vscode-solidity)\nextension.\n\n## Using GitPod\n\n[GitPod](https://www.gitpod.io/) is an open-source developer platform for remote\ndevelopment.\n\nTo view the coverage report generated by `yarn coverage`, just click `Go Live`\nfrom the status bar to turn the server on/off.\n\n## Contributing\n\nContributions are always welcome! Open a PR or an issue!\n\n## Thank You!\n\n## Resources\n\n- [Hardhat Documentation](https://hardhat.org/getting-started/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedali8%2Fhardhat-js-starterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedali8%2Fhardhat-js-starterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedali8%2Fhardhat-js-starterkit/lists"}