{"id":25558692,"url":"https://github.com/code4mk/easy-deploy-blockchain-project-with-hardhat","last_synced_at":"2026-02-27T11:30:16.825Z","repository":{"id":278374642,"uuid":"872344577","full_name":"code4mk/easy-deploy-blockchain-project-with-hardhat","owner":"code4mk","description":"deploy blockchain project with hardhat","archived":false,"fork":false,"pushed_at":"2024-10-14T11:49:57.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T12:55:23.837Z","etag":null,"topics":[],"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/code4mk.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":"2024-10-14T09:21:43.000Z","updated_at":"2024-11-28T10:23:19.000Z","dependencies_parsed_at":"2025-02-19T12:56:34.968Z","dependency_job_id":"c3460676-6d2e-408b-8908-da2174b36b32","html_url":"https://github.com/code4mk/easy-deploy-blockchain-project-with-hardhat","commit_stats":null,"previous_names":["code4mk/easy-deploy-blockchain-project-with-hardhat"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Feasy-deploy-blockchain-project-with-hardhat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Feasy-deploy-blockchain-project-with-hardhat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Feasy-deploy-blockchain-project-with-hardhat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code4mk%2Feasy-deploy-blockchain-project-with-hardhat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code4mk","download_url":"https://codeload.github.com/code4mk/easy-deploy-blockchain-project-with-hardhat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239869218,"owners_count":19710485,"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":[],"created_at":"2025-02-20T16:19:27.153Z","updated_at":"2026-02-27T11:30:16.769Z","avatar_url":"https://github.com/code4mk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easy-deploy-blockchain-project-hardhat\nEasily blockchain project (smart contract) with hardhat\n\n# Tax Record Smart Contract Project\n\nThis project implements a simple tax record system on the Ethereum blockchain using Hardhat and TypeScript. It allows for adding, retrieving, and deleting tax records on the blockchain.\n\n## Prerequisites\n\n- Node.js (v14+ recommended)\n- npm or yarn\n- An Ethereum wallet (like MetaMask)\n- Alchemy API key (for deploying to Sepolia testnet and mainnet)\n\n## Setup\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/code4mk/easy-deploy-blockchain-project-hardhat.git\n   cd easy-deploy-blockchain-project-hardhat\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Create a `.env` file in the root directory and add your configuration:\n   ```\n   SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_KEY\n   PRIVATE_KEY=your_wallet_private_key\n   MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY\n   MAINNET_PRIVATE_KEY=your_mainnet_private_key\n   ETHERSCAN_API_KEY=your_etherscan_api_key\n   ```\n\n## Compilation\n\nCompile the smart contracts:\n\n```bash\nnpx hardhat compile\n```\n\n## Testing\n\nRun the test suite:\n\n```bash\nnpx hardhat test\n```\n\n## Deployment and Interaction\n\n### Local Deployment (Hardhat Network)\n\n1. Start a local Hardhat node:\n   ```bash\n   npx hardhat node\n   ```\n\n2. In a new terminal, deploy the contract:\n   ```bash\n   npm run deploy:localhost\n   ```\n\n3. Interact with the contract:\n   ```bash\n   npx hardhat run scripts/interact.ts --network localhost\n   ```\n\n### Sepolia Testnet Deployment\n\n1. Ensure you have Sepolia ETH. You can get some from a faucet like [Alchemy's Sepolia Faucet](https://sepoliafaucet.com/).\n\n2. Deploy the contract:\n   ```bash\n   npm run deploy:sepolia\n   ```\n\n3. Interact with the contract:\n   ```bash\n   npx hardhat run scripts/interact.ts --network sepolia\n   ```\n\n### Mainnet Deployment\n\n1. Ensure you have sufficient ETH in your wallet to cover gas fees.\n\n2. Deploy the contract:\n   ```bash\n   npm run deploy:mainnet\n   ```\n\n3. Interact with the contract:\n   ```bash\n   npx hardhat run scripts/interact.ts --network mainnet\n   ```\n\n## Contract Interaction using Hardhat Console\n\nYou can also interact with the deployed contract using the Hardhat console:\n\n1. For localhost:\n   ```bash\n   npx hardhat console --network localhost\n   ```\n\n2. For Sepolia:\n   ```bash\n   npx hardhat console --network sepolia\n   ```\n\n3. For Mainnet:\n   ```bash\n   npx hardhat console --network mainnet\n   ```\n\nThen, in the console:\n\n```javascript\nconst TaxRecord = await ethers.getContractFactory(\"TaxRecord\");\nconst taxRecord = await TaxRecord.attach(\"DEPLOYED_CONTRACT_ADDRESS\");\nawait taxRecord.addRecord(\"John Doe\", ethers.parseEther(\"1.5\"));\nconst record = await taxRecord.getRecord(1);\nconsole.log(record);\n```\n\nReplace `DEPLOYED_CONTRACT_ADDRESS` with the actual address of your deployed contract.\n\n## Gas Management\n\n- For Sepolia testnet, get free ETH from a Sepolia faucet.\n- For mainnet deployment, ensure you have sufficient ETH to cover gas fees.\n\n## Etherscan Verification\n\nAfter deployment, you can verify your contract on Etherscan:\n\n```bash\nnpx hardhat verify --network sepolia DEPLOYED_CONTRACT_ADDRESS\n```\n\nReplace `sepolia` with `mainnet` for mainnet deployments.\n\n## Project Structure\n\n```\ntax-record-smart-contract/\n├── contracts/\n│   └── TaxRecord.sol\n├── scripts/\n│   ├── deploy.ts\n│   └── interact.ts\n├── test/\n│   └── TaxRecord.test.ts\n├── .env\n├── .gitignore\n├── hardhat.config.ts\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Feasy-deploy-blockchain-project-with-hardhat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode4mk%2Feasy-deploy-blockchain-project-with-hardhat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode4mk%2Feasy-deploy-blockchain-project-with-hardhat/lists"}