{"id":26179892,"url":"https://github.com/jellydn/react-dapp","last_synced_at":"2025-04-14T22:43:12.864Z","repository":{"id":37045829,"uuid":"385658609","full_name":"jellydn/react-dapp","owner":"jellydn","description":"Dapp Example with ERC20 Token and Simple Greeter Contract. Built with Hardhat + EthersJs + React + TypeScript.","archived":false,"fork":false,"pushed_at":"2025-04-12T00:26:11.000Z","size":2961,"stargazers_count":49,"open_issues_count":11,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T01:27:11.654Z","etag":null,"topics":["ethereum","ethereum-dapp","ethersjs","hardhat","react","typescript","vitejs"],"latest_commit_sha":null,"homepage":"https://dapp-demo.productsway.com/","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/jellydn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["jellydn"],"ko_fi":"dunghd","buy_me_a_coffee":"dunghd","polar":"jellydn"}},"created_at":"2021-07-13T15:52:41.000Z","updated_at":"2025-01-19T14:26:45.000Z","dependencies_parsed_at":"2024-01-22T21:52:31.917Z","dependency_job_id":"b90b4b1e-b7c5-438f-adfb-6db06226be04","html_url":"https://github.com/jellydn/react-dapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellydn%2Freact-dapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellydn%2Freact-dapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellydn%2Freact-dapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellydn%2Freact-dapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jellydn","download_url":"https://codeload.github.com/jellydn/react-dapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975305,"owners_count":21192197,"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-dapp","ethersjs","hardhat","react","typescript","vitejs"],"created_at":"2025-03-11T21:53:47.806Z","updated_at":"2025-04-14T22:43:12.832Z","avatar_url":"https://github.com/jellydn.png","language":"TypeScript","funding_links":["https://github.com/sponsors/jellydn","https://ko-fi.com/dunghd","https://buymeacoffee.com/dunghd","https://polar.sh/jellydn","https://ko-fi.com/Q5Q61Q7YM"],"categories":[],"sub_categories":[],"readme":"# Welcome to react-dapp 👋\n\n![Version](https://img.shields.io/badge/version-0.0.1-blue.svg?cacheSeconds=2592000)\n[![Twitter: jellydn](https://img.shields.io/twitter/follow/jellydn.svg?style=social)](https://twitter.com/jellydn)\n\n\u003e Dapp example with react (vitejs)\n\n[![IT Man - Tech #34 - Viem - TypeScript Interface for Ethereum [Vietnamese]](https://i.ytimg.com/vi/D3_RePAQ9xQ/hqdefault.jpg)](https://www.youtube.com/watch?v=D3_RePAQ9xQ)\n\n## 🏠 [Homepage](https://github.com/jellydn/react-dapp)\n\n### ✨ [Demo](https://dapp-demo.productsway.com/)\n\n## Screenshot\n\n![https://gyazo.com/c6f068b6fe3e94bfe80d042639784faf.gif](https://gyazo.com/c6f068b6fe3e94bfe80d042639784faf.gif)\n\n## Install\n\n```sh\nbun install\n```\n\n## Built with\n\n- New-Web-App cli https://github.com/jellydn/new-web-app\n- [Hardhat](https://hardhat.org/) with [TypeChain](https://github.com/ethereum-ts/TypeChain) integration https://github.com/ethereum-ts/TypeChain/tree/master/packages/hardhat\n\n## Develop\n\n### Step 1: Deploy smart contract on local node\n\nOpen 1st terminal, then run below command\n\n```sh\nnpx hardhat node\n# or\nbun run local-node\n```\n\nFor example, below is my result.\n\n```sh\nnpx hardhat node\nStarted HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/\n\nAccounts\n========\nAccount #0: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 (10000 ETH)\nPrivate Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80\n```\n\nNext, compile and deploy to local node\n\n```sh\n# Compile smart contract and generate types for typescript\nnpx hardhat compile\n# Deploy localhost\nnpx hardhat run scripts/deploy.js --network localhost\n# Or\nbun run compile-node\n```\n\nYou will get the deploy address from CLI. For example:\n\n```sh\nnpx hardhat run scripts/deploy.js --network localhost\nGenerating typings for: 0 artifacts in dir: src/types for target: ethers-v5\nSuccessfully generated 3 typings!\nSuccessfully generated 3 typings for external artifacts!\nGreeter deployed to: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0\nToken deployed to: 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9\n```\n\n### Step 2: Run react app\n\nCreate `.env` from `.env.example` from root directory. Remember to fill the value for deployed addresses.\n\n```sh\n# .env\nVITE_GREETER_ADDRESS=\nVITE_TOKEN_ADDRESS=\n\n# Fill below information if you want to deploy to Mainnet/Testnet\nROPSTEN_PROVIDER_URL=\nRINKEBY_PROVIDER_URL=\nMNEMONIC=\n\n# Verify smart contract on EtherScan\nETHERSCAN_API=\n```\n\nThen run below command\n\n```sh\nbun run dev\n```\n\n## Deploy to Ropsten Testnet\n\n- Sign up and earn [$100 in credit](https://alchemy.com/?r=9ae3d9f1-56c4-476e-9f7e-23387e0e166a) on alchemy. More detail [here](https://docs.alchemy.com/alchemy/introduction/referral-program).\n\n- Send some ETH to your wallet https://faucet.dimensions.network/\n\n```sh\n# Compile smart contract and generate types for typescript\nnpx hardhat compile\n#\nnpx hardhat run scripts/deploy.js --network ropsten\n```\n\n- Verify contract\n\n```sh\nnpx hardhat verify --network ropsten VITE_GREETER_ADDRESS 'Hello, Hardhat!'\n```\n\nYou might have something similar\n\n```sh\nnpx hardhat verify --network ropsten 0x0608Cc0b2970729f4577Eae89403cAE3049C1525  'Hello, Hardhat!'\nNothing to compile\nGenerating typings for: 0 artifacts in dir: src/types for target: ethers-v5\nSuccessfully generated 3 typings!\nSuccessfully generated 3 typings for external artifacts!\nCompiling 1 file with 0.8.4\nSuccessfully submitted source code for contract\ncontracts/Greeter.sol:Greeter at 0x0608Cc0b2970729f4577Eae89403cAE3049C1525\nfor verification on Etherscan. Waiting for verification result...\n\nSuccessfully verified contract Greeter on Etherscan.\nhttps://ropsten.etherscan.io/address/0x0608Cc0b2970729f4577Eae89403cAE3049C1525#code\n```\n\n```sh\nnpx hardhat verify --network ropsten 0x2Bce4076C8EE3facddC3325FfA4314B854d9447b 1000000 'ERC20 Demo Token' 18 'EDT'\nNothing to compile\nGenerating typings for: 0 artifacts in dir: src/types for target: ethers-v5\nSuccessfully generated 3 typings!\nSuccessfully generated 3 typings for external artifacts!\nCompiling 1 file with 0.8.4\nSuccessfully submitted source code for contract\ncontracts/Token.sol:StandardToken at 0x2Bce4076C8EE3facddC3325FfA4314B854d9447b\nfor verification on Etherscan. Waiting for verification result...\n\nSuccessfully verified contract StandardToken on Etherscan.\nhttps://ropsten.etherscan.io/address/0x2Bce4076C8EE3facddC3325FfA4314B854d9447b#code\n```\n\n## Author\n\n👤 **Huynh Duc Dung**\n\n- Website: https://productsway.com/\n- Twitter: [@jellydn](https://twitter.com/jellydn)\n- Github: [@jellydn](https://github.com/jellydn)\n\n## Stargazers 🌟\n\n[![Stargazers repo roster for jellydn/react-dapp](https://reporoster.com/stars/jellydn/react-dapp)](https://github.com/jellydn/react-dapp/stargazers)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Q5Q61Q7YM)\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjellydn%2Freact-dapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjellydn%2Freact-dapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjellydn%2Freact-dapp/lists"}