diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 8928f2fb58..769a364e3e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,5 +1,10 @@ +import { parseEther } from 'ethers/lib/utils.js'; + +import { fraxtal } from '@hyperlane-xyz/registry'; import { ChainMap, + ChainName, + HookType, HypTokenRouterConfig, IsmType, MultisigConfig, @@ -9,7 +14,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', @@ -23,7 +30,14 @@ const chainsToDeploy = [ 'zircuit', 'taiko', 'sei', + 'swell', ]; +const MAX_PROTOCOL_FEE = parseEther('100').toString(); // Changing this will redeploy the PROTOCOL_FEE hook + +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; @@ -41,6 +55,7 @@ const xERC20: Record<(typeof chainsToDeploy)[number], string> = { zircuit: '0x2416092f143378750bb29b79eD961ab195CcEea5', taiko: '0x2416092f143378750bb29b79eD961ab195CcEea5', sei: '0x6DCfbF4729890043DFd34A93A2694E5303BA2703', // redEth + swell: '0x2416092f143378750bb29b79eD961ab195CcEea5', }; export const ezEthValidators: ChainMap = { @@ -164,6 +179,16 @@ export const ezEthValidators: ChainMap = { { address: '0x952df7f0cb8611573a53dd7cbf29768871d9f8b0', alias: 'Renzo' }, ], }, + swell: { + threshold: 1, + validators: [ + { + address: '0x9eadf9217be22d9878e0e464727a2176d5c69ff8', + alias: 'Luganodes', + }, + { address: '0xb6b9b4bd4eb6eb3aef5e9826e7f8b8455947f67c', alias: 'Renzo' }, + ], + }, }; export const ezEthSafes: Record = { @@ -179,6 +204,58 @@ export const ezEthSafes: Record = { zircuit: '0x8410927C286A38883BC23721e640F31D3E3E79F8', taiko: '0x8410927C286A38883BC23721e640F31D3E3E79F8', sei: '0x0e60fd361fF5b90088e1782e6b21A7D177d462C5', + swell: '0x435E8c9652Da151292F3981bbf663EBEB6668501', +}; + +const existingProxyAdmins: ChainMap<{ address: string; owner: string }> = { + arbitrum: { + address: '0xdcB558d5C0F9A35C53Fa343c77eD0d346576e2Cf', + owner: ezEthSafes.arbitrum, + }, + optimism: { + address: '0xa50910ae66Df6A5F8e85dac032FD45BC2b7be6fF', + owner: ezEthSafes.optimism, + }, + base: { + address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', + owner: ezEthSafes.base, + }, + blast: { + address: '0xA26F8cE2E21A503bf9e18c213965d7BC14997F48', + owner: ezEthSafes.blast, + }, + bsc: { + address: '0x486b39378f99f073A3043C6Aabe8666876A8F3C5', + owner: ezEthSafes.bsc, + }, + mode: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: ezEthSafes.mode, + }, + fraxtal: { + address: '0x8bB69721B4E9b9df08bEdaeaA193008C7317Db59', + owner: ezEthSafes.fraxtal, + }, + linea: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: ezEthSafes.linea, + }, + ethereum: { + address: '0x2F78F22a1D7491500C9ED9352b8239fbAbcDd84E', + owner: ezEthSafes.ethereum, + }, + zircuit: { + address: '0xec1DdF05ff85D2B22B7d27E5b5E0B82961B7D889', + owner: ezEthSafes.zircuit, + }, + sei: { + address: '0x33219fEF24C198d979F05d692a17507E41a0A73e', + owner: ezEthSafes.sei, + }, + taiko: { + address: '0xA3666f8a327AADB666F1906A38B17937e5F11f92', + owner: ezEthSafes.taiko, + }, }; export const getRenzoEZETHWarpConfig = async (): Promise< @@ -254,6 +331,14 @@ export const getRenzoEZETHWarpConfig = async (): Promise< }, ], }, + hook: { + type: HookType.PROTOCOL_FEE, + owner: ezEthSafes[chain], + beneficiary: ezEthSafes[chain], + protocolFee: parseEther(getProtocolFee(chain)).toString(), + maxProtocolFee: MAX_PROTOCOL_FEE, + }, + proxyAdmin: existingProxyAdmins[chain], }, ]; 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 5c9049eb7d..ce7d1d1252 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,