Skip to content

Commit

Permalink
feat: contract deploy verify
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-chun-yuan committed Feb 17, 2024
1 parent 9c7778f commit e7f5935
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
5 changes: 1 addition & 4 deletions packages/contract/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const config: HardhatUserConfig = {
},
],
settings: {
viaIR: true,
metadata: {
// Not including the metadata hash
// https://github.com/paulrberg/hardhat-template/issues/31
Expand All @@ -101,9 +100,7 @@ const config: HardhatUserConfig = {
enabled: true,
runs: 200,
details: {
yulDetails: {
optimizerSteps: "u",
},
yulDetails: false,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/contract/scripts/address/hardhat/DonateToken.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"main":"0x5FbDB2315678afecb367f032d93F642f64180aa3"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"main":"0x4c139Bf8A74539e9fe322B8E7aF5b244910d3a2c"}
26 changes: 1 addition & 25 deletions packages/contract/scripts/tasks/deployProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ task("deploy:nftFactory", "Deploy NFT factory")
const [signer]: any = await hre.ethers.getSigners()
const feeData = await hre.ethers.provider.getFeeData()

// const globalContractFactory = await hre.ethers.getContractFactory("contracts/Globals.sol:Globals", )
// const globalDeployContract: any = await globalContractFactory.connect(signer).deploy({
// maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
// maxFeePerGas: feeData.maxFeePerGas,
// // gasLimit: 6000000, // optional: for some weird infra network
// })
// console.log(`Globals.sol deployed to ${globalDeployContract.address}`)
// await globalDeployContract.deployed()

// const tokenAddress = JSON.parse(readFileSync(
// `scripts/address/${hre.network.name}/`,
// "DonateToken.json"
// ))
// const nftContractFactory = await hre.ethers.getContractFactory("contracts/PoolFactory.sol:PoolFactory", )
const nftContractFactory = await hre.ethers.getContractFactory("contracts/PoolFactory.sol:PoolFactory", )
const nftDeployContract: any = await nftContractFactory.connect(signer).deploy(
//my wallet address
Expand All @@ -100,22 +86,12 @@ task("deploy:nftFactory", "Deploy NFT factory")
await nftDeployContract.deployed()

if (verify) {
// console.log("verifying global contract...")
// await globalDeployContract.deployTransaction.wait(3)
// try {
// await hre.run("verify:verify", {
// address: globalDeployContract.address,
// contract: "contracts/Globals.sol:Globals",
// })
// } catch (e) {
// console.log(e)
// }
console.log("verifying nft contract...")
await nftDeployContract.deployTransaction.wait(3)
try {
await hre.run("verify:verify", {
address: nftDeployContract.address,
contract: "contracts/DonateToken.sol:DonateToken",
contract: "contracts/PoolFactory.sol:PoolFactory",
})
} catch (e) {
console.log(e)
Expand Down

0 comments on commit e7f5935

Please sign in to comment.