Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(warpChecker): Support Renzo PZETH route #4628

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion typescript/infra/config/environments/mainnet3/warp/warpIds.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum WarpRouteIds {
Ancient8EthereumUSDC = 'USDC/ancient8-ethereum',
ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismZircuitEZETH = 'EZETH/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-zircuit',
ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH = 'EZETH/arbitrum-base-blast-bsc-ethereum-fraxtal-linea-mode-optimism-sei-taiko-zircuit',
ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron',
ArbitrumNeutronTIA = 'TIA/arbitrum-neutron',
EclipseSolanaSOL = 'SOL/eclipsemainnet-solanamainnet',
Expand All @@ -12,6 +12,23 @@ export enum WarpRouteIds {
EthereumVictionETH = 'ETH/ethereum-viction',
EthereumVictionUSDC = 'USDC/ethereum-viction',
EthereumVictionUSDT = 'USDT/ethereum-viction',
EthereumZircuitPZETH = 'PZETH/ethereum-zircuit',
InevmInjectiveINJ = 'INJ/inevm-injective',
MantapacificNeutronTIA = 'TIA/mantapacific-neutron',
}

// add new warp route ids here if they are supported by the checker tooling, add an entry to warpConfigGetterMap also
export enum CheckerWarpRouteIds {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split this out into a separate enum as not all warp routes are support by the checker yet

Ancient8EthereumUSDC = WarpRouteIds.Ancient8EthereumUSDC,
ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH = WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH,
ArbitrumNeutronEclip = WarpRouteIds.ArbitrumNeutronEclip,
ArbitrumNeutronTIA = WarpRouteIds.ArbitrumNeutronTIA,
EthereumInevmUSDC = WarpRouteIds.EthereumInevmUSDC,
EthereumInevmUSDT = WarpRouteIds.EthereumInevmUSDT,
EthereumVictionETH = WarpRouteIds.EthereumVictionETH,
EthereumVictionUSDC = WarpRouteIds.EthereumVictionUSDC,
EthereumVictionUSDT = WarpRouteIds.EthereumVictionUSDT,
EthereumZircuitPZETH = WarpRouteIds.EthereumZircuitPZETH,
InevmInjectiveINJ = WarpRouteIds.InevmInjectiveINJ,
MantapacificNeutronTIA = WarpRouteIds.MantapacificNeutronTIA,
}
31 changes: 15 additions & 16 deletions typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { EnvironmentConfig } from '../src/config/environment.js';
import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js';
import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.js';
import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js';
import { getEthereumEclipseTETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumEclipseTETHWarpConfig.js';
import { getEthereumEclipseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumEclipseUSDCWarpConfig.js';
import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js';
import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js';
import { getEthereumVictionETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.js';
Expand All @@ -21,7 +19,8 @@ import { getEthereumVictionUSDTWarpConfig } from './environments/mainnet3/warp/c
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 { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js';
import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js';
import { CheckerWarpRouteIds } from './environments/mainnet3/warp/warpIds.js';

type WarpConfigGetterWithConfig = (
routerConfig: ChainMap<RouterConfig>,
Expand All @@ -33,20 +32,20 @@ export const warpConfigGetterMap: Record<
string,
WarpConfigGetterWithConfig | WarpConfigGetterWithoutConfig
> = {
[WarpRouteIds.Ancient8EthereumUSDC]: getAncient8EthereumUSDCWarpConfig,
[WarpRouteIds.EthereumInevmUSDC]: getEthereumInevmUSDCWarpConfig,
[WarpRouteIds.EthereumInevmUSDT]: getEthereumInevmUSDTWarpConfig,
[WarpRouteIds.ArbitrumNeutronEclip]: getArbitrumNeutronEclipWarpConfig,
[WarpRouteIds.ArbitrumNeutronTIA]: getArbitrumNeutronTiaWarpConfig,
[WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismZircuitEZETH]:
[CheckerWarpRouteIds.Ancient8EthereumUSDC]: getAncient8EthereumUSDCWarpConfig,
[CheckerWarpRouteIds.EthereumInevmUSDC]: getEthereumInevmUSDCWarpConfig,
[CheckerWarpRouteIds.EthereumInevmUSDT]: getEthereumInevmUSDTWarpConfig,
[CheckerWarpRouteIds.ArbitrumNeutronEclip]: getArbitrumNeutronEclipWarpConfig,
[CheckerWarpRouteIds.ArbitrumNeutronTIA]: getArbitrumNeutronTiaWarpConfig,
[CheckerWarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH]:
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
[WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig,
[WarpRouteIds.EthereumEclipseTETH]: getEthereumEclipseTETHWarpConfig,
[WarpRouteIds.EthereumEclipseUSDC]: getEthereumEclipseUSDCWarpConfig,
[CheckerWarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[CheckerWarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
[CheckerWarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[CheckerWarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
[CheckerWarpRouteIds.MantapacificNeutronTIA]:
getMantapacificNeutronTiaWarpConfig,
[CheckerWarpRouteIds.EthereumZircuitPZETH]: getRenzoPZETHWarpConfig,
};

export async function getWarpConfig(
Expand Down
4 changes: 2 additions & 2 deletions typescript/infra/scripts/check/check-warp-deploy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from 'chalk';
import { Gauge, Registry } from 'prom-client';

import { WarpRouteIds } from '../../config/environments/mainnet3/warp/warpIds.js';
import { CheckerWarpRouteIds } from '../../config/environments/mainnet3/warp/warpIds.js';
import { submitMetrics } from '../../src/utils/metrics.js';
import { Modules } from '../agent-utils.js';

Expand All @@ -25,7 +25,7 @@ async function main() {
const failedWarpRoutesChecks: string[] = [];

// TODO: consider retrying this if check throws an error
for (const warpRouteId of Object.values(WarpRouteIds)) {
for (const warpRouteId of Object.values(CheckerWarpRouteIds)) {
console.log(`\nChecking warp route ${warpRouteId}...`);
const warpModule = Modules.WARP;

Expand Down
Loading