generated from NomicFoundation/hardhat-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { DeployFunction } from "hardhat-deploy/types" | ||
|
||
const deployERC6551Registry: DeployFunction = async (hre) => { | ||
// const [signer] = await hre.ethers.getSigners() | ||
|
||
const ERC6551Registry = await hre.ethers.getContractFactory("ERC6551Registry") | ||
const erc6551Registry = await ERC6551Registry.deploy() | ||
|
||
try { | ||
await hre.run("verify:verify", { | ||
address: await erc6551Registry.getAddress(), | ||
constructorArguments: [], | ||
}) | ||
} catch (e) { | ||
if ( | ||
e instanceof Error && | ||
e.stack && | ||
(e.stack.indexOf("Reason: Already Verified") > -1 || | ||
e.stack.indexOf("Contract source code already verified") > -1) | ||
) { | ||
console.log(" ✔ Contract is already verified") | ||
} else { | ||
console.log( | ||
" ✘ Verifying the contract failed. This is probably because Etherscan is still indexing the contract. Try running this same command again in a few seconds." | ||
) | ||
throw e | ||
} | ||
} | ||
} | ||
|
||
export default deployERC6551Registry |
16 changes: 13 additions & 3 deletions
16
.../00_deploy_mastercopy_ERC721Tokenbound.ts → .../01_deploy_mastercopy_ERC721Tokenbound.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters