From 2b3696371956609a714b88f031dff66e9b3df66e Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 26 Dec 2024 18:28:42 -0500 Subject: [PATCH 01/34] Split safes and tokens to separate environments (staging and prod). Add pzEth getter --- .../config/environments/mainnet3/owners.ts | 87 +++++++----- .../configGetters/getRenzoPZETHWarpConfig.ts | 133 +++++++++++++++--- .../environments/mainnet3/warp/warpIds.ts | 1 + typescript/infra/config/warp.ts | 7 +- .../infra/scripts/safes/delete-pending-txs.ts | 2 +- typescript/infra/scripts/safes/delete-tx.ts | 2 +- .../infra/scripts/safes/get-pending-txs.ts | 10 +- .../infra/src/tx/govern-transaction-reader.ts | 4 +- 8 files changed, 183 insertions(+), 63 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/owners.ts b/typescript/infra/config/environments/mainnet3/owners.ts index 01fe1e84b5..4cfd61ff9c 100644 --- a/typescript/infra/config/environments/mainnet3/owners.ts +++ b/typescript/infra/config/environments/mainnet3/owners.ts @@ -23,40 +23,55 @@ export function localAccountRouters(): ChainMap
{ ); } -export const safes: ChainMap
= { - mantapacific: '0x03ed2D65f2742193CeD99D48EbF1F1D6F12345B6', // does not have a UI - celo: '0x879038d6Fc9F6D5e2BA73188bd078486d77e1156', - ethereum: '0x3965AC3D295641E452E0ea896a086A9cD7C6C5b6', - avalanche: '0x5bE94B17112B8F18eA9Ac8e559377B467556a3c3', - polygon: '0xf9cFD440CfBCfAB8473cc156485B7eE753b2913E', - bsc: '0x7bB2ADeDdC342ffb611dDC073095cc4B8C547170', - arbitrum: '0x03fD5BE9DF85F0017dC7F4DC3068dDF64fffF25e', - optimism: '0xbd7db3821806bc72D223F0AE521Bf82FcBd6Ef4d', - moonbeam: '0x594203849E52BF6ee0E511cD807Ca2D658893e37', - gnosis: '0x0Ac72fBc82c9c39F81242229631dfC38aA13031B', - inevm: '0x77F3863ea99F2360D84d4BA1A2E441857D0357fa', // caldera + injective - base: '0x3949eD0CD036D9FF662d97BD7aC1686051c4aeBF', - scroll: '0x6EeEbB9F7FB18DD5E59F82658c59B846715eD4F7', - polygonzkevm: '0x1610f578D4d77Fc4ae7ce2DD9AA0b98A5Cd0a9b2', - // injective: 'inj1632x8j35kenryam3mkrsez064sqg2y2fr0frzt', - // solana: 'EzppBFV2taxWw8kEjxNYvby6q7W1biJEqwP3iC7YgRe3', - blast: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - linea: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - mode: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - ancient8: '0xD2BFA0F0654E3f2139b8cDC56c32eeC54D32b133', - taiko: '0xa4864301d3fa2a3e68256309F9F0F570270a1BD0', - fraxtal: '0x66e9f52800E9F89F0569fddc594Acd5EE609f762', - sei: '0xCed197FBc360C26C19889745Cf73511b71D03d5D', - redstone: '0xa1a50ff5FD859558E1899fEC5C3064483177FA23', - mantle: '0x8aFE6EECc6CcB02aA20DA8Fff7d29aadEBbc2DCd', - bob: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', - zetachain: '0x9d399876522Fc5C044D048594de399A2349d6026', - zoramainnet: '0xF87018025575552889062De4b05bBC3DAe35Cd96', - fusemainnet: '0x29a526227CB864C90Cf078d03872da913B473139', - endurance: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - zircuit: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', - zeronetwork: '0xCB21F61A3c8139F18e635d45aD1e62A4A61d2c3D', - swell: '0x5F7771EA40546e2932754C263455Cb0023a55ca7', +export const safes: Record<'staging' | 'prod', ChainMap
> = { + staging: { + ethereum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + bsc: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + blast: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + linea: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + mode: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + fraxtal: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + zircuit: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + }, + prod: { + mantapacific: '0x03ed2D65f2742193CeD99D48EbF1F1D6F12345B6', // does not have a UI + celo: '0x879038d6Fc9F6D5e2BA73188bd078486d77e1156', + ethereum: '0x3965AC3D295641E452E0ea896a086A9cD7C6C5b6', + avalanche: '0x5bE94B17112B8F18eA9Ac8e559377B467556a3c3', + polygon: '0xf9cFD440CfBCfAB8473cc156485B7eE753b2913E', + bsc: '0x7bB2ADeDdC342ffb611dDC073095cc4B8C547170', + arbitrum: '0x03fD5BE9DF85F0017dC7F4DC3068dDF64fffF25e', + optimism: '0xbd7db3821806bc72D223F0AE521Bf82FcBd6Ef4d', + moonbeam: '0x594203849E52BF6ee0E511cD807Ca2D658893e37', + gnosis: '0x0Ac72fBc82c9c39F81242229631dfC38aA13031B', + inevm: '0x77F3863ea99F2360D84d4BA1A2E441857D0357fa', // caldera + injective + base: '0x3949eD0CD036D9FF662d97BD7aC1686051c4aeBF', + scroll: '0x6EeEbB9F7FB18DD5E59F82658c59B846715eD4F7', + polygonzkevm: '0x1610f578D4d77Fc4ae7ce2DD9AA0b98A5Cd0a9b2', + // injective: 'inj1632x8j35kenryam3mkrsez064sqg2y2fr0frzt', + // solana: 'EzppBFV2taxWw8kEjxNYvby6q7W1biJEqwP3iC7YgRe3', + blast: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + linea: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + mode: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + ancient8: '0xD2BFA0F0654E3f2139b8cDC56c32eeC54D32b133', + taiko: '0xa4864301d3fa2a3e68256309F9F0F570270a1BD0', + fraxtal: '0x66e9f52800E9F89F0569fddc594Acd5EE609f762', + sei: '0xCed197FBc360C26C19889745Cf73511b71D03d5D', + redstone: '0xa1a50ff5FD859558E1899fEC5C3064483177FA23', + mantle: '0x8aFE6EECc6CcB02aA20DA8Fff7d29aadEBbc2DCd', + bob: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', + zetachain: '0x9d399876522Fc5C044D048594de399A2349d6026', + zoramainnet: '0xF87018025575552889062De4b05bBC3DAe35Cd96', + fusemainnet: '0x29a526227CB864C90Cf078d03872da913B473139', + endurance: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + zircuit: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', + zeronetwork: '0xCB21F61A3c8139F18e635d45aD1e62A4A61d2c3D', + swell: '0x5F7771EA40546e2932754C263455Cb0023a55ca7', + }, }; export const icaOwnerChain = 'ethereum'; @@ -194,7 +209,7 @@ export const DEPLOYER = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba'; export const ethereumChainOwners: ChainMap = Object.fromEntries( ethereumChainNames.map((local) => { - const owner = icas[local] ?? safes[local] ?? DEPLOYER; + const owner = icas[local] ?? safes.prod[local] ?? DEPLOYER; return [ local, @@ -209,7 +224,7 @@ export const ethereumChainOwners: ChainMap = Object.fromEntries( // the checker/governor tooling does not know what type of owner it is. // So we need to keep the Safe and ICA addresses somewhere in the config // to be able to track down which addresses are SAFEs, ICAs, or standard SIGNERS. - ...(safes[local] && { _safeAddress: safes[local] }), + ...(safes.prod[local] && { _safeAddress: safes.prod[local] }), ...(icas[local] && { _icaAddress: icas[local] }), }, }, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index 6196031a8e..8523981462 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -10,6 +10,7 @@ import { assert, symmetricDifference } from '@hyperlane-xyz/utils'; import { getEnvironmentConfig } from '../../../../../scripts/core-utils.js'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; +import { safes } from '../../owners.js'; import { ezEthSafes, @@ -17,8 +18,6 @@ import { getRenzoHook, } from './getRenzoEZETHWarpConfig.js'; -const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; -const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; @@ -31,26 +30,125 @@ const pzEthValidators = { swell: ezEthValidators.swell, }; -const pzEthSafes: Record = { - ethereum: ezEthSafes.ethereum, - zircuit: ezEthSafes.zircuit, - swell: ezEthSafes.swell, -}; +export const getRenzoPZETHWarpConfig = async (): Promise< + ChainMap +> => { + const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; + const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; + + const pzEthSafes: Record = { + ethereum: ezEthSafes.ethereum, + zircuit: ezEthSafes.zircuit, + swell: ezEthSafes.swell, + }; + + const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + ethereum: { + address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', + owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + }, + zircuit: { + address: '0x8b789B4A56675240c9f0985B467752b870c75711', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + }; + + const config = getEnvironmentConfig('mainnet3'); + const multiProvider = await config.getMultiProvider(); + const registry = await getMainnet3Registry(); + + const validatorDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(pzEthValidators)), + ); + const safeDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(pzEthSafes)), + ); + if (validatorDiff.size > 0) { + throw new Error( + `chainsToDeploy !== validatorConfig, diff is ${Array.from( + validatorDiff, + ).join(', ')}`, + ); + } + if (safeDiff.size > 0) { + throw new Error( + `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join(', ')}`, + ); + } + + const tokenConfig = Object.fromEntries( + await Promise.all( + chainsToDeploy.map( + async (chain): Promise<[string, HypTokenRouterConfig]> => { + const addresses = await registry.getChainAddresses(chain); + assert(addresses, 'No addresses in Registry'); + const { mailbox } = addresses; + + const mailboxContract = Mailbox__factory.connect( + mailbox, + multiProvider.getProvider(chain), + ); + const defaultHook = await mailboxContract.defaultHook(); + const ret: [string, HypTokenRouterConfig] = [ + chain, + { + isNft: false, + type: + chain === lockboxChain + ? TokenType.XERC20Lockbox + : TokenType.XERC20, + token: chain === lockboxChain ? lockbox : xERC20, + owner: pzEthSafes[chain], + gas: warpRouteOverheadGas, + mailbox, + interchainSecurityModule: { + type: IsmType.AGGREGATION, + threshold: 2, + modules: [ + { + type: IsmType.ROUTING, + owner: pzEthSafes[chain], + domains: buildAggregationIsmConfigs( + chain, + chainsToDeploy, + pzEthValidators, + ), + }, + { + type: IsmType.FALLBACK_ROUTING, + domains: {}, + owner: pzEthSafes[chain], + }, + ], + }, + hook: getRenzoHook(defaultHook, chain), + proxyAdmin: existingProxyAdmins[chain], + }, + ]; -const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { - ethereum: { - address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', - owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', - }, - zircuit: { - address: '0x8b789B4A56675240c9f0985B467752b870c75711', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - }, + return ret; + }, + ), + ), + ); + + return tokenConfig; }; -export const getRenzoPZETHWarpConfig = async (): Promise< +export const getRenzoPZETHWarpConfigStaging = async (): Promise< ChainMap > => { + const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; + const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; + + const pzEthSafes: Record = { + ethereum: safes.staging.ethereum, + zircuit: safes.staging.zircuit, + swell: safes.staging.swell, + }; + const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -122,7 +220,6 @@ export const getRenzoPZETHWarpConfig = async (): Promise< ], }, hook: getRenzoHook(defaultHook, chain), - proxyAdmin: existingProxyAdmins[chain], }, ]; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 1cd98d1c8d..ac1526ae41 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -29,6 +29,7 @@ export enum WarpRouteIds { EthereumVictionUSDC = 'USDC/ethereum-viction', EthereumVictionUSDT = 'USDT/ethereum-viction', EthereumSwellZircuitPZETH = 'PZETH/ethereum-swell-zircuit', + EthereumSwellZircuitPZETHStaging = 'PZETH/ethereum-swell-zircuit-staging', EthereumBscLumiaLUMIA = 'LUMIA/bsc-ethereum-lumia', EthereumZircuitRe7LRT = 'Re7LRT/ethereum-zircuit', InevmInjectiveINJ = 'INJ/inevm-injective', diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index d87a010be1..9202b1ad2a 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -41,7 +41,10 @@ import { getEthereumZircuitRe7LRTWarpConfig } from './environments/mainnet3/warp import { getInevmInjectiveINJWarpConfig } from './environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.js'; import { getMantapacificNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.js'; import { getRenzoEZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; -import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; +import { + getRenzoPZETHWarpConfig, + getRenzoPZETHWarpConfigStaging, +} from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; type WarpConfigGetter = ( @@ -67,6 +70,8 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig, [WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig, [WarpRouteIds.EthereumSwellZircuitPZETH]: getRenzoPZETHWarpConfig, + [WarpRouteIds.EthereumSwellZircuitPZETHStaging]: + getRenzoPZETHWarpConfigStaging, [WarpRouteIds.EthereumBscLumiaLUMIA]: getEthereumBscLUMIAWarpConfig, [WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig, [WarpRouteIds.EclipseEthereumApxEth]: getEclipseEthereumApxEthWarpConfig, diff --git a/typescript/infra/scripts/safes/delete-pending-txs.ts b/typescript/infra/scripts/safes/delete-pending-txs.ts index 8fe9187a58..4534b0d64a 100644 --- a/typescript/infra/scripts/safes/delete-pending-txs.ts +++ b/typescript/infra/scripts/safes/delete-pending-txs.ts @@ -25,7 +25,7 @@ async function main() { for (const chain of chains) { try { - await deleteAllPendingSafeTxs(chain, multiProvider, safes[chain]); + await deleteAllPendingSafeTxs(chain, multiProvider, safes.prod[chain]); } catch (error) { console.error(`Error deleting pending transactions for ${chain}:`, error); } diff --git a/typescript/infra/scripts/safes/delete-tx.ts b/typescript/infra/scripts/safes/delete-tx.ts index bca35efcbe..712d292f09 100644 --- a/typescript/infra/scripts/safes/delete-tx.ts +++ b/typescript/infra/scripts/safes/delete-tx.ts @@ -36,7 +36,7 @@ async function main() { for (const chain of chains) { try { - await deleteSafeTx(chain, multiProvider, safes[chain], tx); + await deleteSafeTx(chain, multiProvider, safes.prod[chain], tx); } catch (error) { console.error(`Error deleting transaction ${tx} for ${chain}:`, error); } diff --git a/typescript/infra/scripts/safes/get-pending-txs.ts b/typescript/infra/scripts/safes/get-pending-txs.ts index 13d8c15d88..9a1a898f7a 100644 --- a/typescript/infra/scripts/safes/get-pending-txs.ts +++ b/typescript/infra/scripts/safes/get-pending-txs.ts @@ -39,7 +39,7 @@ export async function getPendingTxsForChains( const txs: SafeStatus[] = []; await Promise.all( chains.map(async (chain) => { - if (!safes[chain]) { + if (!safes.prod[chain]) { console.error(chalk.red.bold(`No safe found for ${chain}`)); return; } @@ -58,7 +58,7 @@ export async function getPendingTxsForChains( ({ safeSdk, safeService } = await getSafeAndService( chain, multiProvider, - safes[chain], + safes.prod[chain], )); } catch (error) { console.warn( @@ -70,7 +70,9 @@ export async function getPendingTxsForChains( } const threshold = await safeSdk.getThreshold(); - const pendingTxs = await safeService.getPendingTransactions(safes[chain]); + const pendingTxs = await safeService.getPendingTransactions( + safes.prod[chain], + ); if (pendingTxs.results.length === 0) { return; } @@ -194,7 +196,7 @@ async function main() { await executeTx( tx.chain, multiProvider, - safes[tx.chain], + safes.prod[tx.chain], tx.fullTxHash, ); } catch (error) { diff --git a/typescript/infra/src/tx/govern-transaction-reader.ts b/typescript/infra/src/tx/govern-transaction-reader.ts index ef82ab1e1a..c27a8504bb 100644 --- a/typescript/infra/src/tx/govern-transaction-reader.ts +++ b/typescript/infra/src/tx/govern-transaction-reader.ts @@ -542,7 +542,7 @@ export class GovernTransactionReader { this.chainAddresses, this.multiProvider, ).getAccount(remoteChainName, { - owner: safes[icaOwnerChain], + owner: safes.prod[icaOwnerChain], origin: icaOwnerChain, routerOverride: router, ismOverride: ism, @@ -679,7 +679,7 @@ export class GovernTransactionReader { return this.multiSendCallOnlyAddressCache[chain]; } - const safe = safes[chain]; + const safe = safes.prod[chain]; if (!safe) { return undefined; } From 0f9578af28b4003493bd57e9a208d2bed6df80af Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:27:26 -0500 Subject: [PATCH 02/34] Revert "Split safes and tokens to separate environments (staging and prod). Add pzEth getter" This reverts commit 2b3696371956609a714b88f031dff66e9b3df66e. --- .../config/environments/mainnet3/owners.ts | 87 +++++------- .../configGetters/getRenzoPZETHWarpConfig.ts | 133 +++--------------- .../environments/mainnet3/warp/warpIds.ts | 1 - typescript/infra/config/warp.ts | 7 +- .../infra/scripts/safes/delete-pending-txs.ts | 2 +- typescript/infra/scripts/safes/delete-tx.ts | 2 +- .../infra/scripts/safes/get-pending-txs.ts | 10 +- .../infra/src/tx/govern-transaction-reader.ts | 4 +- 8 files changed, 63 insertions(+), 183 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/owners.ts b/typescript/infra/config/environments/mainnet3/owners.ts index 4cfd61ff9c..01fe1e84b5 100644 --- a/typescript/infra/config/environments/mainnet3/owners.ts +++ b/typescript/infra/config/environments/mainnet3/owners.ts @@ -23,55 +23,40 @@ export function localAccountRouters(): ChainMap
{ ); } -export const safes: Record<'staging' | 'prod', ChainMap
> = { - staging: { - ethereum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - bsc: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - blast: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - linea: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - mode: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - fraxtal: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - zircuit: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - }, - prod: { - mantapacific: '0x03ed2D65f2742193CeD99D48EbF1F1D6F12345B6', // does not have a UI - celo: '0x879038d6Fc9F6D5e2BA73188bd078486d77e1156', - ethereum: '0x3965AC3D295641E452E0ea896a086A9cD7C6C5b6', - avalanche: '0x5bE94B17112B8F18eA9Ac8e559377B467556a3c3', - polygon: '0xf9cFD440CfBCfAB8473cc156485B7eE753b2913E', - bsc: '0x7bB2ADeDdC342ffb611dDC073095cc4B8C547170', - arbitrum: '0x03fD5BE9DF85F0017dC7F4DC3068dDF64fffF25e', - optimism: '0xbd7db3821806bc72D223F0AE521Bf82FcBd6Ef4d', - moonbeam: '0x594203849E52BF6ee0E511cD807Ca2D658893e37', - gnosis: '0x0Ac72fBc82c9c39F81242229631dfC38aA13031B', - inevm: '0x77F3863ea99F2360D84d4BA1A2E441857D0357fa', // caldera + injective - base: '0x3949eD0CD036D9FF662d97BD7aC1686051c4aeBF', - scroll: '0x6EeEbB9F7FB18DD5E59F82658c59B846715eD4F7', - polygonzkevm: '0x1610f578D4d77Fc4ae7ce2DD9AA0b98A5Cd0a9b2', - // injective: 'inj1632x8j35kenryam3mkrsez064sqg2y2fr0frzt', - // solana: 'EzppBFV2taxWw8kEjxNYvby6q7W1biJEqwP3iC7YgRe3', - blast: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - linea: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - mode: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - ancient8: '0xD2BFA0F0654E3f2139b8cDC56c32eeC54D32b133', - taiko: '0xa4864301d3fa2a3e68256309F9F0F570270a1BD0', - fraxtal: '0x66e9f52800E9F89F0569fddc594Acd5EE609f762', - sei: '0xCed197FBc360C26C19889745Cf73511b71D03d5D', - redstone: '0xa1a50ff5FD859558E1899fEC5C3064483177FA23', - mantle: '0x8aFE6EECc6CcB02aA20DA8Fff7d29aadEBbc2DCd', - bob: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', - zetachain: '0x9d399876522Fc5C044D048594de399A2349d6026', - zoramainnet: '0xF87018025575552889062De4b05bBC3DAe35Cd96', - fusemainnet: '0x29a526227CB864C90Cf078d03872da913B473139', - endurance: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', - zircuit: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', - zeronetwork: '0xCB21F61A3c8139F18e635d45aD1e62A4A61d2c3D', - swell: '0x5F7771EA40546e2932754C263455Cb0023a55ca7', - }, +export const safes: ChainMap
= { + mantapacific: '0x03ed2D65f2742193CeD99D48EbF1F1D6F12345B6', // does not have a UI + celo: '0x879038d6Fc9F6D5e2BA73188bd078486d77e1156', + ethereum: '0x3965AC3D295641E452E0ea896a086A9cD7C6C5b6', + avalanche: '0x5bE94B17112B8F18eA9Ac8e559377B467556a3c3', + polygon: '0xf9cFD440CfBCfAB8473cc156485B7eE753b2913E', + bsc: '0x7bB2ADeDdC342ffb611dDC073095cc4B8C547170', + arbitrum: '0x03fD5BE9DF85F0017dC7F4DC3068dDF64fffF25e', + optimism: '0xbd7db3821806bc72D223F0AE521Bf82FcBd6Ef4d', + moonbeam: '0x594203849E52BF6ee0E511cD807Ca2D658893e37', + gnosis: '0x0Ac72fBc82c9c39F81242229631dfC38aA13031B', + inevm: '0x77F3863ea99F2360D84d4BA1A2E441857D0357fa', // caldera + injective + base: '0x3949eD0CD036D9FF662d97BD7aC1686051c4aeBF', + scroll: '0x6EeEbB9F7FB18DD5E59F82658c59B846715eD4F7', + polygonzkevm: '0x1610f578D4d77Fc4ae7ce2DD9AA0b98A5Cd0a9b2', + // injective: 'inj1632x8j35kenryam3mkrsez064sqg2y2fr0frzt', + // solana: 'EzppBFV2taxWw8kEjxNYvby6q7W1biJEqwP3iC7YgRe3', + blast: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + linea: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + mode: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + ancient8: '0xD2BFA0F0654E3f2139b8cDC56c32eeC54D32b133', + taiko: '0xa4864301d3fa2a3e68256309F9F0F570270a1BD0', + fraxtal: '0x66e9f52800E9F89F0569fddc594Acd5EE609f762', + sei: '0xCed197FBc360C26C19889745Cf73511b71D03d5D', + redstone: '0xa1a50ff5FD859558E1899fEC5C3064483177FA23', + mantle: '0x8aFE6EECc6CcB02aA20DA8Fff7d29aadEBbc2DCd', + bob: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', + zetachain: '0x9d399876522Fc5C044D048594de399A2349d6026', + zoramainnet: '0xF87018025575552889062De4b05bBC3DAe35Cd96', + fusemainnet: '0x29a526227CB864C90Cf078d03872da913B473139', + endurance: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', + zircuit: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', + zeronetwork: '0xCB21F61A3c8139F18e635d45aD1e62A4A61d2c3D', + swell: '0x5F7771EA40546e2932754C263455Cb0023a55ca7', }; export const icaOwnerChain = 'ethereum'; @@ -209,7 +194,7 @@ export const DEPLOYER = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba'; export const ethereumChainOwners: ChainMap = Object.fromEntries( ethereumChainNames.map((local) => { - const owner = icas[local] ?? safes.prod[local] ?? DEPLOYER; + const owner = icas[local] ?? safes[local] ?? DEPLOYER; return [ local, @@ -224,7 +209,7 @@ export const ethereumChainOwners: ChainMap = Object.fromEntries( // the checker/governor tooling does not know what type of owner it is. // So we need to keep the Safe and ICA addresses somewhere in the config // to be able to track down which addresses are SAFEs, ICAs, or standard SIGNERS. - ...(safes.prod[local] && { _safeAddress: safes.prod[local] }), + ...(safes[local] && { _safeAddress: safes[local] }), ...(icas[local] && { _icaAddress: icas[local] }), }, }, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index 8523981462..6196031a8e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -10,7 +10,6 @@ import { assert, symmetricDifference } from '@hyperlane-xyz/utils'; import { getEnvironmentConfig } from '../../../../../scripts/core-utils.js'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; -import { safes } from '../../owners.js'; import { ezEthSafes, @@ -18,6 +17,8 @@ import { getRenzoHook, } from './getRenzoEZETHWarpConfig.js'; +const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; +const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; @@ -30,125 +31,26 @@ const pzEthValidators = { swell: ezEthValidators.swell, }; -export const getRenzoPZETHWarpConfig = async (): Promise< - ChainMap -> => { - const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; - const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; - - const pzEthSafes: Record = { - ethereum: ezEthSafes.ethereum, - zircuit: ezEthSafes.zircuit, - swell: ezEthSafes.swell, - }; - - const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { - ethereum: { - address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', - owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', - }, - zircuit: { - address: '0x8b789B4A56675240c9f0985B467752b870c75711', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - }, - }; - - const config = getEnvironmentConfig('mainnet3'); - const multiProvider = await config.getMultiProvider(); - const registry = await getMainnet3Registry(); - - const validatorDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(pzEthValidators)), - ); - const safeDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(pzEthSafes)), - ); - if (validatorDiff.size > 0) { - throw new Error( - `chainsToDeploy !== validatorConfig, diff is ${Array.from( - validatorDiff, - ).join(', ')}`, - ); - } - if (safeDiff.size > 0) { - throw new Error( - `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join(', ')}`, - ); - } - - const tokenConfig = Object.fromEntries( - await Promise.all( - chainsToDeploy.map( - async (chain): Promise<[string, HypTokenRouterConfig]> => { - const addresses = await registry.getChainAddresses(chain); - assert(addresses, 'No addresses in Registry'); - const { mailbox } = addresses; - - const mailboxContract = Mailbox__factory.connect( - mailbox, - multiProvider.getProvider(chain), - ); - const defaultHook = await mailboxContract.defaultHook(); - const ret: [string, HypTokenRouterConfig] = [ - chain, - { - isNft: false, - type: - chain === lockboxChain - ? TokenType.XERC20Lockbox - : TokenType.XERC20, - token: chain === lockboxChain ? lockbox : xERC20, - owner: pzEthSafes[chain], - gas: warpRouteOverheadGas, - mailbox, - interchainSecurityModule: { - type: IsmType.AGGREGATION, - threshold: 2, - modules: [ - { - type: IsmType.ROUTING, - owner: pzEthSafes[chain], - domains: buildAggregationIsmConfigs( - chain, - chainsToDeploy, - pzEthValidators, - ), - }, - { - type: IsmType.FALLBACK_ROUTING, - domains: {}, - owner: pzEthSafes[chain], - }, - ], - }, - hook: getRenzoHook(defaultHook, chain), - proxyAdmin: existingProxyAdmins[chain], - }, - ]; - - return ret; - }, - ), - ), - ); +const pzEthSafes: Record = { + ethereum: ezEthSafes.ethereum, + zircuit: ezEthSafes.zircuit, + swell: ezEthSafes.swell, +}; - return tokenConfig; +const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + ethereum: { + address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', + owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + }, + zircuit: { + address: '0x8b789B4A56675240c9f0985B467752b870c75711', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, }; -export const getRenzoPZETHWarpConfigStaging = async (): Promise< +export const getRenzoPZETHWarpConfig = async (): Promise< ChainMap > => { - const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; - const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; - - const pzEthSafes: Record = { - ethereum: safes.staging.ethereum, - zircuit: safes.staging.zircuit, - swell: safes.staging.swell, - }; - const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -220,6 +122,7 @@ export const getRenzoPZETHWarpConfigStaging = async (): Promise< ], }, hook: getRenzoHook(defaultHook, chain), + proxyAdmin: existingProxyAdmins[chain], }, ]; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index ac1526ae41..1cd98d1c8d 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -29,7 +29,6 @@ export enum WarpRouteIds { EthereumVictionUSDC = 'USDC/ethereum-viction', EthereumVictionUSDT = 'USDT/ethereum-viction', EthereumSwellZircuitPZETH = 'PZETH/ethereum-swell-zircuit', - EthereumSwellZircuitPZETHStaging = 'PZETH/ethereum-swell-zircuit-staging', EthereumBscLumiaLUMIA = 'LUMIA/bsc-ethereum-lumia', EthereumZircuitRe7LRT = 'Re7LRT/ethereum-zircuit', InevmInjectiveINJ = 'INJ/inevm-injective', diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 9202b1ad2a..d87a010be1 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -41,10 +41,7 @@ import { getEthereumZircuitRe7LRTWarpConfig } from './environments/mainnet3/warp import { getInevmInjectiveINJWarpConfig } from './environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.js'; import { getMantapacificNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.js'; import { getRenzoEZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; -import { - getRenzoPZETHWarpConfig, - getRenzoPZETHWarpConfigStaging, -} from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; +import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; type WarpConfigGetter = ( @@ -70,8 +67,6 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig, [WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig, [WarpRouteIds.EthereumSwellZircuitPZETH]: getRenzoPZETHWarpConfig, - [WarpRouteIds.EthereumSwellZircuitPZETHStaging]: - getRenzoPZETHWarpConfigStaging, [WarpRouteIds.EthereumBscLumiaLUMIA]: getEthereumBscLUMIAWarpConfig, [WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig, [WarpRouteIds.EclipseEthereumApxEth]: getEclipseEthereumApxEthWarpConfig, diff --git a/typescript/infra/scripts/safes/delete-pending-txs.ts b/typescript/infra/scripts/safes/delete-pending-txs.ts index 4534b0d64a..8fe9187a58 100644 --- a/typescript/infra/scripts/safes/delete-pending-txs.ts +++ b/typescript/infra/scripts/safes/delete-pending-txs.ts @@ -25,7 +25,7 @@ async function main() { for (const chain of chains) { try { - await deleteAllPendingSafeTxs(chain, multiProvider, safes.prod[chain]); + await deleteAllPendingSafeTxs(chain, multiProvider, safes[chain]); } catch (error) { console.error(`Error deleting pending transactions for ${chain}:`, error); } diff --git a/typescript/infra/scripts/safes/delete-tx.ts b/typescript/infra/scripts/safes/delete-tx.ts index 712d292f09..bca35efcbe 100644 --- a/typescript/infra/scripts/safes/delete-tx.ts +++ b/typescript/infra/scripts/safes/delete-tx.ts @@ -36,7 +36,7 @@ async function main() { for (const chain of chains) { try { - await deleteSafeTx(chain, multiProvider, safes.prod[chain], tx); + await deleteSafeTx(chain, multiProvider, safes[chain], tx); } catch (error) { console.error(`Error deleting transaction ${tx} for ${chain}:`, error); } diff --git a/typescript/infra/scripts/safes/get-pending-txs.ts b/typescript/infra/scripts/safes/get-pending-txs.ts index 9a1a898f7a..13d8c15d88 100644 --- a/typescript/infra/scripts/safes/get-pending-txs.ts +++ b/typescript/infra/scripts/safes/get-pending-txs.ts @@ -39,7 +39,7 @@ export async function getPendingTxsForChains( const txs: SafeStatus[] = []; await Promise.all( chains.map(async (chain) => { - if (!safes.prod[chain]) { + if (!safes[chain]) { console.error(chalk.red.bold(`No safe found for ${chain}`)); return; } @@ -58,7 +58,7 @@ export async function getPendingTxsForChains( ({ safeSdk, safeService } = await getSafeAndService( chain, multiProvider, - safes.prod[chain], + safes[chain], )); } catch (error) { console.warn( @@ -70,9 +70,7 @@ export async function getPendingTxsForChains( } const threshold = await safeSdk.getThreshold(); - const pendingTxs = await safeService.getPendingTransactions( - safes.prod[chain], - ); + const pendingTxs = await safeService.getPendingTransactions(safes[chain]); if (pendingTxs.results.length === 0) { return; } @@ -196,7 +194,7 @@ async function main() { await executeTx( tx.chain, multiProvider, - safes.prod[tx.chain], + safes[tx.chain], tx.fullTxHash, ); } catch (error) { diff --git a/typescript/infra/src/tx/govern-transaction-reader.ts b/typescript/infra/src/tx/govern-transaction-reader.ts index c27a8504bb..ef82ab1e1a 100644 --- a/typescript/infra/src/tx/govern-transaction-reader.ts +++ b/typescript/infra/src/tx/govern-transaction-reader.ts @@ -542,7 +542,7 @@ export class GovernTransactionReader { this.chainAddresses, this.multiProvider, ).getAccount(remoteChainName, { - owner: safes.prod[icaOwnerChain], + owner: safes[icaOwnerChain], origin: icaOwnerChain, routerOverride: router, ismOverride: ism, @@ -679,7 +679,7 @@ export class GovernTransactionReader { return this.multiSendCallOnlyAddressCache[chain]; } - const safe = safes.prod[chain]; + const safe = safes[chain]; if (!safe) { return undefined; } From 4a378589bd07ec044cd9348c344e3f6057f3ec1d Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:31:01 -0500 Subject: [PATCH 03/34] Move staging safes --- .../configGetters/getRenzoPZETHWarpConfig.ts | 148 +++++++++++++++--- 1 file changed, 130 insertions(+), 18 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index 6196031a8e..b24324949b 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -10,6 +10,7 @@ import { assert, symmetricDifference } from '@hyperlane-xyz/utils'; import { getEnvironmentConfig } from '../../../../../scripts/core-utils.js'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; +import { safes } from '../../owners.js'; import { ezEthSafes, @@ -17,8 +18,6 @@ import { getRenzoHook, } from './getRenzoEZETHWarpConfig.js'; -const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; -const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; @@ -31,26 +30,140 @@ const pzEthValidators = { swell: ezEthValidators.swell, }; -const pzEthSafes: Record = { - ethereum: ezEthSafes.ethereum, - zircuit: ezEthSafes.zircuit, - swell: ezEthSafes.swell, -}; +export const getRenzoPZETHWarpConfig = async (): Promise< + ChainMap +> => { + const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; + const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; + + const pzEthSafes: Record = { + ethereum: ezEthSafes.ethereum, + zircuit: ezEthSafes.zircuit, + swell: ezEthSafes.swell, + }; + + const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + ethereum: { + address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', + owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + }, + zircuit: { + address: '0x8b789B4A56675240c9f0985B467752b870c75711', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + }; -const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { - ethereum: { - address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', - owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', - }, - zircuit: { - address: '0x8b789B4A56675240c9f0985B467752b870c75711', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - }, + const config = getEnvironmentConfig('mainnet3'); + const multiProvider = await config.getMultiProvider(); + const registry = await getMainnet3Registry(); + + const validatorDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(pzEthValidators)), + ); + const safeDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(pzEthSafes)), + ); + if (validatorDiff.size > 0) { + throw new Error( + `chainsToDeploy !== validatorConfig, diff is ${Array.from( + validatorDiff, + ).join(', ')}`, + ); + } + if (safeDiff.size > 0) { + throw new Error( + `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join(', ')}`, + ); + } + + const tokenConfig = Object.fromEntries( + await Promise.all( + chainsToDeploy.map( + async (chain): Promise<[string, HypTokenRouterConfig]> => { + const addresses = await registry.getChainAddresses(chain); + assert(addresses, 'No addresses in Registry'); + const { mailbox } = addresses; + + const mailboxContract = Mailbox__factory.connect( + mailbox, + multiProvider.getProvider(chain), + ); + const defaultHook = await mailboxContract.defaultHook(); + const ret: [string, HypTokenRouterConfig] = [ + chain, + { + isNft: false, + type: + chain === lockboxChain + ? TokenType.XERC20Lockbox + : TokenType.XERC20, + token: chain === lockboxChain ? lockbox : xERC20, + owner: pzEthSafes[chain], + gas: warpRouteOverheadGas, + mailbox, + interchainSecurityModule: { + type: IsmType.AGGREGATION, + threshold: 2, + modules: [ + { + type: IsmType.ROUTING, + owner: pzEthSafes[chain], + domains: buildAggregationIsmConfigs( + chain, + chainsToDeploy, + pzEthValidators, + ), + }, + { + type: IsmType.FALLBACK_ROUTING, + domains: {}, + owner: pzEthSafes[chain], + }, + ], + }, + hook: getRenzoHook(defaultHook, chain), + proxyAdmin: existingProxyAdmins[chain], + }, + ]; + + return ret; + }, + ), + ), + ); + + return tokenConfig; }; -export const getRenzoPZETHWarpConfig = async (): Promise< +export const getRenzoPZETHWarpConfigStaging = async (): Promise< ChainMap > => { + const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; // TODO + const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; // TODO + + // TODO DEPLOY REAL ONES + const stagingSafes = { + ethereum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + bsc: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + blast: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + linea: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + mode: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + fraxtal: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + zircuit: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + }; + + const pzEthSafes: Record = { + ethereum: stagingSafes.ethereum, + zircuit: stagingSafes.zircuit, + swell: stagingSafes.swell, + }; + const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -122,7 +235,6 @@ export const getRenzoPZETHWarpConfig = async (): Promise< ], }, hook: getRenzoHook(defaultHook, chain), - proxyAdmin: existingProxyAdmins[chain], }, ]; From a7bbd52718ed075c319e5cd61d635256c95ccda3 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:36:32 -0500 Subject: [PATCH 04/34] Revert "Move staging safes" This reverts commit 4a378589bd07ec044cd9348c344e3f6057f3ec1d. --- .../configGetters/getRenzoPZETHWarpConfig.ts | 148 +++--------------- 1 file changed, 18 insertions(+), 130 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index b24324949b..6196031a8e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -10,7 +10,6 @@ import { assert, symmetricDifference } from '@hyperlane-xyz/utils'; import { getEnvironmentConfig } from '../../../../../scripts/core-utils.js'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; -import { safes } from '../../owners.js'; import { ezEthSafes, @@ -18,6 +17,8 @@ import { getRenzoHook, } from './getRenzoEZETHWarpConfig.js'; +const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; +const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; @@ -30,140 +31,26 @@ const pzEthValidators = { swell: ezEthValidators.swell, }; -export const getRenzoPZETHWarpConfig = async (): Promise< - ChainMap -> => { - const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; - const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; - - const pzEthSafes: Record = { - ethereum: ezEthSafes.ethereum, - zircuit: ezEthSafes.zircuit, - swell: ezEthSafes.swell, - }; - - const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { - ethereum: { - address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', - owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', - }, - zircuit: { - address: '0x8b789B4A56675240c9f0985B467752b870c75711', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - }, - }; - - const config = getEnvironmentConfig('mainnet3'); - const multiProvider = await config.getMultiProvider(); - const registry = await getMainnet3Registry(); - - const validatorDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(pzEthValidators)), - ); - const safeDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(pzEthSafes)), - ); - if (validatorDiff.size > 0) { - throw new Error( - `chainsToDeploy !== validatorConfig, diff is ${Array.from( - validatorDiff, - ).join(', ')}`, - ); - } - if (safeDiff.size > 0) { - throw new Error( - `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join(', ')}`, - ); - } - - const tokenConfig = Object.fromEntries( - await Promise.all( - chainsToDeploy.map( - async (chain): Promise<[string, HypTokenRouterConfig]> => { - const addresses = await registry.getChainAddresses(chain); - assert(addresses, 'No addresses in Registry'); - const { mailbox } = addresses; - - const mailboxContract = Mailbox__factory.connect( - mailbox, - multiProvider.getProvider(chain), - ); - const defaultHook = await mailboxContract.defaultHook(); - const ret: [string, HypTokenRouterConfig] = [ - chain, - { - isNft: false, - type: - chain === lockboxChain - ? TokenType.XERC20Lockbox - : TokenType.XERC20, - token: chain === lockboxChain ? lockbox : xERC20, - owner: pzEthSafes[chain], - gas: warpRouteOverheadGas, - mailbox, - interchainSecurityModule: { - type: IsmType.AGGREGATION, - threshold: 2, - modules: [ - { - type: IsmType.ROUTING, - owner: pzEthSafes[chain], - domains: buildAggregationIsmConfigs( - chain, - chainsToDeploy, - pzEthValidators, - ), - }, - { - type: IsmType.FALLBACK_ROUTING, - domains: {}, - owner: pzEthSafes[chain], - }, - ], - }, - hook: getRenzoHook(defaultHook, chain), - proxyAdmin: existingProxyAdmins[chain], - }, - ]; - - return ret; - }, - ), - ), - ); +const pzEthSafes: Record = { + ethereum: ezEthSafes.ethereum, + zircuit: ezEthSafes.zircuit, + swell: ezEthSafes.swell, +}; - return tokenConfig; +const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + ethereum: { + address: '0x4f4671Ce69c9af15e33eB7Cf6D1358d1B39Af3bF', + owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + }, + zircuit: { + address: '0x8b789B4A56675240c9f0985B467752b870c75711', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, }; -export const getRenzoPZETHWarpConfigStaging = async (): Promise< +export const getRenzoPZETHWarpConfig = async (): Promise< ChainMap > => { - const lockbox = '0xbC5511354C4A9a50DE928F56DB01DD327c4e56d5'; // TODO - const xERC20 = '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7'; // TODO - - // TODO DEPLOY REAL ONES - const stagingSafes = { - ethereum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - bsc: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - blast: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - linea: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', - mode: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - fraxtal: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - zircuit: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', - }; - - const pzEthSafes: Record = { - ethereum: stagingSafes.ethereum, - zircuit: stagingSafes.zircuit, - swell: stagingSafes.swell, - }; - const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -235,6 +122,7 @@ export const getRenzoPZETHWarpConfigStaging = async (): Promise< ], }, hook: getRenzoHook(defaultHook, chain), + proxyAdmin: existingProxyAdmins[chain], }, ]; From e8ea44356eb77425ec2ee0cedee8160d3dc36a8d Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:03:02 -0500 Subject: [PATCH 05/34] Add getRenzoEZETHWarpConfigGenerator --- .../configGetters/getRenzoEZETHWarpConfig.ts | 182 +++++++++--------- 1 file changed, 96 insertions(+), 86 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 93ea7df1ef..e14626c5e2 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -279,100 +279,110 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; -export const getRenzoEZETHWarpConfig = async (): Promise< - ChainMap -> => { - const config = getEnvironmentConfig('mainnet3'); - const multiProvider = await config.getMultiProvider(); - const registry = await getMainnet3Registry(); +export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( + ezEthSafes, + xERC20, +); - const validatorDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(ezEthValidators)), - ); - const safeDiff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(ezEthSafes)), - ); - const xERC20Diff = symmetricDifference( - new Set(chainsToDeploy), - new Set(Object.keys(xERC20)), - ); - if (validatorDiff.size > 0) { - throw new Error( - `chainsToDeploy !== validatorConfig, diff is ${Array.from( - validatorDiff, - ).join(', ')}`, +export function getRenzoEZETHWarpConfigGenerator( + ezEthSafes: Record, + xERC20: Record<(typeof chainsToDeploy)[number], string>, +) { + return async (): Promise> => { + const config = getEnvironmentConfig('mainnet3'); + const multiProvider = await config.getMultiProvider(); + const registry = await getMainnet3Registry(); + + const validatorDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(ezEthValidators)), ); - } - if (safeDiff.size > 0) { - throw new Error( - `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join(', ')}`, + const safeDiff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(ezEthSafes)), ); - } - if (xERC20Diff.size > 0) { - throw new Error( - `chainsToDeploy !== xERC20Diff, diff is ${Array.from(xERC20Diff).join( - ', ', - )}`, + const xERC20Diff = symmetricDifference( + new Set(chainsToDeploy), + new Set(Object.keys(xERC20)), ); - } + if (validatorDiff.size > 0) { + throw new Error( + `chainsToDeploy !== validatorConfig, diff is ${Array.from( + validatorDiff, + ).join(', ')}`, + ); + } + if (safeDiff.size > 0) { + throw new Error( + `chainsToDeploy !== safeDiff, diff is ${Array.from(safeDiff).join( + ', ', + )}`, + ); + } + if (xERC20Diff.size > 0) { + throw new Error( + `chainsToDeploy !== xERC20Diff, diff is ${Array.from(xERC20Diff).join( + ', ', + )}`, + ); + } - const tokenConfig = Object.fromEntries( - await Promise.all( - chainsToDeploy.map( - async (chain): Promise<[string, HypTokenRouterConfig]> => { - const addresses = await registry.getChainAddresses(chain); - assert(addresses, 'No addresses in Registry'); - const { mailbox } = addresses; + const tokenConfig = Object.fromEntries( + await Promise.all( + chainsToDeploy.map( + async (chain): Promise<[string, HypTokenRouterConfig]> => { + const addresses = await registry.getChainAddresses(chain); + assert(addresses, 'No addresses in Registry'); + const { mailbox } = addresses; - const mailboxContract = Mailbox__factory.connect( - mailbox, - multiProvider.getProvider(chain), - ); - const defaultHook = await mailboxContract.defaultHook(); - const ret: [string, HypTokenRouterConfig] = [ - chain, - { - isNft: false, - type: - chain === lockboxChain - ? TokenType.XERC20Lockbox - : TokenType.XERC20, - token: chain === lockboxChain ? lockbox : xERC20[chain], - owner: ezEthSafes[chain], - gas: warpRouteOverheadGas, + const mailboxContract = Mailbox__factory.connect( mailbox, - interchainSecurityModule: { - type: IsmType.AGGREGATION, - threshold: 2, - modules: [ - { - type: IsmType.ROUTING, - owner: ezEthSafes[chain], - domains: buildAggregationIsmConfigs( - chain, - chainsToDeploy, - ezEthValidators, - ), - }, - { - type: IsmType.FALLBACK_ROUTING, - domains: {}, - owner: ezEthSafes[chain], - }, - ], + multiProvider.getProvider(chain), + ); + const defaultHook = await mailboxContract.defaultHook(); + const ret: [string, HypTokenRouterConfig] = [ + chain, + { + isNft: false, + type: + chain === lockboxChain + ? TokenType.XERC20Lockbox + : TokenType.XERC20, + token: chain === lockboxChain ? lockbox : xERC20[chain], + owner: ezEthSafes[chain], + gas: warpRouteOverheadGas, + mailbox, + interchainSecurityModule: { + type: IsmType.AGGREGATION, + threshold: 2, + modules: [ + { + type: IsmType.ROUTING, + owner: ezEthSafes[chain], + domains: buildAggregationIsmConfigs( + chain, + chainsToDeploy, + ezEthValidators, + ), + }, + { + type: IsmType.FALLBACK_ROUTING, + domains: {}, + owner: ezEthSafes[chain], + }, + ], + }, + hook: getRenzoHook(defaultHook, chain), + proxyAdmin: existingProxyAdmins[chain], }, - hook: getRenzoHook(defaultHook, chain), - proxyAdmin: existingProxyAdmins[chain], - }, - ]; + ]; - return ret; - }, + return ret; + }, + ), ), - ), - ); + ); - return tokenConfig; -}; + return tokenConfig; + }; +} From f46f2df02c37b302e3096b45d321ff2bef705f40 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:03:52 -0500 Subject: [PATCH 06/34] Move functions around in attempt to reduce diffs --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index e14626c5e2..5b66cfdff8 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -279,11 +279,6 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; -export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( - ezEthSafes, - xERC20, -); - export function getRenzoEZETHWarpConfigGenerator( ezEthSafes: Record, xERC20: Record<(typeof chainsToDeploy)[number], string>, @@ -386,3 +381,8 @@ export function getRenzoEZETHWarpConfigGenerator( return tokenConfig; }; } + +export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( + ezEthSafes, + xERC20, +); From 5ef2b240bbe81e7c15ea9dfc9b8f249e1f7df60d Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:05:26 -0500 Subject: [PATCH 07/34] Move functions around in attempt to reduce diffs --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 5b66cfdff8..f065217e57 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -279,11 +279,12 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; -export function getRenzoEZETHWarpConfigGenerator( - ezEthSafes: Record, - xERC20: Record<(typeof chainsToDeploy)[number], string>, -) { - return async (): Promise> => { +export const getRenzoEZETHWarpConfigGenerator = + ( + ezEthSafes: Record, + xERC20: Record<(typeof chainsToDeploy)[number], string>, + ) => + async (): Promise> => { const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -380,7 +381,6 @@ export function getRenzoEZETHWarpConfigGenerator( return tokenConfig; }; -} export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, From 93caee997fcbd6b2b8cdc3fa03aabd8312426813 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:06:37 -0500 Subject: [PATCH 08/34] Revert "Move functions around in attempt to reduce diffs" This reverts commit 5ef2b240bbe81e7c15ea9dfc9b8f249e1f7df60d. --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index f065217e57..5b66cfdff8 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -279,12 +279,11 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; -export const getRenzoEZETHWarpConfigGenerator = - ( - ezEthSafes: Record, - xERC20: Record<(typeof chainsToDeploy)[number], string>, - ) => - async (): Promise> => { +export function getRenzoEZETHWarpConfigGenerator( + ezEthSafes: Record, + xERC20: Record<(typeof chainsToDeploy)[number], string>, +) { + return async (): Promise> => { const config = getEnvironmentConfig('mainnet3'); const multiProvider = await config.getMultiProvider(); const registry = await getMainnet3Registry(); @@ -381,6 +380,7 @@ export const getRenzoEZETHWarpConfigGenerator = return tokenConfig; }; +} export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, From 6c28235016c0a4fc48682d0c1e17a77c5dc875fe Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:06:57 -0500 Subject: [PATCH 09/34] Revert "Move functions around in attempt to reduce diffs" This reverts commit f46f2df02c37b302e3096b45d321ff2bef705f40. --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 5b66cfdff8..e14626c5e2 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -279,6 +279,11 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; +export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( + ezEthSafes, + xERC20, +); + export function getRenzoEZETHWarpConfigGenerator( ezEthSafes: Record, xERC20: Record<(typeof chainsToDeploy)[number], string>, @@ -381,8 +386,3 @@ export function getRenzoEZETHWarpConfigGenerator( return tokenConfig; }; } - -export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( - ezEthSafes, - xERC20, -); From 31187ae1fb9db5986709a32e1f4ae3b8ce9ceec3 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:12:35 -0500 Subject: [PATCH 10/34] Export chainsToDeploy --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index e14626c5e2..6180dbe929 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -19,7 +19,7 @@ import { getRegistry as getMainnet3Registry } from '../../chains.js'; import rawTokenPrices from '../../tokenPrices.json'; const tokenPrices: ChainMap = rawTokenPrices; -const chainsToDeploy = [ +export const chainsToDeploy = [ 'arbitrum', 'optimism', 'base', From 5ed5086c852fb1864c61474766688a6849c7aa3e Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:12:46 -0500 Subject: [PATCH 11/34] Add Staging config generator --- .../getRenzoEZETHWarpStagingConfig.ts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts new file mode 100644 index 0000000000..6cf944636a --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -0,0 +1,41 @@ +import { + chainsToDeploy, + getRenzoEZETHWarpConfigGenerator, +} from './getRenzoEZETHWarpConfig.js'; + +const xERC20: Record<(typeof chainsToDeploy)[number], string> = { + arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', + optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', + base: '0x2416092f143378750bb29b79eD961ab195CcEea5', + blast: '0x2416092f143378750bb29b79eD961ab195CcEea5', + bsc: '0x2416092f143378750bb29b79eD961ab195CcEea5', + mode: '0x2416092f143378750bb29b79eD961ab195CcEea5', + linea: '0x2416092f143378750bb29b79eD961ab195CcEea5', + ethereum: '0x2416092f143378750bb29b79eD961ab195CcEea5', + fraxtal: '0x2416092f143378750bb29b79eD961ab195CcEea5', + zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', + taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', + sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth + swell: '0x2416092f143378750bb29b79eD961ab195CcEea5', +}; + +export const ezEthSafes: Record = { + arbitrum: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + optimism: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + base: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + blast: '0xda7dBF0DB81882372B598a715F86eD5254A01b0a', + bsc: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + mode: '0x7791eeA3484Ba4E5860B7a2293840767619c2B58', + linea: '0xb7092685571B49786F1248c6205B5ac3A691c65E', + ethereum: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + fraxtal: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + swell: '0x435E8c9652Da151292F3981bbf663EBEB6668501', +}; + +export const getRenzoEZETHWarpStagingConfig = getRenzoEZETHWarpConfigGenerator( + ezEthSafes, + xERC20, +); From 455873cfe1d627e6051299b7e050c07446791b49 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:25:35 -0500 Subject: [PATCH 12/34] Delete extra space --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index e12b4ddc80..349419449c 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -322,7 +322,6 @@ export function getRenzoEZETHWarpConfigGenerator( new Set(chainsToDeploy), new Set(Object.keys(tokenPrices)), ); - if (validatorDiff.size > 0) { throw new Error( `chainsToDeploy !== validatorConfig, diff is ${Array.from( From 60a8ab545d7e7e23385ff81ce56e114e74fda9c7 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:27:02 -0500 Subject: [PATCH 13/34] Move execution to bottom of file --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 349419449c..13903e3833 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -292,11 +292,6 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { }, }; -export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( - ezEthSafes, - xERC20, -); - export function getRenzoEZETHWarpConfigGenerator( ezEthSafes: Record, xERC20: Record<(typeof chainsToDeploy)[number], string>, @@ -411,3 +406,8 @@ export function getRenzoEZETHWarpConfigGenerator( return tokenConfig; }; } + +export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( + ezEthSafes, + xERC20, +); From 7fd71eae19db828ce0555bdd41da9b0f9ae86019 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:43:13 -0500 Subject: [PATCH 14/34] Ready up the Safes --- .../getRenzoEZETHWarpStagingConfig.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index 6cf944636a..c03e18e6d3 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -20,19 +20,19 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { }; export const ezEthSafes: Record = { - arbitrum: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', - optimism: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - base: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - blast: '0xda7dBF0DB81882372B598a715F86eD5254A01b0a', - bsc: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', - mode: '0x7791eeA3484Ba4E5860B7a2293840767619c2B58', - linea: '0xb7092685571B49786F1248c6205B5ac3A691c65E', - ethereum: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', - fraxtal: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', - sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', - swell: '0x435E8c9652Da151292F3981bbf663EBEB6668501', + arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + blast: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + bsc: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + mode: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + linea: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + ethereum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', + fraxtal: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + zircuit: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', + taiko: '0x31FF35F84ADB120DbE089D190F03Ac74731Ae83F', + sei: '0xa30FF77d30Eb2d785f574344B4D11CAAe1949807', + swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; export const getRenzoEZETHWarpStagingConfig = getRenzoEZETHWarpConfigGenerator( From 951bca5f0e734373ac5d2861ccb749ef8ef4b644 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:15:53 -0500 Subject: [PATCH 15/34] Add TODO --- .../warp/configGetters/getRenzoEZETHWarpStagingConfig.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index c03e18e6d3..24682a0f39 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -3,6 +3,7 @@ import { getRenzoEZETHWarpConfigGenerator, } from './getRenzoEZETHWarpConfig.js'; +// TODO: Deploy xERC20 const xERC20: Record<(typeof chainsToDeploy)[number], string> = { arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', From 7788cbbeda6725eda5b7922ece0bf1ff92e9f58e Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:25:16 -0500 Subject: [PATCH 16/34] Export chainsToDeploy --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 13903e3833..c630cd820b 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -17,7 +17,7 @@ import { Address, assert, symmetricDifference } from '@hyperlane-xyz/utils'; import { getEnvironmentConfig } from '../../../../../scripts/core-utils.js'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; -const chainsToDeploy = [ +export const chainsToDeploy = [ 'arbitrum', 'optimism', 'base', From 99de52aaa9cc3c9e6acd27cc0785cd00612f0236 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:00:06 -0500 Subject: [PATCH 17/34] Paramaterize getRenzoHook to take in a safe address --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index c630cd820b..78b0c1d63c 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -56,6 +56,7 @@ export function getProtocolFee(chain: ChainName) { export function getRenzoHook( defaultHook: Address, chain: ChainName, + ezEthSafe: Address, ): HookConfig { return { type: HookType.AGGREGATION, @@ -63,8 +64,8 @@ export function getRenzoHook( defaultHook, { type: HookType.PROTOCOL_FEE, - owner: ezEthSafes[chain], - beneficiary: ezEthSafes[chain], + owner: ezEthSafe, + beneficiary: ezEthSafe, protocolFee: parseEther(getProtocolFee(chain)).toString(), maxProtocolFee: MAX_PROTOCOL_FEE, }, @@ -392,7 +393,7 @@ export function getRenzoEZETHWarpConfigGenerator( }, ], }, - hook: getRenzoHook(defaultHook, chain), + hook: getRenzoHook(defaultHook, chain, ezEthSafes[chain]), proxyAdmin: existingProxyAdmins[chain], }, ]; From 1711fc580843f7d4afc86c5f38948dde4fc42c14 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:00:41 -0500 Subject: [PATCH 18/34] Update pzEth to use paramaterized getRenzoHook --- .../mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index 6196031a8e..668f3de701 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -121,7 +121,7 @@ export const getRenzoPZETHWarpConfig = async (): Promise< }, ], }, - hook: getRenzoHook(defaultHook, chain), + hook: getRenzoHook(defaultHook, chain, ezEthSafes[chain]), proxyAdmin: existingProxyAdmins[chain], }, ]; From a914c1785d7fb26596bbc7b67efce701342124cd Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:01:11 -0500 Subject: [PATCH 19/34] Add ezEth staging warpId and Getter --- .../getRenzoEZETHWarpStagingConfig.ts | 29 +++++++++---------- .../environments/mainnet3/warp/warpIds.ts | 1 + typescript/infra/config/warp.ts | 3 ++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index 24682a0f39..6329024565 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -3,21 +3,20 @@ import { getRenzoEZETHWarpConfigGenerator, } from './getRenzoEZETHWarpConfig.js'; -// TODO: Deploy xERC20 const xERC20: Record<(typeof chainsToDeploy)[number], string> = { - arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', - optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', - base: '0x2416092f143378750bb29b79eD961ab195CcEea5', - blast: '0x2416092f143378750bb29b79eD961ab195CcEea5', - bsc: '0x2416092f143378750bb29b79eD961ab195CcEea5', - mode: '0x2416092f143378750bb29b79eD961ab195CcEea5', - linea: '0x2416092f143378750bb29b79eD961ab195CcEea5', - ethereum: '0x2416092f143378750bb29b79eD961ab195CcEea5', - fraxtal: '0x2416092f143378750bb29b79eD961ab195CcEea5', - zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', - taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', - sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth - swell: '0x2416092f143378750bb29b79eD961ab195CcEea5', + arbitrum: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + optimism: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + base: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + blast: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + bsc: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + mode: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + linea: '0x5EA461E19ba6C002b7024E4A2e9CeFe79a47d3bB', + ethereum: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + fraxtal: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + zircuit: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + taiko: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + sei: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', + swell: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', }; export const ezEthSafes: Record = { @@ -36,7 +35,7 @@ export const ezEthSafes: Record = { swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; -export const getRenzoEZETHWarpStagingConfig = getRenzoEZETHWarpConfigGenerator( +export const getRenzoEZETHWarpStageConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, ); diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index bbaafb8411..f90d1a2657 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -1,6 +1,7 @@ export enum WarpRouteIds { Ancient8EthereumUSDC = 'USDC/ancient8-ethereum', ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH = 'EZETH/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-sei-swell-taiko-zircuit', + ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETHSTAGE = 'EZETHSTAGE/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-sei-swell-taiko-zircuit', ArbitrumBaseEnduranceUSDC = 'USDC/arbitrum-base-endurance', ArbitrumEthereumZircuitAMPHRETH = 'AMPHRETH/arbitrum-ethereum-zircuit', ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron', diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 6a9e5499e7..58f13108c5 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -62,6 +62,7 @@ import { getEthereumZircuitRstETHWarpConfig } from './environments/mainnet3/warp import { getInevmInjectiveINJWarpConfig } from './environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.js'; import { getMantapacificNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.js'; import { getRenzoEZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; +import { getRenzoEZETHWarpStageConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.js'; import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { getEthereumSuperseedUSDTConfig, @@ -84,6 +85,8 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.ArbitrumNeutronTIA]: getArbitrumNeutronTiaWarpConfig, [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH]: getRenzoEZETHWarpConfig, + [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETHSTAGE]: + getRenzoEZETHWarpStageConfig, [WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig, [WarpRouteIds.BaseSolanamainnetTONY]: getBaseSolanamainnetTONYWarpConfig, [WarpRouteIds.ArbitrumAvalancheBaseFlowmainnetFormOptimismSolanamainnetWorldchainTRUMP]: From b74427de6334d3b4f455061870fa78b8c391c0b9 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:45:03 -0500 Subject: [PATCH 20/34] Update type for ezEthSafes --- .../warp/configGetters/getRenzoEZETHWarpStagingConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index 6329024565..b427055203 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -19,7 +19,7 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { swell: '0x585afea249031Ea4168A379F664e91dFc5F77E7D', }; -export const ezEthSafes: Record = { +export const ezEthSafes: Record<(typeof chainsToDeploy)[number], string> = { arbitrum: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', optimism: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', base: '0xA9421c6F339eC414b7e77449986bE9C2Ae430C25', From 892fbff966c8d1e9ef545db1e2e3592aae2ac218 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:35:27 -0500 Subject: [PATCH 21/34] Fix function name --- typescript/infra/config/warp.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 17f45952fb..1603706005 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -47,6 +47,7 @@ import { getRenzoEZETHWarpConfig, getRenzoGnosisSafeBuilderStrategyConfig, } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; +import { getRenzoEZETHWarpStageConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.js'; import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; import { getGithubRegistry } from './registry.js'; From c29d107f2301920e2d7e14f253d17b5afa13feeb Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:28:08 -0500 Subject: [PATCH 22/34] Parameterize lockbox --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 2 ++ .../warp/configGetters/getRenzoEZETHWarpStagingConfig.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 4f48fae9b1..1942b0003d 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -299,6 +299,7 @@ export function getRenzoEZETHWarpConfigGenerator( ezEthSafes: Record, xERC20: Record<(typeof chainsToDeploy)[number], string>, existingProxyAdmins?: ChainMap<{ address: string; owner: string }>, + lockbox: string, ) { return async (): Promise> => { const config = getEnvironmentConfig('mainnet3'); @@ -415,6 +416,7 @@ export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, existingProxyAdmins, + lockbox, ); // Create a GnosisSafeBuilder Strategy for each safe address diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index b427055203..e3ad66ea70 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -35,7 +35,10 @@ export const ezEthSafes: Record<(typeof chainsToDeploy)[number], string> = { swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; +const lockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; export const getRenzoEZETHWarpStageConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, + undefined, + lockbox, ); From e8762305ce32bcb25f6dd115196074c813475b36 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:58:48 -0500 Subject: [PATCH 23/34] Linter: move optional variable higher --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 4 ++-- .../warp/configGetters/getRenzoEZETHWarpStagingConfig.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 1942b0003d..2d2d098bfc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -298,8 +298,8 @@ const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { export function getRenzoEZETHWarpConfigGenerator( ezEthSafes: Record, xERC20: Record<(typeof chainsToDeploy)[number], string>, - existingProxyAdmins?: ChainMap<{ address: string; owner: string }>, lockbox: string, + existingProxyAdmins?: ChainMap<{ address: string; owner: string }>, ) { return async (): Promise> => { const config = getEnvironmentConfig('mainnet3'); @@ -415,8 +415,8 @@ export function getRenzoEZETHWarpConfigGenerator( export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - existingProxyAdmins, lockbox, + existingProxyAdmins, ); // Create a GnosisSafeBuilder Strategy for each safe address diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index e3ad66ea70..e63f266d5a 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -39,6 +39,5 @@ const lockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; export const getRenzoEZETHWarpStageConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - undefined, lockbox, ); From 160845017ec851b89b341f8f6afa8de2305b9eb2 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:28:08 -0500 Subject: [PATCH 24/34] Change getter name --- .../warp/configGetters/getRenzoEZETHWarpStagingConfig.ts | 6 +++--- typescript/infra/config/warp.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts index e63f266d5a..5b1db5aba9 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts @@ -35,9 +35,9 @@ export const ezEthSafes: Record<(typeof chainsToDeploy)[number], string> = { swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; -const lockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; -export const getRenzoEZETHWarpStageConfig = getRenzoEZETHWarpConfigGenerator( +const xERC20Lockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; +export const getRenzoEZETHSTAGEWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - lockbox, + xERC20Lockbox, ); diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 1603706005..34355f9945 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -47,7 +47,7 @@ import { getRenzoEZETHWarpConfig, getRenzoGnosisSafeBuilderStrategyConfig, } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; -import { getRenzoEZETHWarpStageConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.js'; +import { getRenzoEZETHSTAGEWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.js'; import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; import { getGithubRegistry } from './registry.js'; @@ -66,7 +66,7 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH]: getRenzoEZETHWarpConfig, [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETHSTAGE]: - getRenzoEZETHWarpStageConfig, + getRenzoEZETHSTAGEWarpConfig, [WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig, [WarpRouteIds.ArbitrumAvalancheBaseFlowmainnetFormOptimismSolanamainnetWorldchainTRUMP]: getTRUMPWarpConfig, From cb025a4ad7784854888ce9361992dc190bff02b8 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:28:23 -0500 Subject: [PATCH 25/34] Update lockbox variable name --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 2d2d098bfc..d494d5e5bb 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -78,7 +78,7 @@ export function getRenzoHook( const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; -const lockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; +const xERC20Lockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; const xERC20: Record<(typeof chainsToDeploy)[number], string> = { arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', @@ -415,7 +415,7 @@ export function getRenzoEZETHWarpConfigGenerator( export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - lockbox, + xERC20Lockbox, existingProxyAdmins, ); From e2e7a424ca846699b71186ccd64e371f50d96f81 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:33:37 -0500 Subject: [PATCH 26/34] Rename getter filename --- ...THWarpStagingConfig.ts => getRenzoEZETHSTAGEWarpConfig.ts} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename typescript/infra/config/environments/mainnet3/warp/configGetters/{getRenzoEZETHWarpStagingConfig.ts => getRenzoEZETHSTAGEWarpConfig.ts} (94%) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts similarity index 94% rename from typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts rename to typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts index 5b1db5aba9..e0a316e9ef 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts @@ -35,9 +35,9 @@ export const ezEthSafes: Record<(typeof chainsToDeploy)[number], string> = { swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; -const xERC20Lockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; +const xERC20MainnetLockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; export const getRenzoEZETHSTAGEWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - xERC20Lockbox, + xERC20MainnetLockbox, ); From 7d9b87b4ec45e55b263ba641070d90d92c66c3e6 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:33:55 -0500 Subject: [PATCH 27/34] Rename lockbox var name --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index d494d5e5bb..ec187428f1 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -78,7 +78,7 @@ export function getRenzoHook( const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; -const xERC20Lockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; +const xERC20MainnetLockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; const xERC20: Record<(typeof chainsToDeploy)[number], string> = { arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', @@ -415,7 +415,7 @@ export function getRenzoEZETHWarpConfigGenerator( export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - xERC20Lockbox, + xERC20MainnetLockbox, existingProxyAdmins, ); From 134290e6775962bd674f08547e90e5e0eeb1d87a Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:39:21 -0500 Subject: [PATCH 28/34] Rename getter filename --- typescript/infra/config/warp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 34355f9945..03bfd06f0e 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -43,11 +43,11 @@ import { getEthereumVictionUSDTWarpConfig } from './environments/mainnet3/warp/c import { getEthereumZircuitRe7LRTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumZircuitRe7LRTWarpConfig.js'; import { getInevmInjectiveINJWarpConfig } from './environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.js'; import { getMantapacificNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.js'; +import { getRenzoEZETHSTAGEWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.js'; import { getRenzoEZETHWarpConfig, getRenzoGnosisSafeBuilderStrategyConfig, } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.js'; -import { getRenzoEZETHSTAGEWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoEZETHWarpStagingConfig.js'; import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js'; import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; import { getGithubRegistry } from './registry.js'; From 26ead1a61a95728d77b4becabaca7b6a02c3da50 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 14:09:55 -0500 Subject: [PATCH 29/34] rename lockbox name --- .../warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts index e0a316e9ef..b1bf5a190c 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHSTAGEWarpConfig.ts @@ -35,9 +35,9 @@ export const ezEthSafes: Record<(typeof chainsToDeploy)[number], string> = { swell: '0xf40b75fb85C3bEc70D75A1B45ef08FC48Db61115', }; -const xERC20MainnetLockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; +const xERC20StagingLockbox = '0x74c8290836612e6251E49e8f3198fdD80C4DbEB8'; export const getRenzoEZETHSTAGEWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - xERC20MainnetLockbox, + xERC20StagingLockbox, ); From e61ec646d22bf7388b1b9f6a51b6ab33a6a2631f Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 14:13:45 -0500 Subject: [PATCH 30/34] Rename lockbox name --- .../mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index ec187428f1..e22a223cc9 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -78,7 +78,7 @@ export function getRenzoHook( const lockboxChain = 'ethereum'; // over the default 100k to account for xerc20 gas + ISM overhead over the default ISM https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/49f41d9759fd515bfd89e6e22e799c41b27b4119/typescript/sdk/src/router/GasRouterDeployer.ts#L14 const warpRouteOverheadGas = 200_000; -const xERC20MainnetLockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; +const xERC20ProductionLockbox = '0xC8140dA31E6bCa19b287cC35531c2212763C2059'; const xERC20: Record<(typeof chainsToDeploy)[number], string> = { arbitrum: '0x2416092f143378750bb29b79eD961ab195CcEea5', optimism: '0x2416092f143378750bb29b79eD961ab195CcEea5', @@ -415,7 +415,7 @@ export function getRenzoEZETHWarpConfigGenerator( export const getRenzoEZETHWarpConfig = getRenzoEZETHWarpConfigGenerator( ezEthSafes, xERC20, - xERC20MainnetLockbox, + xERC20ProductionLockbox, existingProxyAdmins, ); From 3c9f51799089cbd505f7ce40cc4fa7c264cc3094 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 14:54:34 -0500 Subject: [PATCH 31/34] Up Registry version --- typescript/infra/package.json | 2 +- yarn.lock | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/typescript/infra/package.json b/typescript/infra/package.json index 7f1a3a1fc1..82a4a1b55a 100644 --- a/typescript/infra/package.json +++ b/typescript/infra/package.json @@ -14,7 +14,7 @@ "@ethersproject/providers": "*", "@google-cloud/secret-manager": "^5.5.0", "@hyperlane-xyz/helloworld": "8.5.0", - "@hyperlane-xyz/registry": "9.1.0", + "@hyperlane-xyz/registry": "9.3.0", "@hyperlane-xyz/sdk": "8.5.0", "@hyperlane-xyz/utils": "8.5.0", "@inquirer/prompts": "3.3.2", diff --git a/yarn.lock b/yarn.lock index 34b574000a..9c316df10e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7476,7 +7476,7 @@ __metadata: "@ethersproject/providers": "npm:*" "@google-cloud/secret-manager": "npm:^5.5.0" "@hyperlane-xyz/helloworld": "npm:8.5.0" - "@hyperlane-xyz/registry": "npm:9.1.0" + "@hyperlane-xyz/registry": "npm:9.3.0" "@hyperlane-xyz/sdk": "npm:8.5.0" "@hyperlane-xyz/utils": "npm:8.5.0" "@inquirer/prompts": "npm:3.3.2" @@ -7549,6 +7549,16 @@ __metadata: languageName: node linkType: hard +"@hyperlane-xyz/registry@npm:9.3.0": + version: 9.3.0 + resolution: "@hyperlane-xyz/registry@npm:9.3.0" + dependencies: + yaml: "npm:2.4.5" + zod: "npm:^3.21.2" + checksum: 10/22d34cf5b002b9bca751dbfcc5ba0ea1cb145b0f1e9394c9a6fa4b80d84cc0f9b8f1461c9aed902892b6d351cfd7aaf77484f0db531aa913e646086ac467e80f + languageName: node + linkType: hard + "@hyperlane-xyz/sdk@npm:8.5.0, @hyperlane-xyz/sdk@workspace:typescript/sdk": version: 0.0.0-use.local resolution: "@hyperlane-xyz/sdk@workspace:typescript/sdk" From 3a8ccad41a637abad35475e1d745ed8e8861e4b8 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:06:29 -0500 Subject: [PATCH 32/34] Use getRegistry from CLI --- typescript/infra/test/warpIds.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/typescript/infra/test/warpIds.test.ts b/typescript/infra/test/warpIds.test.ts index 11f8a2dd15..7ced361c40 100644 --- a/typescript/infra/test/warpIds.test.ts +++ b/typescript/infra/test/warpIds.test.ts @@ -1,11 +1,13 @@ import { expect } from 'chai'; +import { getRegistry } from '@hyperlane-xyz/cli'; +import { DEFAULT_GITHUB_REGISTRY } from '@hyperlane-xyz/registry'; + import { WarpRouteIds } from '../config/environments/mainnet3/warp/warpIds.js'; -import { getRegistry } from '../config/registry.js'; describe('Warp IDs', () => { it('Has all warp IDs in the registry', () => { - const registry = getRegistry(); + const registry = getRegistry(DEFAULT_GITHUB_REGISTRY, '', true); for (const warpId of Object.values(WarpRouteIds)) { // That's a long sentence! expect( From 69d47a8ba69910bd9022f6a3eee07c945f2fe32f Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:09:11 -0500 Subject: [PATCH 33/34] Update package.json --- typescript/cli/package.json | 4 ++-- typescript/helloworld/package.json | 4 ++-- typescript/widgets/package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/cli/package.json b/typescript/cli/package.json index f0190f36e9..5005d4958b 100644 --- a/typescript/cli/package.json +++ b/typescript/cli/package.json @@ -5,7 +5,7 @@ "dependencies": { "@aws-sdk/client-kms": "^3.577.0", "@aws-sdk/client-s3": "^3.577.0", - "@hyperlane-xyz/registry": "9.1.0", + "@hyperlane-xyz/registry": "9.3.0", "@hyperlane-xyz/sdk": "8.6.1", "@hyperlane-xyz/utils": "8.6.1", "@inquirer/core": "9.0.10", @@ -88,4 +88,4 @@ "Deployment", "Typescript" ] -} +} \ No newline at end of file diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index c9d9b1f333..2ce79360c3 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -4,7 +4,7 @@ "version": "8.6.1", "dependencies": { "@hyperlane-xyz/core": "5.11.3", - "@hyperlane-xyz/registry": "9.1.0", + "@hyperlane-xyz/registry": "9.3.0", "@hyperlane-xyz/sdk": "8.6.1", "@openzeppelin/contracts-upgradeable": "^4.9.3", "ethers": "^5.7.2" @@ -73,4 +73,4 @@ "@types/node": "*", "@types/sinon-chai": "*" } -} +} \ No newline at end of file diff --git a/typescript/widgets/package.json b/typescript/widgets/package.json index c4fb280aba..41953d0d7d 100644 --- a/typescript/widgets/package.json +++ b/typescript/widgets/package.json @@ -27,7 +27,7 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@eslint/js": "^9.15.0", - "@hyperlane-xyz/registry": "9.1.0", + "@hyperlane-xyz/registry": "9.3.0", "@storybook/addon-essentials": "^7.6.14", "@storybook/addon-interactions": "^7.6.14", "@storybook/addon-links": "^7.6.14", @@ -94,4 +94,4 @@ "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" } -} +} \ No newline at end of file From 80e70a6f567345e0cad6888c621dcfc47df5fb03 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:11:28 -0500 Subject: [PATCH 34/34] Update yarn.lock --- typescript/cli/package.json | 2 +- typescript/helloworld/package.json | 2 +- typescript/widgets/package.json | 2 +- yarn.lock | 16 +++------------- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/typescript/cli/package.json b/typescript/cli/package.json index 5005d4958b..ed0540f050 100644 --- a/typescript/cli/package.json +++ b/typescript/cli/package.json @@ -88,4 +88,4 @@ "Deployment", "Typescript" ] -} \ No newline at end of file +} diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index 2ce79360c3..d92e1ed305 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -73,4 +73,4 @@ "@types/node": "*", "@types/sinon-chai": "*" } -} \ No newline at end of file +} diff --git a/typescript/widgets/package.json b/typescript/widgets/package.json index 41953d0d7d..2496a14179 100644 --- a/typescript/widgets/package.json +++ b/typescript/widgets/package.json @@ -94,4 +94,4 @@ "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 7868bdea29..fc3ac24822 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7320,7 +7320,7 @@ __metadata: "@eslint/js": "npm:^9.15.0" "@ethersproject/abi": "npm:*" "@ethersproject/providers": "npm:*" - "@hyperlane-xyz/registry": "npm:9.1.0" + "@hyperlane-xyz/registry": "npm:9.3.0" "@hyperlane-xyz/sdk": "npm:8.6.1" "@hyperlane-xyz/utils": "npm:8.6.1" "@inquirer/core": "npm:9.0.10" @@ -7425,7 +7425,7 @@ __metadata: dependencies: "@eslint/js": "npm:^9.15.0" "@hyperlane-xyz/core": "npm:5.11.3" - "@hyperlane-xyz/registry": "npm:9.1.0" + "@hyperlane-xyz/registry": "npm:9.3.0" "@hyperlane-xyz/sdk": "npm:8.6.1" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" "@nomiclabs/hardhat-waffle": "npm:^2.0.6" @@ -7540,16 +7540,6 @@ __metadata: languageName: unknown linkType: soft -"@hyperlane-xyz/registry@npm:9.1.0": - version: 9.1.0 - resolution: "@hyperlane-xyz/registry@npm:9.1.0" - dependencies: - yaml: "npm:2.4.5" - zod: "npm:^3.21.2" - checksum: 10/44c9ae520880a11a186cebedeab50056859a120c66938564d0f64500971b161b4df556d288ba5347b8fcb348787aeb4829a117ae9946156a2314407b52f0bb3e - languageName: node - linkType: hard - "@hyperlane-xyz/registry@npm:9.3.0": version: 9.3.0 resolution: "@hyperlane-xyz/registry@npm:9.3.0" @@ -7655,7 +7645,7 @@ __metadata: "@emotion/styled": "npm:^11.13.0" "@eslint/js": "npm:^9.15.0" "@headlessui/react": "npm:^2.1.8" - "@hyperlane-xyz/registry": "npm:9.1.0" + "@hyperlane-xyz/registry": "npm:9.3.0" "@hyperlane-xyz/sdk": "npm:8.6.1" "@hyperlane-xyz/utils": "npm:8.6.1" "@interchain-ui/react": "npm:^1.23.28"