{"id":20293090,"url":"https://github.com/mingderwang/alchemy-hardhat-projec","last_synced_at":"2025-10-15T20:19:59.065Z","repository":{"id":222604751,"uuid":"757816221","full_name":"mingderwang/alchemy-hardhat-projec","owner":"mingderwang","description":"refer to https://docs.alchemy.com/docs/how-to-deploy-a-contract-to-the-same-address-on-multiple-networks#create-a-hardhat-task-to-query-the-nonce","archived":false,"fork":false,"pushed_at":"2024-03-16T09:00:06.000Z","size":1000,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T09:22:46.576Z","etag":null,"topics":["create2","factory","hardhat"],"latest_commit_sha":null,"homepage":"https://paper.dropbox.com/doc/Same-Address-Deployment-for-Smart-Contract--CJtZF06X_RDkd~kkUc2WGS6mAQ-uRHCZNa9AwIJtZUp3PAqj","language":"Solidity","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/mingderwang.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-02-15T03:23:11.000Z","updated_at":"2024-03-10T11:31:03.000Z","dependencies_parsed_at":"2024-02-24T11:22:57.458Z","dependency_job_id":"ccf323cc-504f-49e9-ba76-a4bf36e414a7","html_url":"https://github.com/mingderwang/alchemy-hardhat-projec","commit_stats":null,"previous_names":["mingderwang/alchemy-hardhat-projec"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Falchemy-hardhat-projec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Falchemy-hardhat-projec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Falchemy-hardhat-projec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Falchemy-hardhat-projec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingderwang","download_url":"https://codeload.github.com/mingderwang/alchemy-hardhat-projec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787482,"owners_count":20020101,"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":["create2","factory","hardhat"],"created_at":"2024-11-14T15:21:24.588Z","updated_at":"2025-10-15T20:19:54.047Z","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```shell\n✗ npx hardhat run scripts/deployFactory.js --network arbitrumSepolia\nNo need to generate any newer typings.\nFactory deployed to: 0xd851C0FC5DeD867033a70626DcDFe10EF7B7f433\n\n✗ npx hardhat run scripts/deployFactory.js --network mumbai\nNo need to generate any newer typings.\nFactory deployed to: 0xd851C0FC5DeD867033a70626DcDFe10EF7B7f433\n\n✗ npx hardhat run scripts/deployFactory.js --network sepolia\nNo need to generate any newer typings.\nFactory deployed to: 0xd851C0FC5DeD867033a70626DcDFe10EF7B7f433\n```\n\nthen, edit your scripts/vaultDeploy.js at line 5\n\n```shell\n    const factoryAddr = \"0xd851C0FC5DeD867033a70626DcDFe10EF7B7f433\";\n```\n\nand run\n\n```shell\n✗ npx hardhat run scripts/vaultDeploy.js --network arbitrumSepolia\nNo need to generate any newer typings.\nprecomputed address: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\nDeployed to: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\n\n✗ npx hardhat run scripts/vaultDeploy.js --network mumbai\nNo need to generate any newer typings.\nprecomputed address: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\nDeployed to: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\n\n✗ npx hardhat run scripts/vaultDeploy.js --network sepolia\nNo need to generate any newer typings.\nprecomputed address: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\nDeployed to: 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\n```\n\n\n## code verification\n\n```shell\n✗ npx hardhat verify --network arbitrumSepolia 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D 52943830000\n\nThe contract 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D has already been verified on Etherscan.\nhttps://sepolia.arbiscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code\n\n✗ npx hardhat verify --network mumbai 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D 52943830000\nSuccessfully submitted source code for contract\ncontracts/Vault.sol:Vault at 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract Vault on the block explorer.\nhttps://mumbai.polygonscan.com/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code\n\n✗ npx hardhat verify --network sepolia 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D 52943830000\nSuccessfully submitted source code for contract\ncontracts/Vault.sol:Vault at 0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D\nfor verification on the block explorer. Waiting for verification result...\n\nSuccessfully verified contract Vault on the block explorer.\nhttps://sepolia.etherscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code\n\n```\n\n\n## task account to make sure nonce are equal on each chain\n\n```shell\nnpx hardhat account --address 0x97e5dD3ea09304249BeC86AfC1a62B6c8EF9a6A0\n[\n  [ '  |NETWORK|   |NONCE|   |BALANCE|  ' ],\n  [ 'Arbitrum Sepolia:', 1, '0.000ETH' ],\n  [ 'Sepolia:', 1, '0.684ETH' ],\n  [ 'Polygon Mumbai:', 1, '0.499ETH' ]\n]\n```\n\n\n## verified code\n\n[https://sepolia.arbiscan.io/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0#code](https://sepolia.arbiscan.io/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0#code)\n\n[https://mumbai.polygonscan.com/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0](https://mumbai.polygonscan.com/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0)\n\n[https://sepolia.etherscan.io/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0](https://sepolia.etherscan.io/address/0xA17cfaB7bc4aD64C56Dd5cCB4F1321c379b14Fa0)\n\n* for Vault.sol\n\n[https://mumbai.polygonscan.com/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code](https://mumbai.polygonscan.com/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code)\n\n[https://sepolia.arbiscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code](https://sepolia.arbiscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code)\n\n[https://sepolia.etherscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code](https://sepolia.etherscan.io/address/0xA1c83098d64DF1bAa04E7C930c033Bf4Cc04Ed0D#code)\n\n## test locktime\n\n```shell\nnpx hardhat run scripts/showTimeStamp.ts\nNo need to generate any newer typings.\nLock with 0.001ETH and unlock timestamp 1708185923 deployed to address\n```\n\nor deploy and run following code in Remix\n\n```\n// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity ^0.8.7;\n    \ncontract Timestamp {\n   uint public timestamp;\n   function saveTimestamp() public {\n      timestamp = block.timestamp;\n   }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Falchemy-hardhat-projec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingderwang%2Falchemy-hardhat-projec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Falchemy-hardhat-projec/lists"}