{"id":21493079,"url":"https://github.com/ansinitro/hardhat-fund-me-fcc","last_synced_at":"2025-10-06T15:10:14.699Z","repository":{"id":228358169,"uuid":"758816575","full_name":"ansinitro/hardhat-fund-me-fcc","owner":"ansinitro","description":"Learning from  freeCodeCamp.org \u0026 Patrick about Smart Contracts)","archived":false,"fork":false,"pushed_at":"2024-02-17T06:58:52.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T11:50:34.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ansinitro.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}},"created_at":"2024-02-17T06:49:33.000Z","updated_at":"2024-02-17T06:58:56.000Z","dependencies_parsed_at":"2024-03-18T12:22:23.257Z","dependency_job_id":null,"html_url":"https://github.com/ansinitro/hardhat-fund-me-fcc","commit_stats":null,"previous_names":["ansinitro/hardhat-fund-me-fcc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ansinitro/hardhat-fund-me-fcc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fhardhat-fund-me-fcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fhardhat-fund-me-fcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fhardhat-fund-me-fcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fhardhat-fund-me-fcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansinitro","download_url":"https://codeload.github.com/ansinitro/hardhat-fund-me-fcc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansinitro%2Fhardhat-fund-me-fcc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278629793,"owners_count":26018628,"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-10-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2024-11-23T15:37:53.663Z","updated_at":"2025-10-06T15:10:14.681Z","avatar_url":"https://github.com/ansinitro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat Fund Me\n\nThis is a section of the Javascript Blockchain/Smart Contract FreeCodeCamp Course.\n\n[Full Repo](https://github.com/smartcontractkit/full-blockchain-solidity-course-js)\n\n- [Hardhat Fund Me](#hardhat-fund-me)\n- [Getting Started](#getting-started)\n  - [Requirements](#requirements)\n  - [Quickstart](#quickstart)\n- [Usage](#usage)\n  - [Testing](#testing)\n    - [Test Coverage](#test-coverage)\n- [Deployment to a testnet or mainnet](#deployment-to-a-testnet-or-mainnet)\n  - [Scripts](#scripts)\n  - [Estimate gas](#estimate-gas)\n    - [Estimate gas cost in USD](#estimate-gas-cost-in-usd)\n  - [Verify on etherscan](#verify-on-etherscan)\n- [Linting](#linting)\n- [Formatting](#formatting)\n- [Thank you!](#thank-you)\n\nThis project is apart of the Hardhat FreeCodeCamp video.\n\n# Getting Started\n\n## Requirements\n\n- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n  - You'll know you did it right if you can run `git --version` and you see a response like `git version x.x.x`\n- [Nodejs](https://nodejs.org/en/)\n  - You'll know you've installed nodejs right if you can run:\n    - `node --version` and get an ouput like: `vx.x.x`\n- [Yarn](https://yarnpkg.com/getting-started/install) instead of `npm`\n  - You'll know you've installed yarn right if you can run:\n    - `yarn --version` and get an output like: `x.x.x`\n    - You might need to [install it with `npm`](https://classic.yarnpkg.com/lang/en/docs/install/) or `corepack`\n\n## Quickstart\n\n```\ngit clone https://github.com/PatrickAlphaC/hardhat-fund-me-fcc\ncd hardhat-fund-me-fcc\nyarn\n```\n\n# Usage\n\nDeploy:\n\n```\nyarn hardhat deploy\n```\n\n## Testing\n\n```\nyarn hardhat test\n```\n\n### Test Coverage\n\n```\nyarn hardhat coverage\n```\n\n\n# Deployment to a testnet or mainnet\n\n1. Setup environment variables\n\nYou'll want to set your `SEPOLIA_RPC_URL` and `PRIVATE_KEY` as environment variables. You can add them to a `.env` file, similar to what you see in `.env.example`.\n\n- `PRIVATE_KEY`: The private key of your account (like from [metamask](https://metamask.io/)). **NOTE:** FOR DEVELOPMENT, PLEASE USE A KEY THAT DOESN'T HAVE ANY REAL FUNDS ASSOCIATED WITH IT.\n  - You can [learn how to export it here](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key).\n- `SEPOLIA_RPC_URL`: This is url of the seplia testnet node you're working with. You can get setup with one for free from [Alchemy](https://alchemy.com/?a=673c802981)\n\n2. Get testnet ETH\n\nHead over to [faucets.chain.link](https://faucets.chain.link/) and get some tesnet ETH. You should see the ETH show up in your metamask.\n\n3. Deploy\n\n```\nyarn hardhat deploy --network sepolia\n```\n\n## Scripts\n\nAfter deploy to a testnet or local net, you can run the scripts. \n\n```\nyarn hardhat run scripts/fund.js\n```\n\nor\n```\nyarn hardhat run scripts/withdraw.js\n```\n\n## Estimate gas\n\nYou can estimate how much gas things cost by running:\n\n```\nyarn hardhat test\n```\n\nAnd you'll see and output file called `gas-report.txt`\n\n### Estimate gas cost in USD\n\nTo get a USD estimation of gas cost, you'll need a `COINMARKETCAP_API_KEY` environment variable. You can get one for free from [CoinMarketCap](https://pro.coinmarketcap.com/signup). \n\nThen, uncomment the line `coinmarketcap: COINMARKETCAP_API_KEY,` in `hardhat.config.js` to get the USD estimation. Just note, everytime you run your tests it will use an API call, so it might make sense to have using coinmarketcap disabled until you need it. You can disable it by just commenting the line back out. \n\n\n## Verify on etherscan\n\nIf you deploy to a testnet or mainnet, you can verify it if you get an [API Key](https://etherscan.io/myapikey) from Etherscan and set it as an environemnt variable named `ETHERSCAN_API_KEY`. You can pop it into your `.env` file as seen in the `.env.example`.\n\nIn it's current state, if you have your api key set, it will auto verify sepolia contracts!\n\nHowever, you can manual verify with:\n\n```\nyarn hardhat verify --constructor-args arguments.js DEPLOYED_CONTRACT_ADDRESS\n```\n\n# Linting\n\n`solhint` installation: [Documentation](https://protofire.github.io/solhint/#installation)\n\nTo check linting / code formatting:\n```\nyarn lint\n```\nor, to fix: \n```\nyarn lint:fix\n```\n\n# Formatting \n\n```\nyarn format\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansinitro%2Fhardhat-fund-me-fcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansinitro%2Fhardhat-fund-me-fcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansinitro%2Fhardhat-fund-me-fcc/lists"}