From 5debb22e013d6c53cd4e5e09e662fa8b11ed9388 Mon Sep 17 00:00:00 2001 From: julienbrg Date: Tue, 3 Dec 2024 11:14:30 +0100 Subject: [PATCH] fix deployment script --- deploy/deploy-crosschain-gov.ts | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/deploy/deploy-crosschain-gov.ts b/deploy/deploy-crosschain-gov.ts index 09106da..b64399e 100644 --- a/deploy/deploy-crosschain-gov.ts +++ b/deploy/deploy-crosschain-gov.ts @@ -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...")