Skip to content

Commit

Permalink
fix deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbrg committed Dec 3, 2024
1 parent 20299bc commit 5debb22
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions deploy/deploy-crosschain-gov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,27 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log("Gov contract address:", msg(govAddress))

// Transfer NFT ownership to Gov
const nft = await hre.ethers.getContractAt(
"contracts/variants/crosschain/NFT.sol:NFT",
nftAddress
)
await nft.transferOwnership(govAddress)
console.log("NFT ownership transferred to Gov")
try {
let txOptions = {}

switch (hre.network.name) {
case "arbitrum":
case "arbitrum-sepolia":
txOptions = { gasLimit: 500000 }
break
default:
txOptions = {}
}

const nft = await hre.ethers.getContractAt(
"contracts/variants/crosschain/NFT.sol:NFT",
nftAddress
)
await nft.transferOwnership(govAddress, txOptions)
console.log("NFT ownership transferred to Gov")
} catch (e: any) {
console.warn("error during ownership transfer", e)
}

if (hre.network.name !== "hardhat") {
console.log("\nVerifying ProofHandler library...")
Expand Down

0 comments on commit 5debb22

Please sign in to comment.