From d6fb42fb4c87abd32bf40a2b2aecb969da110fe8 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 11:38:52 +0200 Subject: [PATCH 01/12] Extract endowmentMultiSig upgrade tasks into separate files --- tasks/upgrade/endowmentMultiSig/index.ts | 2 -- tasks/upgrade/index.ts | 2 ++ .../upgradeImplementation.ts => upgradeEndowmentMultiSig.ts} | 2 +- .../upgradeEmitter.ts => upgradeEndowmentMultiSigEmitter.ts} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 tasks/upgrade/endowmentMultiSig/index.ts rename tasks/upgrade/{endowmentMultiSig/upgradeImplementation.ts => upgradeEndowmentMultiSig.ts} (98%) rename tasks/upgrade/{endowmentMultiSig/upgradeEmitter.ts => upgradeEndowmentMultiSigEmitter.ts} (98%) diff --git a/tasks/upgrade/endowmentMultiSig/index.ts b/tasks/upgrade/endowmentMultiSig/index.ts deleted file mode 100644 index 6b6aaacc4..000000000 --- a/tasks/upgrade/endowmentMultiSig/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "./upgradeEmitter"; -import "./upgradeImplementation"; diff --git a/tasks/upgrade/index.ts b/tasks/upgrade/index.ts index 97ed41661..6b182c23d 100644 --- a/tasks/upgrade/index.ts +++ b/tasks/upgrade/index.ts @@ -3,5 +3,7 @@ import "./upgradeAPTeamMultiSig"; import "./upgradeCharityApplications"; import "./upgradeContractsUsingAccountStorage"; import "./upgradeFacets"; +import "./upgradeEndowmentMultiSig"; +import "./upgradeEndowmentMultiSigEmitter"; import "./upgradeRegistrar"; import "./upgradeRouter"; diff --git a/tasks/upgrade/endowmentMultiSig/upgradeImplementation.ts b/tasks/upgrade/upgradeEndowmentMultiSig.ts similarity index 98% rename from tasks/upgrade/endowmentMultiSig/upgradeImplementation.ts rename to tasks/upgrade/upgradeEndowmentMultiSig.ts index b383de960..40c74f8ab 100644 --- a/tasks/upgrade/endowmentMultiSig/upgradeImplementation.ts +++ b/tasks/upgrade/upgradeEndowmentMultiSig.ts @@ -21,7 +21,7 @@ type TaskArgs = { }; task( - "upgrade:endowmentMultiSig:implementation", + "upgrade:EndowmentMultiSig", "Will upgrade the implementation of the EndowmentMultiSig contract" ) .addOptionalParam( diff --git a/tasks/upgrade/endowmentMultiSig/upgradeEmitter.ts b/tasks/upgrade/upgradeEndowmentMultiSigEmitter.ts similarity index 98% rename from tasks/upgrade/endowmentMultiSig/upgradeEmitter.ts rename to tasks/upgrade/upgradeEndowmentMultiSigEmitter.ts index 8db8137d6..455cefab7 100644 --- a/tasks/upgrade/endowmentMultiSig/upgradeEmitter.ts +++ b/tasks/upgrade/upgradeEndowmentMultiSigEmitter.ts @@ -24,7 +24,7 @@ type TaskArgs = { }; task( - "upgrade:endowmentMultiSig:emitter", + "upgrade:EndowmentMultiSigEmitter", "Will upgrade the EndowmentMultiSigEmitter implementation contract" ) .addFlag("skipVerify", "Skip contract verification") From 3fae20a21a55fcb25ca1ccb663fc575f99cefdd1 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:07:06 +0200 Subject: [PATCH 02/12] Split endowment multisig deploy into separate tasks/scripts --- .../endowment-multisig/scripts/deploy.ts | 76 +------------------ .../scripts/deployEndowmentMultiSig.ts | 29 +++++++ .../scripts/deployEndowmentMultiSigEmitter.ts | 36 +++++++++ .../scripts/deployEndowmentMultiSigFactory.ts | 46 +++++++++++ tasks/deploy/deployAngelProtocol.ts | 28 +++++-- tasks/deploy/deployEndowmentMultisig.ts | 40 ++-------- .../deploy/deployEndowmentMultisigEmitter.ts | 51 +++++++++++++ .../deploy/deployEndowmentMultisigFactory.ts | 52 +++++++++++++ tasks/deploy/index.ts | 2 + 9 files changed, 246 insertions(+), 114 deletions(-) create mode 100644 contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSig.ts create mode 100644 contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigEmitter.ts create mode 100644 contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigFactory.ts create mode 100644 tasks/deploy/deployEndowmentMultisigEmitter.ts create mode 100644 tasks/deploy/deployEndowmentMultisigFactory.ts diff --git a/contracts/multisigs/endowment-multisig/scripts/deploy.ts b/contracts/multisigs/endowment-multisig/scripts/deploy.ts index 1fe98515e..3f88eaab7 100644 --- a/contracts/multisigs/endowment-multisig/scripts/deploy.ts +++ b/contracts/multisigs/endowment-multisig/scripts/deploy.ts @@ -1,73 +1,3 @@ -import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; -import {HardhatRuntimeEnvironment} from "hardhat/types"; -import { - EndowmentMultiSigEmitter__factory, - EndowmentMultiSigFactory__factory, - EndowmentMultiSig__factory, -} from "typechain-types"; -import {Deployment, ProxyDeployment} from "types"; -import {deploy, deployBehindProxy, logger, updateAddresses} from "utils"; - -export async function deployEndowmentMultiSig( - registrar: string, - proxyAdmin: string, - factoryOwner: string, - deployer: SignerWithAddress, - hre: HardhatRuntimeEnvironment -): Promise<{ - emitter: ProxyDeployment; - factory: Deployment; - implementation: Deployment; -}> { - logger.out("Deploying EndowmentMultiSig contracts..."); - - // deploy implementation contract - const implementation = await deploy(new EndowmentMultiSig__factory(deployer)); - - // deploy factory - const factory = await deploy(new EndowmentMultiSigFactory__factory(deployer), [ - implementation.contract.address, - proxyAdmin, - registrar, - ]); - - logger.out(`Transferring ownership to: ${factoryOwner}...`); - const tx = await factory.contract.transferOwnership(factoryOwner); - logger.out(`Tx hash: ${tx.hash}`); - await tx.wait(); - const newOwner = await factory.contract.owner(); - if (newOwner !== factoryOwner) { - throw new Error(`Error updating owner: expected '${factoryOwner}', actual: '${newOwner}'`); - } - - // emitter data setup - const Emitter = new EndowmentMultiSigEmitter__factory(deployer); - const initData = Emitter.interface.encodeFunctionData("initEndowmentMultiSigEmitter", [ - factory.contract.address, - ]); - // deploy emitter - const emitter = await deployBehindProxy(Emitter, proxyAdmin, initData); - - // update address file - await updateAddresses( - { - multiSig: { - endowment: { - emitter: { - implementation: emitter.implementation.contract.address, - proxy: emitter.proxy.contract.address, - }, - factory: factory.contract.address, - implementation: implementation.contract.address, - }, - }, - }, - hre - ); - - return { - emitter, - factory, - implementation, - }; -} +export * from "./deployEndowmentMultiSig"; +export * from "./deployEndowmentMultiSigEmitter"; +export * from "./deployEndowmentMultiSigFactory"; diff --git a/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSig.ts b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSig.ts new file mode 100644 index 000000000..b3ba5ed18 --- /dev/null +++ b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSig.ts @@ -0,0 +1,29 @@ +import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {EndowmentMultiSig__factory} from "typechain-types"; +import {Deployment} from "types"; +import {deploy, logger, updateAddresses} from "utils"; + +export async function deployEndowmentMultiSig( + deployer: SignerWithAddress, + hre: HardhatRuntimeEnvironment +): Promise> { + logger.out("Deploying EndowmentMultiSig..."); + + // deploy implementation contract + const implementation = await deploy(new EndowmentMultiSig__factory(deployer)); + + // update address file + await updateAddresses( + { + multiSig: { + endowment: { + implementation: implementation.contract.address, + }, + }, + }, + hre + ); + + return implementation; +} diff --git a/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigEmitter.ts b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigEmitter.ts new file mode 100644 index 000000000..2107cd528 --- /dev/null +++ b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigEmitter.ts @@ -0,0 +1,36 @@ +import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {EndowmentMultiSigEmitter__factory} from "typechain-types"; +import {ProxyDeployment} from "types"; +import {deployBehindProxy, logger, updateAddresses} from "utils"; + +export async function deployEndowmentMultiSigEmitter( + factory: string, + proxyAdmin: string, + deployer: SignerWithAddress, + hre: HardhatRuntimeEnvironment +): Promise> { + logger.out("Deploying EndowmentMultiSigEmitter..."); + + // deploy emitter + const Emitter = new EndowmentMultiSigEmitter__factory(deployer); + const initData = Emitter.interface.encodeFunctionData("initEndowmentMultiSigEmitter", [factory]); + const emitter = await deployBehindProxy(Emitter, proxyAdmin, initData); + + // update address file + await updateAddresses( + { + multiSig: { + endowment: { + emitter: { + implementation: emitter.implementation.contract.address, + proxy: emitter.proxy.contract.address, + }, + }, + }, + }, + hre + ); + + return emitter; +} diff --git a/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigFactory.ts b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigFactory.ts new file mode 100644 index 000000000..34c22a802 --- /dev/null +++ b/contracts/multisigs/endowment-multisig/scripts/deployEndowmentMultiSigFactory.ts @@ -0,0 +1,46 @@ +import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {EndowmentMultiSigFactory__factory} from "typechain-types"; +import {Deployment} from "types"; +import {deploy, logger, updateAddresses} from "utils"; + +export async function deployEndowmentMultiSigFactory( + implementation: string, + registrar: string, + proxyAdmin: string, + factoryOwner: string, + deployer: SignerWithAddress, + hre: HardhatRuntimeEnvironment +): Promise> { + logger.out("Deploying EndowmentMultiSigFactory..."); + + // deploy factory + const factory = await deploy(new EndowmentMultiSigFactory__factory(deployer), [ + implementation, + proxyAdmin, + registrar, + ]); + + logger.out(`Transferring ownership to: ${factoryOwner}...`); + const tx = await factory.contract.transferOwnership(factoryOwner); + logger.out(`Tx hash: ${tx.hash}`); + await tx.wait(); + const newOwner = await factory.contract.owner(); + if (newOwner !== factoryOwner) { + throw new Error(`Error updating owner: expected '${factoryOwner}', actual: '${newOwner}'`); + } + + // update address file + await updateAddresses( + { + multiSig: { + endowment: { + factory: factory.contract.address, + }, + }, + }, + hre + ); + + return factory; +} diff --git a/tasks/deploy/deployAngelProtocol.ts b/tasks/deploy/deployAngelProtocol.ts index eb5809cb5..c6c7b85c2 100644 --- a/tasks/deploy/deployAngelProtocol.ts +++ b/tasks/deploy/deployAngelProtocol.ts @@ -5,7 +5,11 @@ import {deployIndexFund} from "contracts/core/index-fund/scripts/deploy"; import {deployRegistrar} from "contracts/core/registrar/scripts/deploy"; import {deployRouter} from "contracts/core/router/scripts/deploy"; import {deployVaultEmitter} from "contracts/core/vault/scripts/deployVaultEmitter"; -import {deployEndowmentMultiSig} from "contracts/multisigs/endowment-multisig/scripts/deploy"; +import { + deployEndowmentMultiSig, + deployEndowmentMultiSigEmitter, + deployEndowmentMultiSigFactory, +} from "contracts/multisigs/endowment-multisig/scripts/deploy"; import { deployAPTeamMultiSig, deployCharityApplications, @@ -132,13 +136,21 @@ task("deploy:AngelProtocol", "Will deploy complete Angel Protocol") hre ); - const endowmentMultiSig = await deployEndowmentMultiSig( + const endowmentMultiSig = await deployEndowmentMultiSig(deployer, hre); + const endowmentMultiSigFactory = await deployEndowmentMultiSigFactory( + endowmentMultiSig.contract.address, registrar.proxy.contract.address, proxyAdminMultisig.contract.address, apTeamMultisig.proxy.contract.address, deployer, hre ); + const endowmentMultiSigEmitter = await deployEndowmentMultiSigEmitter( + endowmentMultiSigFactory.contract.address, + proxyAdminMultisig.contract.address, + deployer, + hre + ); const vaultEmitter = await deployVaultEmitter( proxyAdminMultisig.contract.address, @@ -152,8 +164,8 @@ task("deploy:AngelProtocol", "Will deploy complete Angel Protocol") treasury: treasuryAddress, uniswapRouter: thirdPartyAddresses.uniswap.swapRouter.address, //address uniswapFactory: thirdPartyAddresses.uniswap.factory.address, //address - multisigFactory: endowmentMultiSig.factory.contract.address, //address - multisigEmitter: endowmentMultiSig.emitter.proxy.contract.address, //address + multisigFactory: endowmentMultiSigFactory.contract.address, //address + multisigEmitter: endowmentMultiSigEmitter.proxy.contract.address, //address charityApplications: charityApplications.proxy.contract.address, //address proxyAdmin: proxyAdminMultisig.contract.address, //address usdcAddress: thirdPartyAddresses.usdcToken.address, @@ -187,10 +199,10 @@ task("deploy:AngelProtocol", "Will deploy complete Angel Protocol") charityApplications.proxy, indexFund.implementation, indexFund.proxy, - endowmentMultiSig.emitter.implementation, - endowmentMultiSig.emitter.proxy, - endowmentMultiSig.factory, - endowmentMultiSig.implementation, + endowmentMultiSigEmitter.implementation, + endowmentMultiSigEmitter.proxy, + endowmentMultiSigFactory, + endowmentMultiSig, gasFwd.factory, gasFwd.implementation, vaultEmitter.implementation, diff --git a/tasks/deploy/deployEndowmentMultisig.ts b/tasks/deploy/deployEndowmentMultisig.ts index 092ae848e..4953eac0d 100644 --- a/tasks/deploy/deployEndowmentMultisig.ts +++ b/tasks/deploy/deployEndowmentMultisig.ts @@ -1,57 +1,31 @@ import {deployEndowmentMultiSig} from "contracts/multisigs/endowment-multisig/scripts/deploy"; import {task} from "hardhat/config"; -import {confirmAction, isLocalNetwork, getAddresses, logger, verify, getSigners} from "utils"; +import {confirmAction, getSigners, isLocalNetwork, logger, verify} from "utils"; type TaskArgs = { - apTeamSignerPkey?: string; - registrar?: string; skipVerify: boolean; yes: boolean; }; task("deploy:EndowmentMultiSig", "Will deploy EndowmentMultiSig contract") - .addOptionalParam( - "registrar", - "Addresss of the registrar contract. Will do a local lookup from contract-address.json if none is provided." - ) - .addOptionalParam( - "apTeamSignerPkey", - "If running on prod, provide a pkey for a valid APTeam Multisig Owner." - ) .addFlag("skipVerify", "Skip contract verification") .addFlag("yes", "Automatic yes to prompt.") .setAction(async (taskArgs: TaskArgs, hre) => { try { - const addresses = await getAddresses(hre); - const {deployer} = await getSigners(hre); + logger.divider(); + logger.out("Deploying EndowmentMultiSig..."); - const registrarAddress = taskArgs.registrar || addresses.registrar.proxy; + const {deployer} = await getSigners(hre); - const isConfirmed = taskArgs.yes || (await confirmAction("Deploying EndowmentMultiSig...")); + const isConfirmed = taskArgs.yes || (await confirmAction()); if (!isConfirmed) { return logger.out("Confirmation denied.", logger.Level.Warn); } - const deployData = await deployEndowmentMultiSig( - registrarAddress, - addresses.multiSig.proxyAdmin, - addresses.multiSig.apTeam.proxy, - deployer, - hre - ); - - await hre.run("manage:registrar:updateConfig", { - multisigFactory: deployData.factory.contract.address, - multisigEmitter: deployData.emitter.proxy.contract.address, - apTeamSignerPkey: taskArgs.apTeamSignerPkey, - yes: true, - }); + const deployData = await deployEndowmentMultiSig(deployer, hre); if (!isLocalNetwork(hre) && !taskArgs.skipVerify) { - await verify(hre, deployData.emitter.implementation); - await verify(hre, deployData.emitter.proxy); - await verify(hre, deployData.factory); - await verify(hre, deployData.implementation); + await verify(hre, deployData); } } catch (error) { logger.out(error, logger.Level.Error); diff --git a/tasks/deploy/deployEndowmentMultisigEmitter.ts b/tasks/deploy/deployEndowmentMultisigEmitter.ts new file mode 100644 index 000000000..26eb3f43f --- /dev/null +++ b/tasks/deploy/deployEndowmentMultisigEmitter.ts @@ -0,0 +1,51 @@ +import {deployEndowmentMultiSigEmitter} from "contracts/multisigs/endowment-multisig/scripts/deploy"; +import {task} from "hardhat/config"; +import {confirmAction, getAddresses, getSigners, isLocalNetwork, logger, verify} from "utils"; + +type TaskArgs = { + apTeamSignerPkey?: string; + skipVerify: boolean; + yes: boolean; +}; + +task("deploy:EndowmentMultiSigEmitter", "Will deploy EndowmentMultiSigEmitter contract") + .addOptionalParam( + "apTeamSignerPkey", + "If running on prod, provide a pkey for a valid APTeam Multisig Owner." + ) + .addFlag("skipVerify", "Skip contract verification") + .addFlag("yes", "Automatic yes to prompt.") + .setAction(async (taskArgs: TaskArgs, hre) => { + try { + logger.divider(); + logger.out("Deploying EndowmentMultiSigEmitter..."); + + const addresses = await getAddresses(hre); + const {deployer} = await getSigners(hre); + + const isConfirmed = taskArgs.yes || (await confirmAction()); + if (!isConfirmed) { + return logger.out("Confirmation denied.", logger.Level.Warn); + } + + const deployData = await deployEndowmentMultiSigEmitter( + addresses.multiSig.endowment.factory, + addresses.multiSig.proxyAdmin, + deployer, + hre + ); + + await hre.run("manage:registrar:updateConfig", { + multisigEmitter: deployData.proxy.contract.address, + apTeamSignerPkey: taskArgs.apTeamSignerPkey, + yes: true, + }); + + if (!isLocalNetwork(hre) && !taskArgs.skipVerify) { + await verify(hre, deployData.implementation); + await verify(hre, deployData.proxy); + } + } catch (error) { + logger.out(error, logger.Level.Error); + } + }); diff --git a/tasks/deploy/deployEndowmentMultisigFactory.ts b/tasks/deploy/deployEndowmentMultisigFactory.ts new file mode 100644 index 000000000..f55a5b53b --- /dev/null +++ b/tasks/deploy/deployEndowmentMultisigFactory.ts @@ -0,0 +1,52 @@ +import {deployEndowmentMultiSigFactory} from "contracts/multisigs/endowment-multisig/scripts/deploy"; +import {task} from "hardhat/config"; +import {confirmAction, getAddresses, getSigners, isLocalNetwork, logger, verify} from "utils"; + +type TaskArgs = { + apTeamSignerPkey?: string; + skipVerify: boolean; + yes: boolean; +}; + +task("deploy:EndowmentMultiSigFactory", "Will deploy EndowmentMultiSigFactory contract") + .addOptionalParam( + "apTeamSignerPkey", + "If running on prod, provide a pkey for a valid APTeam Multisig Owner." + ) + .addFlag("skipVerify", "Skip contract verification") + .addFlag("yes", "Automatic yes to prompt.") + .setAction(async (taskArgs: TaskArgs, hre) => { + try { + logger.divider(); + logger.out("Deploying EndowmentMultiSigFactory..."); + + const addresses = await getAddresses(hre); + const {deployer} = await getSigners(hre); + + const isConfirmed = taskArgs.yes || (await confirmAction()); + if (!isConfirmed) { + return logger.out("Confirmation denied.", logger.Level.Warn); + } + + const deployData = await deployEndowmentMultiSigFactory( + addresses.multiSig.endowment.implementation, + addresses.registrar.proxy, + addresses.multiSig.proxyAdmin, + addresses.multiSig.apTeam.proxy, + deployer, + hre + ); + + await hre.run("manage:registrar:updateConfig", { + multisigFactory: deployData.contract.address, + apTeamSignerPkey: taskArgs.apTeamSignerPkey, + yes: true, + }); + + if (!isLocalNetwork(hre) && !taskArgs.skipVerify) { + await verify(hre, deployData); + } + } catch (error) { + logger.out(error, logger.Level.Error); + } + }); diff --git a/tasks/deploy/index.ts b/tasks/deploy/index.ts index b65b3ca31..adbfc18df 100644 --- a/tasks/deploy/index.ts +++ b/tasks/deploy/index.ts @@ -4,6 +4,8 @@ import "./deployAccountsDiamond"; import "./deployAngelProtocol"; import "./deployCharityApplications"; import "./deployEndowmentMultisig"; +import "./deployEndowmentMultisigEmitter"; +import "./deployEndowmentMultisigFactory"; import "./deployGasFwd"; // import "./deployGiftcard"; import "./deployHaloImplementation"; From 4ccc83113d56853fa7f0196e1711fe4346fb3102 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:11:09 +0200 Subject: [PATCH 03/12] Fix log in submitMultiSigTx --- tasks/helpers/submitMultiSigTx.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/helpers/submitMultiSigTx.ts b/tasks/helpers/submitMultiSigTx.ts index 2be3a868c..e8f2956cb 100644 --- a/tasks/helpers/submitMultiSigTx.ts +++ b/tasks/helpers/submitMultiSigTx.ts @@ -1,6 +1,5 @@ import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; import {BytesLike, Wallet} from "ethers"; -import {parseUnits} from "ethers/lib/utils"; import {IMultiSigGeneric__factory} from "typechain-types"; import {filterEvents, logger} from "utils"; @@ -33,6 +32,7 @@ export async function submitMultiSigTx( multisig.filters.TransactionExecuted() ).at(0); if (transactionExecutedEvent) { + logger.out("Tx executed."); return true; } @@ -54,7 +54,7 @@ export async function submitMultiSigTx( } // is confirmed but not executed -> requires manual execution - logger.out(`Executing the new charity endowment with transaction ID: ${txId}...`); + logger.out(`Manual execution required, executing transaction: ${txId}...`); const tx2 = await multisig.executeTransaction(txId); logger.out(`Tx hash: ${tx2.hash}`); const execReceipt = await tx2.wait(); @@ -68,5 +68,6 @@ export async function submitMultiSigTx( throw new Error(`Unexpected: ${multisig.filters.TransactionExecuted.name} not emitted.`); } + logger.out("Tx executed."); return true; } From b2b8a7c9f6430ba2d480bfe741310d79a06ac15f Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:13:43 +0200 Subject: [PATCH 04/12] Add 'upgradeProxy' helper --- utils/deploy.ts | 50 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/utils/deploy.ts b/utils/deploy.ts index a4b94651a..3c346548d 100644 --- a/utils/deploy.ts +++ b/utils/deploy.ts @@ -1,7 +1,9 @@ -import {BytesLike, ContractFactory} from "ethers"; -import {ProxyContract__factory} from "typechain-types"; +import {BytesLike, ContractFactory, Wallet} from "ethers"; +import {ITransparentUpgradeableProxy__factory, ProxyContract__factory} from "typechain-types"; import {Deployment, ProxyDeployment} from "types"; import {getContractName, logger} from "."; +import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; +import {submitMultiSigTx} from "tasks/helpers"; /** * Deploys a contract; includes logging of the relevant data @@ -66,3 +68,47 @@ export async function deployBehindProxy( function delay(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } + +/** + * Upgrades a proxy with a new implementation contract a contract behind a proxy; includes logging of the relevant data. + * + * Note: Deployment tx hash is logged only if the deployment fails. + * Otherwise the tx hash can be obtained by using the contract address to search the relevant Tx explorer. + * + * @param factory contract factory used to deploy the contract + * @param proxyAdmin proxy admin address + * @param initData data used to initialize the contract + * @returns object containing both implementation and proxy deployment data (including the contract instances) + */ +export async function upgradeProxy( + factory: T, + proxyAdminMultiSig: string, + proxyAdminOwner: SignerWithAddress | Wallet, + proxyToUpgrade: string +): Promise | undefined> { + const deployment = await deploy(factory); + + logger.out(`Upgrading proxy at: ${proxyToUpgrade}...`); + const proxy = ITransparentUpgradeableProxy__factory.connect(proxyToUpgrade, proxyAdminOwner); + const payload = proxy.interface.encodeFunctionData("upgradeTo", [deployment.contract.address]); + + const isExecuted = await submitMultiSigTx( + proxyAdminMultiSig, + proxyAdminOwner, + proxyToUpgrade, + payload + ); + if (!isExecuted) { + // The deployment will be considered valid only once the upgrade is confirmed by other ProxyAdminMultiSig owners + return; + } + + const newImplAddr = await proxy.implementation(); + if (newImplAddr !== deployment.contract.address) { + throw new Error( + `Unexpected: expected value "${deployment.contract.address}", but got "${newImplAddr}"` + ); + } + + return deployment; +} From 90a853cc26682b8bbc3ad5e38bd46fa04767e304 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:19:04 +0200 Subject: [PATCH 05/12] Create upgrade:VaultEmitter task --- tasks/upgrade/index.ts | 1 + tasks/upgrade/upgradeVaultEmitter.ts | 62 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 tasks/upgrade/upgradeVaultEmitter.ts diff --git a/tasks/upgrade/index.ts b/tasks/upgrade/index.ts index 6b182c23d..0e0e7dbae 100644 --- a/tasks/upgrade/index.ts +++ b/tasks/upgrade/index.ts @@ -7,3 +7,4 @@ import "./upgradeEndowmentMultiSig"; import "./upgradeEndowmentMultiSigEmitter"; import "./upgradeRegistrar"; import "./upgradeRouter"; +import "./upgradeVaultEmitter"; diff --git a/tasks/upgrade/upgradeVaultEmitter.ts b/tasks/upgrade/upgradeVaultEmitter.ts new file mode 100644 index 000000000..02a735421 --- /dev/null +++ b/tasks/upgrade/upgradeVaultEmitter.ts @@ -0,0 +1,62 @@ +import {task} from "hardhat/config"; +import {VaultEmitter__factory} from "typechain-types"; +import { + confirmAction, + getAddresses, + getProxyAdminOwner, + getSigners, + isLocalNetwork, + logger, + updateAddresses, + upgradeProxy, + verify, +} from "utils"; + +type TaskArgs = { + proxyAdminPkey?: string; + skipVerify: boolean; + yes: boolean; +}; + +task("upgrade:VaultEmitter", "Will upgrade the implementation of the VaultEmitter contract") + .addOptionalParam("proxyAdminPkey", "The pkey for the prod proxy admin multisig") + .addFlag("skipVerify", "Skip contract verification") + .addFlag("yes", "Automatic yes to prompt.") + .setAction(async (taskArgs: TaskArgs, hre) => { + try { + logger.divider(); + logger.out("Upgrading VaultEmitter proxy contract..."); + + const isConfirmed = taskArgs.yes || (await confirmAction()); + if (!isConfirmed) { + return logger.out("Confirmation denied.", logger.Level.Warn); + } + + const addresses = await getAddresses(hre); + const {deployer} = await getSigners(hre); + + const proxyAdminOwner = await getProxyAdminOwner(hre, taskArgs.proxyAdminPkey); + + const deployment = await upgradeProxy( + new VaultEmitter__factory(deployer), + addresses.multiSig.proxyAdmin, + proxyAdminOwner, + addresses.vaultEmitter.proxy + ); + + if (!deployment) { + return; + } + + await updateAddresses( + {multiSig: {endowment: {implementation: deployment.contract.address}}}, + hre + ); + + if (!isLocalNetwork(hre) && !taskArgs.skipVerify) { + await verify(hre, deployment); + } + } catch (error) { + logger.out(error, logger.Level.Error); + } + }); From ea3e77bb8a1c69252fea23cb5c7296f02098902c Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:20:40 +0200 Subject: [PATCH 06/12] Remove missing tasks/upgrade/index.ts > ./endowmentMultiSig import --- tasks/upgrade/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tasks/upgrade/index.ts b/tasks/upgrade/index.ts index 0e0e7dbae..0335644d7 100644 --- a/tasks/upgrade/index.ts +++ b/tasks/upgrade/index.ts @@ -1,4 +1,3 @@ -import "./endowmentMultiSig"; import "./upgradeAPTeamMultiSig"; import "./upgradeCharityApplications"; import "./upgradeContractsUsingAccountStorage"; From 9f25c50795efb0384c6dcfe295337ffa6493f8c4 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:26:14 +0200 Subject: [PATCH 07/12] Remove export of PROD_NETWORKS --- utils/networkHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/networkHelpers.ts b/utils/networkHelpers.ts index b0c64d513..3cb84b272 100644 --- a/utils/networkHelpers.ts +++ b/utils/networkHelpers.ts @@ -3,7 +3,7 @@ import {TwoWayMap} from "./twoWayMap"; import {ChainID} from "types"; import {logger} from "utils"; -export const PROD_NETWORKS = [ChainID.ethereum, ChainID.polygon]; +const PROD_NETWORKS = [ChainID.ethereum, ChainID.polygon]; // There are errors/mismatches in the axelar sdk jsons, so we just implement a lightweight // version here and use this instead. From c53bee7003eb3a51d08a6bebe56699f63ba7495d Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:30:32 +0200 Subject: [PATCH 08/12] Accept chainId: number in isProdNetwork --- utils/networkHelpers.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/networkHelpers.ts b/utils/networkHelpers.ts index 3cb84b272..35a90e646 100644 --- a/utils/networkHelpers.ts +++ b/utils/networkHelpers.ts @@ -44,7 +44,10 @@ export async function getChainId(hre: HardhatRuntimeEnvironment): Promise { - const thisChainId = await getChainId(hre); +export async function isProdNetwork( + hreOrChainId: HardhatRuntimeEnvironment | number +): Promise { + const thisChainId = + typeof hreOrChainId === "number" ? hreOrChainId : await getChainId(hreOrChainId); return PROD_NETWORKS.includes(thisChainId); } From 76ae9e19d23bfe6efc60df82b84a2777702739ca Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:31:10 +0200 Subject: [PATCH 09/12] Delay 'deploy' only if on prod network --- utils/deploy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/deploy.ts b/utils/deploy.ts index 3c346548d..4b7f46add 100644 --- a/utils/deploy.ts +++ b/utils/deploy.ts @@ -1,7 +1,7 @@ import {BytesLike, ContractFactory, Wallet} from "ethers"; import {ITransparentUpgradeableProxy__factory, ProxyContract__factory} from "typechain-types"; import {Deployment, ProxyDeployment} from "types"; -import {getContractName, logger} from "."; +import {getContractName, isProdNetwork, logger} from "."; import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; import {submitMultiSigTx} from "tasks/helpers"; @@ -25,7 +25,9 @@ export async function deploy( try { const contract = await factory.deploy(...(constructorArguments ?? [])); await contract.deployed(); - await delay(1000); + if (await isProdNetwork(contract.deployTransaction.chainId)) { + await delay(1000); + } logger.out(`Address: ${contract.address}`); return { constructorArguments, From 3a4011ba8b973ee4fe3ae866ea814d077c01baed Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:31:43 +0200 Subject: [PATCH 10/12] instead of 'delay' use 'wait(2) --- contract-address.json | 80 +++++++++++++++++++++---------------------- utils/deploy.ts | 10 ++---- 2 files changed, 43 insertions(+), 47 deletions(-) diff --git a/contract-address.json b/contract-address.json index 0b9a1928c..dbf555ab8 100644 --- a/contract-address.json +++ b/contract-address.json @@ -267,36 +267,36 @@ }, "31337": { "accounts": { - "diamond": "0xf7C497157c4879A4C6ca9B66CF3911BD2b71E2da", + "diamond": "0x620119C4952f0648Ee905cdE00C3077CA3f9961e", "facets": { - "accountsDepositWithdrawEndowments": "0x486b1C056AC365dD969056C717ab8E7AEd59a178", - "accountsAllowance": "0xAb3aa8BCEA9832CB18153Aa9731E989A289277f7", - "accountsCreateEndowment": "0xb463AFC0b3A499a2D826155fc6E6E73061BEF826", - "accountsGasManager": "0x53557e97deED0DdEEf2404a6A29A415e379051bb", - "accountsQueryEndowments": "0xbF6b148a440acAb936796ad40947C0C33C78639A", - "accountsStrategy": "0xA8b73E610095A61de646eD06334c61b94318df52", - "accountsSwapRouter": "0xacE2a31e8B8d66C24DAea008d1eDaf571369A728", - "accountsUpdate": "0x45CCb6251F3500c7EE3219eE47C213fB239346cB", - "accountsUpdateEndowments": "0x33F76554d1474061482Bfa858f35AFD9BAb4D1C5", - "accountsUpdateEndowmentSettingsController": "0x053d1190081dC68ED544D5A2788878E823F64a69", - "accountsUpdateStatusEndowments": "0x03Bb663AccB9FD14aD3c37B2D66B025bbd4Fc533", - "diamondCutFacet": "0x42f293b5D45C0a949639EE229E4c9acD51DF904D", - "diamondInit": "0x730EEB14F27B5D6132b9BF7D62eF877D89600F55", - "diamondLoupeFacet": "0x22a1B036322472baC663A4d741d87829c30b8E4e", - "ownershipFacet": "0x658E94B5FfBDe68b99203BBbBAef618D36862766" + "accountsDepositWithdrawEndowments": "0x7762cC8C23056112B5DD52Ee34E167705f2320a0", + "accountsAllowance": "0xE43146c332603072F11ca0c191910F613B1D096F", + "accountsCreateEndowment": "0x861492926cC1102b05A767a34Cf777295B8Ab68F", + "accountsGasManager": "0xc0bAe01FEeeDCD828880f2E6373b7fC02f677780", + "accountsQueryEndowments": "0x04dE2D843Cf70DcB84b8314F4FAd2b4a1E2C9b02", + "accountsStrategy": "0x723ca90Ab7A2778F8D8bAc07c789cA989909367e", + "accountsSwapRouter": "0x962cc5c05200b277Fb956096e8fc54E3CC4c3209", + "accountsUpdate": "0xc0cF17F786CacA1eC3a2987dbF6D52268b5c1eDF", + "accountsUpdateEndowments": "0xAEBEAB403Fc056701C6B07a14CE08f06D5DD5a72", + "accountsUpdateEndowmentSettingsController": "0xdF7e6f2144f8D933dE22d9c8ba21936e8dD30011", + "accountsUpdateStatusEndowments": "0x1f18bfBA95AA3b6A6872fFd77491a27f5BD73Bb9", + "diamondCutFacet": "0x2A8f0893A534983c63e4F52E39dDf3527b130768", + "diamondInit": "0x738337615Bfc3263812FfaAc977cA6b46bE77E80", + "diamondLoupeFacet": "0x11E1952322b142f2bE78f8830a2a5Af935258aD9", + "ownershipFacet": "0x52E2657Ab33B5A540D277737374d72CfB75c8D98" } }, "axelar": { - "gasService": "0x2e3c2536E1349e0E18d057f61499Ef64BB4B23E8", - "gateway": "0x3F1E0C7b13fb5b616EADFA8fbcC439B207aD960c" + "gasService": "0x7a0f853900040d5b131342018EAb9453723d9dcc", + "gateway": "0x79AF01164e25B9c6Ff828A5f795CFA62A635CFC3" }, "fundraising": { "implementation": "", "proxy": "" }, "gasFwd": { - "factory": "0xB4B13f54690D297b73291456e027b33aA303f744", - "implementation": "0xbc6Fe0a018266F9F02C0E21cb21388cf1D09a560" + "factory": "0x309F249c3aBE5B794199844b31CcBF946e514E14", + "implementation": "0xe0061c9850Bb89Ed46DA27C752697A3A800A0c7C" }, "giftcards": { "implementation": "", @@ -354,51 +354,51 @@ } }, "indexFund": { - "implementation": "0x9ed0fC3ba80c2c3B443b3dc51597245F840d9D5C", - "proxy": "0x5C680949386aCD7c85FBC6f56413936f091e3f47" + "implementation": "0xD81fBBD072E14A0e87Fb0C832F62Ae1134C79571", + "proxy": "0x660Af60D9fc671eA77F49f3Eb82f5639afeb9C26" }, "multiSig": { "charityApplications": { - "implementation": "0xBe3865948ba88f479Ca05265E9B59869d99552de", - "proxy": "0x3ab0ADa0d1De810cc6845B7433134554D98Ff39f" + "implementation": "0xa4341A6Dc7267D6226FAEf9C35Af3cfAd46b624E", + "proxy": "0x96ca668AEecf5A515d402fE1Ca0C5B664Dfc92d2" }, "apTeam": { - "implementation": "0x5602bAF3002df39FbAA568C0657bBBBB8e84527a", - "proxy": "0x7E891709346B193ff9f37Eb739C8a294B2395Ba6" + "implementation": "0xBfA2d241f8f2ecaeA58A7D60E2a358f851D5c1b1", + "proxy": "0x6843cd0Ccc776EA0FE7E26e6527C925F06dDD76C" }, "endowment": { "emitter": { - "implementation": "0x4CfBB8659d6BA2cA8af8c1857b4CE11a88A4B29E", - "proxy": "0xd9Ee17555a04f2E34ea43528628582AC45A6E984" + "implementation": "0x1470764dcEe1b28fbe89F439d575469fcC6DD366", + "proxy": "0x58b30db36480e15B582078C9260E45bAB77b2D0E" }, - "factory": "0x790094B9fdC8C8a83507f7Eb275DEe903Ffd71eD", - "implementation": "0x562EcE7daE572a5352D50562C472CBd41402F310" + "factory": "0x0C28aAB755c2Ce2c182B9abCdbF482f5C63970E3", + "implementation": "0xe22e0DCa96ef125891C6bbe9f40A74EFF5fd6994" }, - "proxyAdmin": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE" + "proxyAdmin": "0x0d60924d99B5C75Ce8A6698b44Fa864fdC84A2C9" }, "registrar": { - "implementation": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE", - "proxy": "0x2e3c2536E1349e0E18d057f61499Ef64BB4B23E8" + "implementation": "0x83316cc707f2DE80D7e90a9c48DA3D424FD5bE99", + "proxy": "0x243f0Fd94F12dEB0a8B73deEA25138479ee7E4aA" }, "router": { - "implementation": "0x3539f918A787529732465a4ccb89A96FFfb33073", - "proxy": "0x801E1B78732dbEC5B8ACc3EcD24031B4e32aD341" + "implementation": "0x84efD60753f006DE6878C7139675b110Da654459", + "proxy": "0x38f05a857a1D4FE6eB712A794a63C61D2b282b30" }, "tokens": { "dai": "", "halo": "", "reserveToken": "", - "seedAsset": "0x3539f918A787529732465a4ccb89A96FFfb33073", - "usdc": "0xF1d39847cF628e812901dFFEA4DA49cDC1c4DAa9", - "wmatic": "0x5F349EB2b67Ece807aCa8DE701B1F0954f8AB44e" + "seedAsset": "0xC79662B65F21A222EE95d22557664C3BE14Ec0FE", + "usdc": "0x6eB34f65AcC0dd09C3AA72C3C4bA08578a4A3F96", + "wmatic": "0xC4Af9B066983f55852a2796A7485ccE748392566" }, "uniswap": { "factory": "0x40B5D836dBeAf26c652210D8f07169B99E77C994", "swapRouter": "0x40B5D836dBeAf26c652210D8f07169B99E77C994" }, "vaultEmitter": { - "implementation": "0x402e14f3f9118A3745d8554EC4106450fB91aE23", - "proxy": "0x7Eb691CaD47e698642Ac507aC0383d8Ef1A20C7D" + "implementation": "0xAFE593B5005232dEDA257c1Ffe8bAD25423A60eA", + "proxy": "0xE592B0Cb837c2a227a92D5D34386b73Ca6EA8714" } }, "80001": { diff --git a/utils/deploy.ts b/utils/deploy.ts index 4b7f46add..1d11837bf 100644 --- a/utils/deploy.ts +++ b/utils/deploy.ts @@ -1,9 +1,9 @@ +import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; import {BytesLike, ContractFactory, Wallet} from "ethers"; +import {submitMultiSigTx} from "tasks/helpers"; import {ITransparentUpgradeableProxy__factory, ProxyContract__factory} from "typechain-types"; import {Deployment, ProxyDeployment} from "types"; import {getContractName, isProdNetwork, logger} from "."; -import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers"; -import {submitMultiSigTx} from "tasks/helpers"; /** * Deploys a contract; includes logging of the relevant data @@ -26,7 +26,7 @@ export async function deploy( const contract = await factory.deploy(...(constructorArguments ?? [])); await contract.deployed(); if (await isProdNetwork(contract.deployTransaction.chainId)) { - await delay(1000); + await contract.deployTransaction.wait(2); } logger.out(`Address: ${contract.address}`); return { @@ -67,10 +67,6 @@ export async function deployBehindProxy( return {implementation, proxy}; } -function delay(ms: number) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - /** * Upgrades a proxy with a new implementation contract a contract behind a proxy; includes logging of the relevant data. * From ab5c395c2a3798133999834e8f155d98de131db1 Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:37:54 +0200 Subject: [PATCH 11/12] Fix upgradProxy new implementation check --- utils/deploy.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/deploy.ts b/utils/deploy.ts index 1d11837bf..7f57f0802 100644 --- a/utils/deploy.ts +++ b/utils/deploy.ts @@ -87,8 +87,10 @@ export async function upgradeProxy( const deployment = await deploy(factory); logger.out(`Upgrading proxy at: ${proxyToUpgrade}...`); - const proxy = ITransparentUpgradeableProxy__factory.connect(proxyToUpgrade, proxyAdminOwner); - const payload = proxy.interface.encodeFunctionData("upgradeTo", [deployment.contract.address]); + const payload = ITransparentUpgradeableProxy__factory.createInterface().encodeFunctionData( + "upgradeTo", + [deployment.contract.address] + ); const isExecuted = await submitMultiSigTx( proxyAdminMultiSig, @@ -101,7 +103,8 @@ export async function upgradeProxy( return; } - const newImplAddr = await proxy.implementation(); + const proxy = ProxyContract__factory.connect(proxyToUpgrade, proxyAdminOwner); + const newImplAddr = await proxy.getImplementation(); if (newImplAddr !== deployment.contract.address) { throw new Error( `Unexpected: expected value "${deployment.contract.address}", but got "${newImplAddr}"` From 16d0b3e1b28b032fc0abea8332115dbb1ca77aef Mon Sep 17 00:00:00 2001 From: Nenad Date: Thu, 14 Sep 2023 12:58:45 +0200 Subject: [PATCH 12/12] Revert contract-address.json --- contract-address.json | 80 +++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/contract-address.json b/contract-address.json index dbf555ab8..0b9a1928c 100644 --- a/contract-address.json +++ b/contract-address.json @@ -267,36 +267,36 @@ }, "31337": { "accounts": { - "diamond": "0x620119C4952f0648Ee905cdE00C3077CA3f9961e", + "diamond": "0xf7C497157c4879A4C6ca9B66CF3911BD2b71E2da", "facets": { - "accountsDepositWithdrawEndowments": "0x7762cC8C23056112B5DD52Ee34E167705f2320a0", - "accountsAllowance": "0xE43146c332603072F11ca0c191910F613B1D096F", - "accountsCreateEndowment": "0x861492926cC1102b05A767a34Cf777295B8Ab68F", - "accountsGasManager": "0xc0bAe01FEeeDCD828880f2E6373b7fC02f677780", - "accountsQueryEndowments": "0x04dE2D843Cf70DcB84b8314F4FAd2b4a1E2C9b02", - "accountsStrategy": "0x723ca90Ab7A2778F8D8bAc07c789cA989909367e", - "accountsSwapRouter": "0x962cc5c05200b277Fb956096e8fc54E3CC4c3209", - "accountsUpdate": "0xc0cF17F786CacA1eC3a2987dbF6D52268b5c1eDF", - "accountsUpdateEndowments": "0xAEBEAB403Fc056701C6B07a14CE08f06D5DD5a72", - "accountsUpdateEndowmentSettingsController": "0xdF7e6f2144f8D933dE22d9c8ba21936e8dD30011", - "accountsUpdateStatusEndowments": "0x1f18bfBA95AA3b6A6872fFd77491a27f5BD73Bb9", - "diamondCutFacet": "0x2A8f0893A534983c63e4F52E39dDf3527b130768", - "diamondInit": "0x738337615Bfc3263812FfaAc977cA6b46bE77E80", - "diamondLoupeFacet": "0x11E1952322b142f2bE78f8830a2a5Af935258aD9", - "ownershipFacet": "0x52E2657Ab33B5A540D277737374d72CfB75c8D98" + "accountsDepositWithdrawEndowments": "0x486b1C056AC365dD969056C717ab8E7AEd59a178", + "accountsAllowance": "0xAb3aa8BCEA9832CB18153Aa9731E989A289277f7", + "accountsCreateEndowment": "0xb463AFC0b3A499a2D826155fc6E6E73061BEF826", + "accountsGasManager": "0x53557e97deED0DdEEf2404a6A29A415e379051bb", + "accountsQueryEndowments": "0xbF6b148a440acAb936796ad40947C0C33C78639A", + "accountsStrategy": "0xA8b73E610095A61de646eD06334c61b94318df52", + "accountsSwapRouter": "0xacE2a31e8B8d66C24DAea008d1eDaf571369A728", + "accountsUpdate": "0x45CCb6251F3500c7EE3219eE47C213fB239346cB", + "accountsUpdateEndowments": "0x33F76554d1474061482Bfa858f35AFD9BAb4D1C5", + "accountsUpdateEndowmentSettingsController": "0x053d1190081dC68ED544D5A2788878E823F64a69", + "accountsUpdateStatusEndowments": "0x03Bb663AccB9FD14aD3c37B2D66B025bbd4Fc533", + "diamondCutFacet": "0x42f293b5D45C0a949639EE229E4c9acD51DF904D", + "diamondInit": "0x730EEB14F27B5D6132b9BF7D62eF877D89600F55", + "diamondLoupeFacet": "0x22a1B036322472baC663A4d741d87829c30b8E4e", + "ownershipFacet": "0x658E94B5FfBDe68b99203BBbBAef618D36862766" } }, "axelar": { - "gasService": "0x7a0f853900040d5b131342018EAb9453723d9dcc", - "gateway": "0x79AF01164e25B9c6Ff828A5f795CFA62A635CFC3" + "gasService": "0x2e3c2536E1349e0E18d057f61499Ef64BB4B23E8", + "gateway": "0x3F1E0C7b13fb5b616EADFA8fbcC439B207aD960c" }, "fundraising": { "implementation": "", "proxy": "" }, "gasFwd": { - "factory": "0x309F249c3aBE5B794199844b31CcBF946e514E14", - "implementation": "0xe0061c9850Bb89Ed46DA27C752697A3A800A0c7C" + "factory": "0xB4B13f54690D297b73291456e027b33aA303f744", + "implementation": "0xbc6Fe0a018266F9F02C0E21cb21388cf1D09a560" }, "giftcards": { "implementation": "", @@ -354,51 +354,51 @@ } }, "indexFund": { - "implementation": "0xD81fBBD072E14A0e87Fb0C832F62Ae1134C79571", - "proxy": "0x660Af60D9fc671eA77F49f3Eb82f5639afeb9C26" + "implementation": "0x9ed0fC3ba80c2c3B443b3dc51597245F840d9D5C", + "proxy": "0x5C680949386aCD7c85FBC6f56413936f091e3f47" }, "multiSig": { "charityApplications": { - "implementation": "0xa4341A6Dc7267D6226FAEf9C35Af3cfAd46b624E", - "proxy": "0x96ca668AEecf5A515d402fE1Ca0C5B664Dfc92d2" + "implementation": "0xBe3865948ba88f479Ca05265E9B59869d99552de", + "proxy": "0x3ab0ADa0d1De810cc6845B7433134554D98Ff39f" }, "apTeam": { - "implementation": "0xBfA2d241f8f2ecaeA58A7D60E2a358f851D5c1b1", - "proxy": "0x6843cd0Ccc776EA0FE7E26e6527C925F06dDD76C" + "implementation": "0x5602bAF3002df39FbAA568C0657bBBBB8e84527a", + "proxy": "0x7E891709346B193ff9f37Eb739C8a294B2395Ba6" }, "endowment": { "emitter": { - "implementation": "0x1470764dcEe1b28fbe89F439d575469fcC6DD366", - "proxy": "0x58b30db36480e15B582078C9260E45bAB77b2D0E" + "implementation": "0x4CfBB8659d6BA2cA8af8c1857b4CE11a88A4B29E", + "proxy": "0xd9Ee17555a04f2E34ea43528628582AC45A6E984" }, - "factory": "0x0C28aAB755c2Ce2c182B9abCdbF482f5C63970E3", - "implementation": "0xe22e0DCa96ef125891C6bbe9f40A74EFF5fd6994" + "factory": "0x790094B9fdC8C8a83507f7Eb275DEe903Ffd71eD", + "implementation": "0x562EcE7daE572a5352D50562C472CBd41402F310" }, - "proxyAdmin": "0x0d60924d99B5C75Ce8A6698b44Fa864fdC84A2C9" + "proxyAdmin": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE" }, "registrar": { - "implementation": "0x83316cc707f2DE80D7e90a9c48DA3D424FD5bE99", - "proxy": "0x243f0Fd94F12dEB0a8B73deEA25138479ee7E4aA" + "implementation": "0x1BE9451496bfB6aDcFfbc308b673018a8972AFFE", + "proxy": "0x2e3c2536E1349e0E18d057f61499Ef64BB4B23E8" }, "router": { - "implementation": "0x84efD60753f006DE6878C7139675b110Da654459", - "proxy": "0x38f05a857a1D4FE6eB712A794a63C61D2b282b30" + "implementation": "0x3539f918A787529732465a4ccb89A96FFfb33073", + "proxy": "0x801E1B78732dbEC5B8ACc3EcD24031B4e32aD341" }, "tokens": { "dai": "", "halo": "", "reserveToken": "", - "seedAsset": "0xC79662B65F21A222EE95d22557664C3BE14Ec0FE", - "usdc": "0x6eB34f65AcC0dd09C3AA72C3C4bA08578a4A3F96", - "wmatic": "0xC4Af9B066983f55852a2796A7485ccE748392566" + "seedAsset": "0x3539f918A787529732465a4ccb89A96FFfb33073", + "usdc": "0xF1d39847cF628e812901dFFEA4DA49cDC1c4DAa9", + "wmatic": "0x5F349EB2b67Ece807aCa8DE701B1F0954f8AB44e" }, "uniswap": { "factory": "0x40B5D836dBeAf26c652210D8f07169B99E77C994", "swapRouter": "0x40B5D836dBeAf26c652210D8f07169B99E77C994" }, "vaultEmitter": { - "implementation": "0xAFE593B5005232dEDA257c1Ffe8bAD25423A60eA", - "proxy": "0xE592B0Cb837c2a227a92D5D34386b73Ca6EA8714" + "implementation": "0x402e14f3f9118A3745d8554EC4106450fB91aE23", + "proxy": "0x7Eb691CaD47e698642Ac507aC0383d8Ef1A20C7D" } }, "80001": {