From e15dc267b806f349b98959b602e103c10c89b31e Mon Sep 17 00:00:00 2001 From: Daniel Savu <23065004+daniel-savu@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:29:59 +0100 Subject: [PATCH] feat: amphreth warp config (#4719) ### Description ### Drive-by changes ### Related issues ### Backward compatibility ### Testing --- .../mainnet3/warp/AMPHRETH-deployments.yaml | 28 ++++++++++ ...bitrumEthereumZircuitAmphrETHWarpConfig.ts | 55 +++++++++++++++++++ .../environments/mainnet3/warp/warpIds.ts | 1 + typescript/infra/config/warp.ts | 3 + typescript/infra/src/config/warp.ts | 1 + typescript/infra/src/warp/helm.ts | 2 +- 6 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 typescript/infra/config/environments/mainnet3/warp/AMPHRETH-deployments.yaml create mode 100644 typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts diff --git a/typescript/infra/config/environments/mainnet3/warp/AMPHRETH-deployments.yaml b/typescript/infra/config/environments/mainnet3/warp/AMPHRETH-deployments.yaml new file mode 100644 index 0000000000..222a321c25 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/AMPHRETH-deployments.yaml @@ -0,0 +1,28 @@ +# Configs and artifacts for the deployment of Hyperlane Warp Routes +description: Hyperlane Warp Route artifacts +timestamp: '2024-10-18T14:00:00.000Z' +deployer: Abacus Works (Hyperlane) +data: + config: + arbitrum: + protocolType: ethereum + type: synthetic + hypAddress: '0x6D251aADfc6Ff69031e01eA39bE3cb5BABf8438f' + name: Amphor Restaked ETH + symbol: AMPHRETH + decimals: 18 + ethereum: + protocolType: ethereum + type: collateral + hypAddress: '0xdc89990a6fdC1C922b841f1d977835628A24Ed57' + tokenAddress: '0x5fD13359Ba15A84B76f7F87568309040176167cd' + name: Amphor Restaked ETH + symbol: AMPHRETH + decimals: 18 + zircuit: + protocolType: ethereum + type: synthetic + hypAddress: '0x7D5a79539d7B1c9aE5e54d18EEE188840f1Fe4CC' + name: Amphor Restaked ETH + symbol: AMPHRETH + decimals: 18 diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts new file mode 100644 index 0000000000..1b81e81103 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts @@ -0,0 +1,55 @@ +import { ethers } from 'ethers'; + +import { + ChainMap, + RouterConfig, + TokenRouterConfig, + TokenType, +} from '@hyperlane-xyz/sdk'; + +import { tokens } from '../../../../../src/config/warp.js'; + +const arbitrumOwner = '0x008615770B588633265cB01Abd19740fAe67d0B9'; +const ethereumOwner = '0x008615770B588633265cB01Abd19740fAe67d0B9'; +const zircuitOwner = '0xD0673e7F3FB4037CA79F53d2d311D0e017d39963'; + +export const getArbitrumEthereumZircuitAmphrETHWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + const arbitrum: TokenRouterConfig = { + ...routerConfig.arbitrum, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + owner: arbitrumOwner, + ownerOverrides: { + proxyAdmin: arbitrumOwner, + }, + }; + + const ethereum: TokenRouterConfig = { + ...routerConfig.ethereum, + type: TokenType.collateral, + token: tokens.ethereum.amphrETH, + owner: ethereumOwner, + interchainSecurityModule: ethers.constants.AddressZero, + ownerOverrides: { + proxyAdmin: ethereumOwner, + }, + }; + + const zircuit: TokenRouterConfig = { + ...routerConfig.zircuit, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + owner: zircuitOwner, + ownerOverrides: { + proxyAdmin: zircuitOwner, + }, + }; + + return { + arbitrum, + ethereum, + zircuit, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index 9ff51677ee..debc81326c 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', ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH = 'EZETH/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-sei-taiko-zircuit', + ArbitrumEthereumZircuitAMPHRETH = 'AMPHRETH/arbitrum-ethereum-zircuit', ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron', ArbitrumNeutronTIA = 'TIA/arbitrum-neutron', EclipseSolanaSOL = 'SOL/eclipsemainnet-solanamainnet', diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 447183e8c3..2b7c44ee40 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -9,6 +9,7 @@ import { getHyperlaneCore } from '../scripts/core-utils.js'; import { EnvironmentConfig } from '../src/config/environment.js'; import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js'; +import { getArbitrumEthereumZircuitAmphrETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.js'; import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.js'; import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js'; import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js'; @@ -34,6 +35,8 @@ export const warpConfigGetterMap: Record< WarpConfigGetterWithConfig | WarpConfigGetterWithoutConfig > = { [WarpRouteIds.Ancient8EthereumUSDC]: getAncient8EthereumUSDCWarpConfig, + [WarpRouteIds.ArbitrumEthereumZircuitAMPHRETH]: + getArbitrumEthereumZircuitAmphrETHWarpConfig, [WarpRouteIds.EthereumInevmUSDC]: getEthereumInevmUSDCWarpConfig, [WarpRouteIds.EthereumInevmUSDT]: getEthereumInevmUSDTWarpConfig, [WarpRouteIds.ArbitrumNeutronEclip]: getArbitrumNeutronEclipWarpConfig, diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index 25bd408187..d66aed2fcb 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -7,6 +7,7 @@ export const tokens: ChainMap> = { USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', USDT: '0xdac17f958d2ee523a2206206994597c13d831ec7', deUSD: '0x15700B564Ca08D9439C58cA5053166E8317aa138', + amphrETH: '0x5fD13359Ba15A84B76f7F87568309040176167cd', }, sei: { fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269', diff --git a/typescript/infra/src/warp/helm.ts b/typescript/infra/src/warp/helm.ts index 4633ddd832..f5aa0e9811 100644 --- a/typescript/infra/src/warp/helm.ts +++ b/typescript/infra/src/warp/helm.ts @@ -27,7 +27,7 @@ export class WarpRouteMonitorHelmManager extends HelmManager { return { image: { repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo', - tag: 'd4d5501-20240925-222735', + tag: '6945b20-20241022-155935', }, configFilePath: pathRelativeToMonorepoRoot, fullnameOverride: this.helmReleaseName,