From 62626e5e2bd7a439cc0f803531dee3a79f532a88 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:30:25 -0500 Subject: [PATCH 1/8] Initial commit --- .../configGetters/getRenzoEZETHWarpConfig.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 198a708d1c..b16f644b15 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,5 +1,6 @@ import { ChainMap, + HookType, IsmType, MultisigConfig, TokenRouterConfig, @@ -164,6 +165,16 @@ export const ezEthValidators: ChainMap = { { address: '0x952df7f0cb8611573a53dd7cbf29768871d9f8b0', alias: 'Renzo' }, ], }, + swell: { + threshold: 1, + validators: [ + { + address: '0x7a0f4a8672f603e0c12468551db03f3956d10910', + alias: 'Luganodes', + }, + { address: '0x952df7f0cb8611573a53dd7cbf29768871d9f8b0', alias: 'Renzo' }, + ], + }, }; export const ezEthSafes: Record = { @@ -179,6 +190,7 @@ export const ezEthSafes: Record = { zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + swell: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', }; export const getRenzoEZETHWarpConfig = async (): Promise< @@ -254,6 +266,13 @@ export const getRenzoEZETHWarpConfig = async (): Promise< }, ], }, + hook: { + type: HookType.PROTOCOL_FEE, + owner: ezEthSafes[chain], + beneficiary: ezEthSafes[chain], + maxProtocolFee: 'x', + protocolFee: 'x', + }, }, ]; From 08e47e7e6035947910369cf385cb5d82773bfa3a Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:49:48 -0500 Subject: [PATCH 2/8] Additional updates --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 8 ++++++-- 1 file changed, 6 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 b16f644b15..30e0616ecc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,3 +1,5 @@ +import { parseUnits } from 'ethers/lib/utils.js'; + import { ChainMap, HookType, @@ -24,6 +26,7 @@ const chainsToDeploy = [ 'zircuit', 'taiko', 'sei', + 'swell', ]; 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 @@ -42,6 +45,7 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth + swell: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', }; export const ezEthValidators: ChainMap = { @@ -270,8 +274,8 @@ export const getRenzoEZETHWarpConfig = async (): Promise< type: HookType.PROTOCOL_FEE, owner: ezEthSafes[chain], beneficiary: ezEthSafes[chain], - maxProtocolFee: 'x', - protocolFee: 'x', + maxProtocolFee: parseUnits('100', 'ether').toString(), + protocolFee: parseUnits('100', 'ether').toString(), }, }, ]; From 22fa5fe81f8eab77b720ec81f24a16da3fb032c3 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:19:38 -0500 Subject: [PATCH 3/8] Fix conflicts; Add protocol fee --- .../configGetters/getRenzoEZETHWarpConfig.ts | 18 +++++++----- typescript/sdk/src/providers/MultiProvider.ts | 29 ++++++++++++++++++- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 30e0616ecc..039cda09c5 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,4 +1,4 @@ -import { parseUnits } from 'ethers/lib/utils.js'; +import { parseEther } from 'ethers/lib/utils.js'; import { ChainMap, @@ -28,6 +28,10 @@ const chainsToDeploy = [ 'sei', 'swell', ]; + +const MAX_PROTOCOL_FEE = parseEther('100').toString(); // Changing this will redeploy the PROTOCOL_FEE hook +const CURRENT_ETH_PRICE = 3500; // Changing this will update the existing PROTOCOL_FEE hook +const protocolFee = (0.5 / CURRENT_ETH_PRICE).toFixed(10).toString(); // ~$0.50 USD 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; @@ -45,7 +49,7 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth - swell: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', + swell: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // TODO: NOT READY }; export const ezEthValidators: ChainMap = { @@ -173,10 +177,10 @@ export const ezEthValidators: ChainMap = { threshold: 1, validators: [ { - address: '0x7a0f4a8672f603e0c12468551db03f3956d10910', + address: '0x7a0f4a8672f603e0c12468551db03f3956d10910', // TODO: NOT READY alias: 'Luganodes', }, - { address: '0x952df7f0cb8611573a53dd7cbf29768871d9f8b0', alias: 'Renzo' }, + { address: '0xb6b9b4bd4eb6eb3aef5e9826e7f8b8455947f67c', alias: 'Renzo' }, ], }, }; @@ -194,7 +198,7 @@ export const ezEthSafes: Record = { zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', - swell: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + swell: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', // TODO: NOT READY }; export const getRenzoEZETHWarpConfig = async (): Promise< @@ -274,8 +278,8 @@ export const getRenzoEZETHWarpConfig = async (): Promise< type: HookType.PROTOCOL_FEE, owner: ezEthSafes[chain], beneficiary: ezEthSafes[chain], - maxProtocolFee: parseUnits('100', 'ether').toString(), - protocolFee: parseUnits('100', 'ether').toString(), + protocolFee: parseEther(protocolFee).toString(), + maxProtocolFee: MAX_PROTOCOL_FEE, }, }, ]; diff --git a/typescript/sdk/src/providers/MultiProvider.ts b/typescript/sdk/src/providers/MultiProvider.ts index 7b5f923061..6ffc94e8c0 100644 --- a/typescript/sdk/src/providers/MultiProvider.ts +++ b/typescript/sdk/src/providers/MultiProvider.ts @@ -9,6 +9,7 @@ import { } from 'ethers'; import { Logger } from 'pino'; +import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js'; import { Address, addBufferToGasLimit, @@ -17,6 +18,9 @@ import { } from '@hyperlane-xyz/utils'; import { testChainMetadata, testChains } from '../consts/testChains.js'; +import { ContractVerifier } from '../deploy/verify/ContractVerifier.js'; +import { ExplorerLicenseType } from '../deploy/verify/types.js'; +import { getContractVerificationInput } from '../deploy/verify/utils.js'; import { ChainMetadataManager } from '../metadata/ChainMetadataManager.js'; import { ChainMetadata } from '../metadata/chainMetadataTypes.js'; import { ChainMap, ChainName, ChainNameOrId } from '../types.js'; @@ -46,7 +50,6 @@ export class MultiProvider extends ChainMetadataManager { signers: ChainMap; useSharedSigner = false; // A single signer to be used for all chains readonly logger: Logger; - /** * Create a new MultiProvider with the given chainMetadata, * or the SDK's default metadata if not provided @@ -336,6 +339,30 @@ export class MultiProvider extends ChainMetadataManager { // wait for deploy tx to be confirmed await this.handleTx(chainNameOrId, contract.deployTransaction); + // verify deployed contracts + try { + const chain = this.getChainName(chainNameOrId); + const explorerApi = this.getExplorerApi(chain); + const contractVerifier = new ContractVerifier( + this as MultiProvider, + { [chain]: explorerApi.apiKey ?? '' }, + coreBuildArtifact, + ExplorerLicenseType.MIT, + ); + const factoryName = factory.constructor.name; + console.log(`trying to verify ${factoryName}`); + const verificationInput = getContractVerificationInput({ + name: factoryName.substring(0, factoryName.indexOf('__factory')), + contract, + bytecode: factory.bytecode, + expectedimplementation: contract.address, + }); + + contractVerifier.verifyContract(chain, verificationInput, this.logger); + } catch (e) { + this.logger.debug(`Failed to verify contracts in MultiProvider ${e}`); + } + // return deployed contract return contract as Awaited>; } From dd66c18afec9b99001088865451a0b8fea6d603d Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:22:31 -0500 Subject: [PATCH 4/8] Revert local change as a result of merge --- typescript/sdk/src/providers/MultiProvider.ts | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/typescript/sdk/src/providers/MultiProvider.ts b/typescript/sdk/src/providers/MultiProvider.ts index 6ffc94e8c0..7b5f923061 100644 --- a/typescript/sdk/src/providers/MultiProvider.ts +++ b/typescript/sdk/src/providers/MultiProvider.ts @@ -9,7 +9,6 @@ import { } from 'ethers'; import { Logger } from 'pino'; -import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js'; import { Address, addBufferToGasLimit, @@ -18,9 +17,6 @@ import { } from '@hyperlane-xyz/utils'; import { testChainMetadata, testChains } from '../consts/testChains.js'; -import { ContractVerifier } from '../deploy/verify/ContractVerifier.js'; -import { ExplorerLicenseType } from '../deploy/verify/types.js'; -import { getContractVerificationInput } from '../deploy/verify/utils.js'; import { ChainMetadataManager } from '../metadata/ChainMetadataManager.js'; import { ChainMetadata } from '../metadata/chainMetadataTypes.js'; import { ChainMap, ChainName, ChainNameOrId } from '../types.js'; @@ -50,6 +46,7 @@ export class MultiProvider extends ChainMetadataManager { signers: ChainMap; useSharedSigner = false; // A single signer to be used for all chains readonly logger: Logger; + /** * Create a new MultiProvider with the given chainMetadata, * or the SDK's default metadata if not provided @@ -339,30 +336,6 @@ export class MultiProvider extends ChainMetadataManager { // wait for deploy tx to be confirmed await this.handleTx(chainNameOrId, contract.deployTransaction); - // verify deployed contracts - try { - const chain = this.getChainName(chainNameOrId); - const explorerApi = this.getExplorerApi(chain); - const contractVerifier = new ContractVerifier( - this as MultiProvider, - { [chain]: explorerApi.apiKey ?? '' }, - coreBuildArtifact, - ExplorerLicenseType.MIT, - ); - const factoryName = factory.constructor.name; - console.log(`trying to verify ${factoryName}`); - const verificationInput = getContractVerificationInput({ - name: factoryName.substring(0, factoryName.indexOf('__factory')), - contract, - bytecode: factory.bytecode, - expectedimplementation: contract.address, - }); - - contractVerifier.verifyContract(chain, verificationInput, this.logger); - } catch (e) { - this.logger.debug(`Failed to verify contracts in MultiProvider ${e}`); - } - // return deployed contract return contract as Awaited>; } From 01c4183fd6874e7d9abbce28a4bfec723f94f592 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:57:07 -0500 Subject: [PATCH 5/8] Add swell addresses. fix according to PR --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 12 +++++++----- .../config/environments/mainnet3/warp/warpIds.ts | 2 +- typescript/infra/config/warp.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 039cda09c5..2c133167e8 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -12,7 +12,9 @@ import { import { symmetricDifference } from '@hyperlane-xyz/utils'; import { getRegistry as getMainnet3Registry } from '../../chains.js'; +import rawTokenPrices from '../../tokenPrices.json'; +const tokenPrices: ChainMap = rawTokenPrices; const chainsToDeploy = [ 'arbitrum', 'optimism', @@ -30,8 +32,8 @@ const chainsToDeploy = [ ]; const MAX_PROTOCOL_FEE = parseEther('100').toString(); // Changing this will redeploy the PROTOCOL_FEE hook -const CURRENT_ETH_PRICE = 3500; // Changing this will update the existing PROTOCOL_FEE hook -const protocolFee = (0.5 / CURRENT_ETH_PRICE).toFixed(10).toString(); // ~$0.50 USD + +const protocolFee = (0.5 / Number(tokenPrices.ethereum)).toFixed(10).toString(); // ~$0.50 USD 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; @@ -49,7 +51,7 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth - swell: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // TODO: NOT READY + swell: '0x2416092f143378750bb29b79eD961ab195CcEea5', }; export const ezEthValidators: ChainMap = { @@ -177,7 +179,7 @@ export const ezEthValidators: ChainMap = { threshold: 1, validators: [ { - address: '0x7a0f4a8672f603e0c12468551db03f3956d10910', // TODO: NOT READY + address: '0x9eadf9217be22d9878e0e464727a2176d5c69ff8', alias: 'Luganodes', }, { address: '0xb6b9b4bd4eb6eb3aef5e9826e7f8b8455947f67c', alias: 'Renzo' }, @@ -198,7 +200,7 @@ export const ezEthSafes: Record = { zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', - swell: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', // TODO: NOT READY + swell: '0x435E8c9652Da151292F3981bbf663EBEB6668501', }; export const getRenzoEZETHWarpConfig = async (): Promise< diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 3d23bdc087..f3a115e697 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -1,6 +1,6 @@ export enum WarpRouteIds { Ancient8EthereumUSDC = 'USDC/ancient8-ethereum', - ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH = 'EZETH/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-sei-taiko-zircuit', + ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH = 'EZETH/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 0d93e10ddc..5b14712774 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -53,7 +53,7 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.EthereumInevmUSDT]: getEthereumInevmUSDTWarpConfig, [WarpRouteIds.ArbitrumNeutronEclip]: getArbitrumNeutronEclipWarpConfig, [WarpRouteIds.ArbitrumNeutronTIA]: getArbitrumNeutronTiaWarpConfig, - [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH]: + [WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH]: getRenzoEZETHWarpConfig, [WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig, [WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig, From 02cff6542f9d5035f821061c1df1a302545357d8 Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:51:14 -0500 Subject: [PATCH 6/8] Add ProxyAdmins --- .../configGetters/getRenzoEZETHWarpConfig.ts | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 4a32bb2c47..04410f5ad0 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,5 +1,6 @@ import { parseEther } from 'ethers/lib/utils.js'; +import { fraxtal } from '@hyperlane-xyz/registry'; import { ChainMap, HookType, @@ -203,6 +204,57 @@ export const ezEthSafes: Record = { swell: '0x435E8c9652Da151292F3981bbf663EBEB6668501', }; +const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + arbitrum: { + address: '0xdcB558d5C0F9A35C53Fa343c77eD0d346576e2Cf', + owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + }, + optimism: { + address: '0xa50910ae66Df6A5F8e85dac032FD45BC2b7be6fF', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + base: { + address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + blast: { + address: '0xA26F8cE2E21A503bf9e18c213965d7BC14997F48', + owner: '0xda7dBF0DB81882372B598a715F86eD5254A01b0a', + }, + bsc: { + address: '0x486b39378f99f073A3043C6Aabe8666876A8F3C5', + owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + }, + mode: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: '0x7791eeA3484Ba4E5860B7a2293840767619c2B58', + }, + fraxtal: { + address: '0x8bB69721B4E9b9df08bEdaeaA193008C7317Db59', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + linea: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: '0xb7092685571B49786F1248c6205B5ac3A691c65E', + }, + ethereum: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + }, + zircuit: { + address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, + sei: { + address: '0x33219fEF24C198d979F05d692a17507E41a0A73e', + owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + }, + taiko: { + address: '0xA3666f8a327AADB666F1906A38B17937e5F11f92', + owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + }, +}; + export const getRenzoEZETHWarpConfig = async (): Promise< ChainMap > => { @@ -283,6 +335,7 @@ export const getRenzoEZETHWarpConfig = async (): Promise< protocolFee: parseEther(protocolFee).toString(), maxProtocolFee: MAX_PROTOCOL_FEE, }, + proxyAdmin: existingProxyAdmins[chain], }, ]; From b1ce95b094f7227c54be2d7a479d807162eab4be Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:51:27 -0500 Subject: [PATCH 7/8] Add getProtocolFee() --- .../warp/configGetters/getRenzoEZETHWarpConfig.ts | 9 ++++++--- 1 file changed, 6 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 04410f5ad0..ffe936a0f8 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -3,6 +3,7 @@ import { parseEther } from 'ethers/lib/utils.js'; import { fraxtal } from '@hyperlane-xyz/registry'; import { ChainMap, + ChainName, HookType, HypTokenRouterConfig, IsmType, @@ -31,10 +32,12 @@ const chainsToDeploy = [ 'sei', 'swell', ]; - const MAX_PROTOCOL_FEE = parseEther('100').toString(); // Changing this will redeploy the PROTOCOL_FEE hook -const protocolFee = (0.5 / Number(tokenPrices.ethereum)).toFixed(10).toString(); // ~$0.50 USD +export function getProtocolFee(chain: ChainName) { + return (0.5 / Number(tokenPrices[chain])).toFixed(10).toString(); // ~$0.50 USD +} + 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; @@ -332,7 +335,7 @@ export const getRenzoEZETHWarpConfig = async (): Promise< type: HookType.PROTOCOL_FEE, owner: ezEthSafes[chain], beneficiary: ezEthSafes[chain], - protocolFee: parseEther(protocolFee).toString(), + protocolFee: parseEther(getProtocolFee(chain)).toString(), maxProtocolFee: MAX_PROTOCOL_FEE, }, proxyAdmin: existingProxyAdmins[chain], From 7bfcfd3a9c76771aaa40cfc51b2e7601a462f73e Mon Sep 17 00:00:00 2001 From: Le Yu <6251863+ltyu@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:57:41 -0500 Subject: [PATCH 8/8] pipe through owner to proxyAdmin.owner --- .../configGetters/getRenzoEZETHWarpConfig.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index ffe936a0f8..769a364e3e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -210,51 +210,51 @@ export const ezEthSafes: Record = { const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { arbitrum: { address: '0xdcB558d5C0F9A35C53Fa343c77eD0d346576e2Cf', - owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + owner: ezEthSafes.arbitrum, }, optimism: { address: '0xa50910ae66Df6A5F8e85dac032FD45BC2b7be6fF', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + owner: ezEthSafes.optimism, }, base: { address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + owner: ezEthSafes.base, }, blast: { address: '0xA26F8cE2E21A503bf9e18c213965d7BC14997F48', - owner: '0xda7dBF0DB81882372B598a715F86eD5254A01b0a', + owner: ezEthSafes.blast, }, bsc: { address: '0x486b39378f99f073A3043C6Aabe8666876A8F3C5', - owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + owner: ezEthSafes.bsc, }, mode: { address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', - owner: '0x7791eeA3484Ba4E5860B7a2293840767619c2B58', + owner: ezEthSafes.mode, }, fraxtal: { address: '0x8bB69721B4E9b9df08bEdaeaA193008C7317Db59', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + owner: ezEthSafes.fraxtal, }, linea: { address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', - owner: '0xb7092685571B49786F1248c6205B5ac3A691c65E', + owner: ezEthSafes.linea, }, ethereum: { address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', - owner: '0xD1e6626310fD54Eceb5b9a51dA2eC329D6D4B68A', + owner: ezEthSafes.ethereum, }, zircuit: { address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + owner: ezEthSafes.zircuit, }, sei: { address: '0x33219fEF24C198d979F05d692a17507E41a0A73e', - owner: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + owner: ezEthSafes.sei, }, taiko: { address: '0xA3666f8a327AADB666F1906A38B17937e5F11f92', - owner: '0x8410927C286A38883BC23721e640F31D3E3E79F8', + owner: ezEthSafes.taiko, }, };