{"id":20293393,"url":"https://github.com/mingderwang/muzatoken-faucet","last_synced_at":"2026-05-07T12:35:38.255Z","repository":{"id":66841351,"uuid":"556598672","full_name":"mingderwang/muzatoken-faucet","owner":"mingderwang","description":"muzatoken-faucet","archived":false,"fork":false,"pushed_at":"2022-10-30T09:04:01.000Z","size":364,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-14T09:26:21.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mumbai.polygonscan.com/address/0x33825f022Dce205EE3554023412be6D0C809c3E7#code","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mingderwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-24T06:42:42.000Z","updated_at":"2024-02-17T05:20:03.000Z","dependencies_parsed_at":"2023-03-24T18:33:10.908Z","dependency_job_id":null,"html_url":"https://github.com/mingderwang/muzatoken-faucet","commit_stats":null,"previous_names":[],"tags_count":11,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fmuzatoken-faucet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fmuzatoken-faucet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fmuzatoken-faucet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fmuzatoken-faucet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingderwang","download_url":"https://codeload.github.com/mingderwang/muzatoken-faucet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241788363,"owners_count":20020255,"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":"2024-11-14T15:24:04.408Z","updated_at":"2026-05-07T12:35:38.214Z","avatar_url":"https://github.com/mingderwang.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Hardhat Project\n\nThis project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.\n\nTry running some of the following tasks:\n\n## preparation\n\nTo create your .env file\n\n```shell\ncp .env.example .env\nvi .env\n```\n\ncat .env.example (Don't use these example keys, you need to apply your own key and change it in .env file)\n```\nPOLYGONSCAN_KEY=YHRM33PWZ3Q1GUG1YPTHCD1PN4R8APGAGQ\nMUMBAI_URL=https://polygon-mumbai.g.alchemy.com/v2/kqrbMP1SLI1kxkU-4BNN9-AVKg0Iiyy_\nPOLYGON_URL=https://polygon.g.alchemy.com/v2/kqrbMP1SLI1kxkU-4BNN9-AVKg0Iiyy_\nPRIVATE_KEY=828516166b1b030645f0aa20927b3fffd5c0f341b4f36dd9016a8f628ae6e916\n```\n\nTo apply above keys from [alchemy](https://www.alchemy.com/), [polygonscan](https://polygonscan.com/), and export your private key from your [metamask](https://metamask.io/) account. (You need some deplosit on this account for deploying smart contracts)\n\nTo get some fake MATICs from the [Mumbai facuet](https://mumbaifaucet.com/) if you don't have any.\n\n## test it on hardhat first\n\nTo set defaultNetwork in your hardhat.config.ts file to 'hardhat'\n\n```shell\nyarn\nnpx hardhat help\nnpx hardhat test\nnpx hardhat run scripts/deployMuzaToken.ts\n```\n\ntest example\n```shell\n$ yarn test                                        \nyarn run v1.22.19\n$ npx hardhat test\n\n\n  Lock\n    Deployment\n      ✔ Should set the right unlockTime (4853ms)\n      ✔ Should set the right owner (57ms)\n      ✔ Should receive and store the funds to lock\n      ✔ Should fail if the unlockTime is not in the future (371ms)\n    Withdrawals\n      Validations\n        ✔ Should revert with the right error if called too soon\n        ✔ Should revert with the right error if called from another account (39ms)\n        ✔ Shouldn't fail if the unlockTime has arrived and the owner calls it (45ms)\n      Events\n        ✔ Should emit an event on withdrawals (48ms)\n      Transfers\n        ✔ Should transfer the funds to the owner (48ms)\n\n  MuzaToken\n    Deployment\n      ✔ Should have the symbol called MUZA (442ms)\n      ✔ Should have the name called Muzha Mint Token\n      ✔ Should have the totalSupply 1000000000000000000000\n      ✔ Should have the decimals as 18\n\n\n·-------------------------|---------------------------|-------------|-----------------------------·\n|  Solc version: 0.8.17   ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 30000000 gas  │\n··························|···························|·············|······························\n|  Methods                                                                                        │\n·············|············|·············|·············|·············|···············|··············\n|  Contract  ·  Method    ·  Min        ·  Max        ·  Avg        ·  # calls      ·  usd (avg)  │\n·············|············|·············|·············|·············|···············|··············\n|  Lock      ·  withdraw  ·          -  ·          -  ·      33820  ·            7  ·          -  │\n·············|············|·············|·············|·············|···············|··············\n|  Deployments            ·                                         ·  % of limit   ·             │\n··························|·············|·············|·············|···············|··············\n|  Lock                   ·          -  ·          -  ·     204517  ·        0.7 %  ·          -  │\n··························|·············|·············|·············|···············|··············\n|  MuzaToken              ·          -  ·          -  ·     626893  ·        2.1 %  ·          -  │\n·-------------------------|-------------|-------------|-------------|---------------|-------------·\n\n  13 passing (7s)\n\n✨  Done in 17.92s.\n```\n\n## deploy to Polygon Mumbai\n\nTo set defaultNetwork in your hardhat.config.ts file to 'mumbai'\n\n```shell\n$ npx hardhat run scripts/deployMuzaToken.ts       \nMuzaToken is deployed to 0x33825f022Dce205EE3554023412be6D0C809c3E7\n```\n\n### verify\n\n```shell\n$ npx hardhat verify --contract contracts/MuzaToken.sol:MuzaToken 0x33825f022Dce205EE3554023412be6D0C809c3E7 1000000000000000000000\nNothing to compile\nNo need to generate any newer typings.\nSuccessfully submitted source code for contract\ncontracts/MuzaToken.sol:MuzaToken at 0x33825f022Dce205EE3554023412be6D0C809c3E7\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MuzaToken on Etherscan.\nhttps://mumbai.polygonscan.com/address/0x33825f022Dce205EE3554023412be6D0C809c3E7#code\n```\n\n## multiple network deployment (xdeployer)\n\n```shell\n$ npx hardhat xdeploy                                      \nGenerating typings for: 8 artifacts in dir: typechain-types for target: ethers-v5\nSuccessfully generated 46 typings!\nCompiled 7 Solidity files successfully\n\nThe deployment is starting... Please bear with me, this may take a minute or two. Anyway, WAGMI!\n\nYour deployment parameters will lead to the following contract address: 0x8A1976539880A5E8E1A820233BD41ca7BBee69f5\n\n=\u003e If this does not match your expectation, given a previous deployment, you have either changed the value of\nthe salt parameter or the bytecode of the contract!\n\n\n----------------------------------------------------------\n\u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c           XDEPLOY DEPLOYMENT 1           \u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c\n----------------------------------------------------------\n\nDeployment status: successful\n\nNetwork: hardhat\n\nChain ID: 31337\n\nContract name: MuzaToken\n\nContract creation transaction: 0x90c820acb91da78f3a142c056d6ab4a30db0f9d97b2e3a4912b2f067af84e64b\n\nContract address: 0x8A1976539880A5E8E1A820233BD41ca7BBee69f5\n\nTransaction details written to: /Users/ming/src/HH/muzatoken-faucet/deployments/hardhat_deployment.json\n\n\nYour deployment parameters will lead to the following contract address: 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\n\n=\u003e If this does not match your expectation, given a previous deployment, you have either changed the value of\nthe salt parameter or the bytecode of the contract!\n\n\n----------------------------------------------------------\n\u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c           XDEPLOY DEPLOYMENT 2           \u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c\n----------------------------------------------------------\n\nDeployment status: successful\n\nNetwork: goerli\n\nChain ID: 5\n\nContract name: MuzaToken\n\nContract creation transaction hash: https://goerli.etherscan.io/tx/0xb74674fb43e8de1315e2369fb7d3744b6e843db20b2d0d9ced402940f1d46235\n\nContract address: https://goerli.etherscan.io/address/0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\n\nTransaction details written to: /Users/ming/src/HH/muzatoken-faucet/deployments/goerli_deployment.json\n\n\nYour deployment parameters will lead to the following contract address: 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\n\n=\u003e If this does not match your expectation, given a previous deployment, you have either changed the value of\nthe salt parameter or the bytecode of the contract!\n\n\n----------------------------------------------------------\n\u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c           XDEPLOY DEPLOYMENT 3           \u003e\u003c\u003e\u003c\u003e\u003c\u003e\u003c\n----------------------------------------------------------\n\nDeployment status: successful\n\nNetwork: mumbai\n\nChain ID: 80001\n\nContract name: MuzaToken\n\nContract creation transaction hash: https://mumbai.polygonscan.com/tx/0x0b0ddab8e0a4ad8b82547e9befd996d071ea5a8e9705f3ae0a9d11ccee1037d4\n\nContract address: https://mumbai.polygonscan.com/address/0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\n\nTransaction details written to: /Users/ming/src/HH/muzatoken-faucet/deployments/mumbai_deployment.json\n```\n\n## verification on the same address for both mumbai and goerli networks\n\n### mumbai\n\n```shell\n$ npx hardhat verify --contract contracts/MuzaToken.sol:MuzaToken 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6  1000000000000000000000 --network mumbai\n\nGenerating typings for: 1 artifacts in dir: typechain-types for target: ethers-v5\nSuccessfully generated 34 typings!\nCompiled 1 Solidity file successfully\nSuccessfully submitted source code for contract\ncontracts/MuzaToken.sol:MuzaToken at 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MuzaToken on Etherscan.\nhttps://mumbai.polygonscan.com/address/0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6#code\n```\n\n### goerli\n\nYou need to change POLYGONSCAN_KEY in .env file to your Etherscan API key.\n\n```shell\nnpx hardhat verify --contract contracts/MuzaToken.sol:MuzaToken 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6  1000000000000000000000 --network goerli\n\nNothing to compile\nNo need to generate any newer typings.\nSuccessfully submitted source code for contract\ncontracts/MuzaToken.sol:MuzaToken at 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MuzaToken on Etherscan.\nhttps://goerli.etherscan.io/address/0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6#code\n```\n\nor to change POLYGONSCAN_KEY in CLI as follow;\n\n```shell\n$ POLYGONSCAN_KEY=J4V5S8SIF5SAUSNI3TE1VX3KDQYZDEDD71 npx hardhat verify --contract contracts/MuzaToken.sol:MuzaToken 0xEB0F3CcdE8C2cc06DaEA35b68548408711aaC4D6  1000000000000000000000 --network goerli\nNothing to compile\nNo need to generate any newer typings.\nError in plugin @nomiclabs/hardhat-etherscan: Contract source code already verified\n\nFor more info run Hardhat with --show-stack-traces\n```\n\n\n## upgradeable token\n\n```shell\n$ npx hardhat run --network localhost scripts/deploy_mytoken.js\n\nWarning: A proxy admin was previously deployed on this network\n\n    This is not natively used with the current kind of proxy ('uups').\n    Changes to the admin will have no effect on this new proxy.\n\nMyToken deployed to: 0xbf2ad38fd09F37f50f723E35dd84EEa1C282c5C9\n```\n\n### deploy upgradeable token to mumbai\n\n```shell\n$ npx hardhat run --network mumbai scripts/deploy_mytoken.js\n\nMyToken deployed to: 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044\n```\n\nand\n\n```shell\n$ npx hardhat verify --contract contracts/MyToken.sol:MyToken 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044 0x611586817af4e77e23951524Df7D8fcEeCf5B3C8  --network mumbai\nVerifying implementation: 0xf0533fA376fa61226D42Cd9b3FEC2A8A5d1b531A\nNothing to compile\nNo need to generate any newer typings.\nFailed to verify implementation contract at 0xf0533fA376fa61226D42Cd9b3FEC2A8A5d1b531A: The constructor for contracts/MyToken.sol:MyToken has 0 parameters\nbut 1 arguments were provided instead.\nVerifying proxy: 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044\nContract at 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044 already verified.\nLinking proxy 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044 with implementation\nFailed to link proxy 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044 with its implementation. Reason: The implementation contract at 0xf0533fa376fa61226d42cd9b3fec2a8a5d1b531a does not seem to be verified. Please verify and publish the contract source before proceeding with this proxy verification.\nAn unexpected error occurred:\n\nError: Verification completed with the following errors.\n\nError 1: Failed to verify implementation contract at 0xf0533fA376fa61226D42Cd9b3FEC2A8A5d1b531A: The constructor for contracts/MyToken.sol:MyToken has 0 parameters\nbut 1 arguments were provided instead.\n\nError 2: Failed to link proxy 0xcd969e6355F128B3AF1F11d0a72ac439Fb7DC044 with its implementation. Reason: The implementation contract at 0xf0533fa376fa61226d42cd9b3fec2a8a5d1b531a does not seem to be verified. Please verify and publish the contract source before proceeding with this proxy verification.\n\n$ npx hardhat verify --contract contracts/MyToken.sol:MyToken 0xf0533fa376fa61226d42cd9b3fec2a8a5d1b531a --network mumbai \nNothing to compile\nNo need to generate any newer typings.\nSuccessfully submitted source code for contract\ncontracts/MyToken.sol:MyToken at 0xf0533fa376fa61226d42cd9b3fec2a8a5d1b531a\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MyToken on Etherscan.\nhttps://mumbai.polygonscan.com/address/0xf0533fa376fa61226d42cd9b3fec2a8a5d1b531a#code\n```\n\n## ERC1155 upgradeable and verify proxy example\n\n```shell\nming:muzatoken-faucet/ (main✗) $ npx hardhat run scripts/deploy_mytoken.js --network mumbai\n\nMyToken deployed to: 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f\nming:muzatoken-faucet/ (main✗) $ npx hardhat verify --contract contracts/MuzaToken2.sol:MuzaToken2 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f  --network mumbai\nVerifying implementation: 0xa81AC3cbeE49dC4C13d57Dbd5Dd0b1bDb5502764\nNothing to compile\nNo need to generate any newer typings.\nSuccessfully submitted source code for contract\ncontracts/MuzaToken2.sol:MuzaToken2 at 0xa81AC3cbeE49dC4C13d57Dbd5Dd0b1bDb5502764\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MuzaToken2 on Etherscan.\nhttps://mumbai.polygonscan.com/address/0xa81AC3cbeE49dC4C13d57Dbd5Dd0b1bDb5502764#code\nVerifying proxy: 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f\nContract at 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f already verified.\nLinking proxy 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f with implementation\nSuccessfully linked proxy to implementation.\n\nProxy fully verified.\n```\n\n```shell\nming:muzatoken-faucet/ (main✗) $ npx hardhat verify --contract contracts/MuzaToken2.sol:MuzaToken2 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f  --network mumbai\nVerifying implementation: 0xa81AC3cbeE49dC4C13d57Dbd5Dd0b1bDb5502764\nNothing to compile\nNo need to generate any newer typings.\nImplementation 0xa81AC3cbeE49dC4C13d57Dbd5Dd0b1bDb5502764 already verified.\nVerifying proxy: 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f\nContract at 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f already verified.\nLinking proxy 0xb2D06DF1faF16cf95155dEEea60Ca561d528d25f with implementation\nSuccessfully linked proxy to implementation.\n\nProxy fully verified.\n```\n\n\n## upgrade MuzaToken2.sol to MuzaToken3.sol\n\n```shell\n$ npx hardhat run scripts/upgrade_mytoken.js --network mumbai\n\nCompiled 1 Solidity file successfully\nUpgrading MuzaToken...\nMuzaToken3 upgraded\n```\n\nnew address is 0x77bBc15D959C10055361A67FB75939E3523d52c4, need to verify again.\n\n```shell\n$ npx hardhat verify --contract contracts/MuzaToken3.sol:MuzaToken3 0x77bBc15D959C10055361A67FB75939E3523d52c4  --network mumbai\nNothing to compile\nNo need to generate any newer typings.\nSuccessfully submitted source code for contract\ncontracts/MuzaToken3.sol:MuzaToken3 at 0x77bBc15D959C10055361A67FB75939E3523d52c4\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract MuzaToken3 on Etherscan.\nhttps://mumbai.polygonscan.com/address/0x77bBc15D959C10055361A67FB75939E3523d52c4#code\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Fmuzatoken-faucet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingderwang%2Fmuzatoken-faucet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Fmuzatoken-faucet/lists"}