diff --git a/spot-contracts/.openzeppelin/mainnet.json b/spot-contracts/.openzeppelin/mainnet.json index e139eb59..04b7f534 100644 --- a/spot-contracts/.openzeppelin/mainnet.json +++ b/spot-contracts/.openzeppelin/mainnet.json @@ -2605,7 +2605,7 @@ "label": "feePolicy", "offset": 0, "slot": "302", - "type": "t_contract(IFeePolicy)11570", + "type": "t_contract(IFeePolicy)11619", "contract": "PerpetualTranche", "src": "contracts/PerpetualTranche.sol:132" }, @@ -2629,7 +2629,7 @@ "label": "bondIssuer", "offset": 0, "slot": "305", - "type": "t_contract(IBondIssuer)11490", + "type": "t_contract(IBondIssuer)11539", "contract": "PerpetualTranche", "src": "contracts/PerpetualTranche.sol:150" }, @@ -2637,7 +2637,7 @@ "label": "_depositBond", "offset": 0, "slot": "306", - "type": "t_contract(IBondController)12129", + "type": "t_contract(IBondController)12178", "contract": "PerpetualTranche", "src": "contracts/PerpetualTranche.sol:153" }, @@ -2685,7 +2685,7 @@ "label": "_mintedSupplyPerTranche_DEPRECATED", "offset": 0, "slot": "312", - "type": "t_mapping(t_contract(ITranche)12156,t_uint256)", + "type": "t_mapping(t_contract(ITranche)12205,t_uint256)", "contract": "PerpetualTranche", "src": "contracts/PerpetualTranche.sol:182" }, @@ -2717,7 +2717,7 @@ "label": "vault", "offset": 0, "slot": "317", - "type": "t_contract(IRolloverVault)11853", + "type": "t_contract(IRolloverVault)11902", "contract": "PerpetualTranche", "src": "contracts/PerpetualTranche.sol:209" } @@ -2751,11 +2751,11 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IBondController)12129": { + "t_contract(IBondController)12178": { "label": "contract IBondController", "numberOfBytes": "20" }, - "t_contract(IBondIssuer)11490": { + "t_contract(IBondIssuer)11539": { "label": "contract IBondIssuer", "numberOfBytes": "20" }, @@ -2763,15 +2763,15 @@ "label": "contract IERC20Upgradeable", "numberOfBytes": "20" }, - "t_contract(IFeePolicy)11570": { + "t_contract(IFeePolicy)11619": { "label": "contract IFeePolicy", "numberOfBytes": "20" }, - "t_contract(IRolloverVault)11853": { + "t_contract(IRolloverVault)11902": { "label": "contract IRolloverVault", "numberOfBytes": "20" }, - "t_contract(ITranche)12156": { + "t_contract(ITranche)12205": { "label": "contract ITranche", "numberOfBytes": "20" }, @@ -2791,7 +2791,7 @@ "label": "mapping(contract IERC20Upgradeable => uint256)", "numberOfBytes": "32" }, - "t_mapping(t_contract(ITranche)12156,t_uint256)": { + "t_mapping(t_contract(ITranche)12205,t_uint256)": { "label": "mapping(contract ITranche => uint256)", "numberOfBytes": "32" }, @@ -2840,6 +2840,305 @@ }, "namespaces": {} } + }, + "da4c4261b05e9c48f821bf11eb12a2eeae529c35a2152ca2e4794ad6729b13d6": { + "address": "0xA85Be82083E032EdF32a19028DF558484b399196", + "txHash": "0xa4c0c32b4a5756ea10e89753679d3d3485dae0e8ada42fc7cc26633b0f934ec5", + "layout": { + "solcVersion": "0.8.20", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "underlying", + "offset": 0, + "slot": "301", + "type": "t_contract(IERC20Upgradeable)1205", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:107" + }, + { + "label": "_deployed", + "offset": 0, + "slot": "302", + "type": "t_struct(AddressSet)4926_storage", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:111" + }, + { + "label": "minDeploymentAmt", + "offset": 0, + "slot": "304", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:119" + }, + { + "label": "perp", + "offset": 0, + "slot": "305", + "type": "t_contract(IPerpetualTranche)11845", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:122" + }, + { + "label": "feePolicy", + "offset": 0, + "slot": "306", + "type": "t_contract(IFeePolicy)11619", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:128" + }, + { + "label": "keeper", + "offset": 0, + "slot": "307", + "type": "t_address", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:133" + }, + { + "label": "reservedUnderlyingBal", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:144" + }, + { + "label": "reservedSubscriptionPerc", + "offset": 0, + "slot": "309", + "type": "t_uint256", + "contract": "RolloverVault", + "src": "contracts/RolloverVault.sol:152" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IERC20Upgradeable)1205": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IFeePolicy)11619": { + "label": "contract IFeePolicy", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)11845": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)4926_storage": { + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)4611_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)4611_storage": { + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/spot-vaults/.openzeppelin/mainnet.json b/spot-vaults/.openzeppelin/mainnet.json index bcc7efee..befb1c87 100644 --- a/spot-vaults/.openzeppelin/mainnet.json +++ b/spot-vaults/.openzeppelin/mainnet.json @@ -326,6 +326,325 @@ }, "namespaces": {} } + }, + "d00a4d75788e81fee448c9ae6273844f2de0999fa1330a99643609691807db49": { + "address": "0x0CE64cD7583864f7005898Aa133C74DBccaca063", + "txHash": "0x9116fa3d9dd6a540f56cd7e85144a0eaf7408d8fcb32dde8f5993884d5321ac1", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC20BurnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol:51" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_status", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88" + }, + { + "label": "perp", + "offset": 0, + "slot": "301", + "type": "t_contract(IPerpetualTranche)389", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:89" + }, + { + "label": "usd", + "offset": 0, + "slot": "302", + "type": "t_contract(IERC20Upgradeable)1872", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:92" + }, + { + "label": "usdUnitAmt", + "offset": 0, + "slot": "303", + "type": "t_uint256", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:95" + }, + { + "label": "perpUnitAmt", + "offset": 0, + "slot": "304", + "type": "t_uint256", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:98" + }, + { + "label": "keeper", + "offset": 0, + "slot": "305", + "type": "t_address", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:103" + }, + { + "label": "pricingStrategy", + "offset": 0, + "slot": "306", + "type": "t_contract(ISpotPricingStrategy)8533", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:106" + }, + { + "label": "fees", + "offset": 0, + "slot": "307", + "type": "t_struct(BillBrokerFees)8494_storage", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:109" + }, + { + "label": "arHardBound", + "offset": 0, + "slot": "314", + "type": "t_struct(Range)8475_storage", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:112" + }, + { + "label": "arSoftBound", + "offset": 0, + "slot": "316", + "type": "t_struct(Range)8475_storage", + "contract": "BillBroker", + "src": "contracts/BillBroker.sol:116" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IERC20Upgradeable)1872": { + "label": "contract IERC20Upgradeable", + "numberOfBytes": "20" + }, + "t_contract(IPerpetualTranche)389": { + "label": "contract IPerpetualTranche", + "numberOfBytes": "20" + }, + "t_contract(ISpotPricingStrategy)8533": { + "label": "contract ISpotPricingStrategy", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(BillBrokerFees)8494_storage": { + "label": "struct BillBrokerFees", + "members": [ + { + "label": "mintFeePerc", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "burnFeePerc", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "perpToUSDSwapFeePercs", + "type": "t_struct(Range)8475_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "usdToPerpSwapFeePercs", + "type": "t_struct(Range)8475_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "protocolSwapSharePerc", + "type": "t_uint256", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_struct(Range)8475_storage": { + "label": "struct Range", + "members": [ + { + "label": "lower", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "upper", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/spot-vaults/hardhat.config.ts b/spot-vaults/hardhat.config.ts index a9ad1cfa..d697b3bd 100644 --- a/spot-vaults/hardhat.config.ts +++ b/spot-vaults/hardhat.config.ts @@ -10,6 +10,7 @@ import "hardhat-gas-reporter"; // Loads custom tasks import "./tasks/deploy"; +import "./tasks/upgrade"; import "./tasks/ops"; import "./tasks/info"; import "./tasks/tools"; diff --git a/spot-vaults/tasks/upgrade.ts b/spot-vaults/tasks/upgrade.ts new file mode 100644 index 00000000..613ba3c9 --- /dev/null +++ b/spot-vaults/tasks/upgrade.ts @@ -0,0 +1,80 @@ +import { getAdminAddress, getImplementationAddress } from "@openzeppelin/upgrades-core"; +import { task, types } from "hardhat/config"; +import { TaskArguments } from "hardhat/types"; +import { sleep } from "./tools"; + +task("validate_upgrade") + .addPositionalParam("factory", "the name of the factory", undefined, types.string, false) + .addPositionalParam("address", "the address of the deployed proxy contract", undefined, types.string, false) + .setAction(async function (args: TaskArguments, hre) { + const { factory, address } = args; + const Factory = await hre.ethers.getContractFactory(factory); + console.log("Trying strict validation"); + try { + await hre.upgrades.validateUpgrade(address, Factory); + } catch (e) { + console.log("Strict validation failed. ", e); + console.log("Retrying but allowing variable renames."); + await hre.upgrades.validateUpgrade(address, Factory, { + unsafeAllowRenames: true, + }); + } + console.log("Success"); + }); + +task("prepare_upgrade") + .addPositionalParam("factory", "the name of the factory", undefined, types.string, false) + .addPositionalParam("address", "the address of the deployed proxy contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const { factory, address } = args; + + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + console.log("Proxy Admin", await getAdminAddress(hre.ethers.provider, address)); + + const Factory = await hre.ethers.getContractFactory(factory); + const newImpl = await hre.upgrades.prepareUpgrade(address, Factory, { + unsafeAllowRenames: true, + }); + console.log("Deploying using", factory); + console.log("New implementation at:", newImpl); + + console.log("Update implementation by running the following:"); + console.log(`proxyAdmin.upgrade(${address}, ${newImpl})`); + + await sleep(15); + await hre.run("verify:contract", { + address: newImpl, + }); + }); + +task("upgrade:testnet") + .addPositionalParam("factory", "the name of the factory", undefined, types.string, false) + .addPositionalParam("address", "the address of the deployed proxy contract", undefined, types.string, false) + .addParam("fromIdx", "the index of sender", 0, types.int) + .setAction(async function (args: TaskArguments, hre) { + const signer = (await hre.ethers.getSigners())[args.fromIdx]; + const signerAddress = await signer.getAddress(); + console.log("Signer", signerAddress); + + const { factory, address } = args; + const Factory = await hre.ethers.getContractFactory(factory); + + console.log("Proxy", address); + console.log("Current implementation", await getImplementationAddress(hre.ethers.provider, address)); + + const impl = await hre.upgrades.upgradeProxy(address, Factory, { + unsafeAllowRenames: true, + }); + await impl.deployed(); + const newImpl = await getImplementationAddress(hre.ethers.provider, address); + console.log("Updated implementation", newImpl); + + await sleep(15); + await hre.run("verify:contract", { + address: newImpl, + }); + });