Skip to content

Commit

Permalink
feat(warpChecker): Support Renzo PZETH route (#4628)
Browse files Browse the repository at this point in the history
### Description

- support Renzo PZETH warp route in checker

### Drive-by changes

- introduce `CheckerWarpRouteIds` enum for warp routes that are
supported in the checker, eclipse and sol routes are not currently
supported


### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->

Manual
  • Loading branch information
Mo-Hussain authored Oct 17, 2024
1 parent b4d26dd commit 1606f85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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',
}
6 changes: 2 additions & 4 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 { getEthereumSeiFastUSDWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.js';
Expand All @@ -22,6 +20,7 @@ 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 { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js';
import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js';

type WarpConfigGetterWithConfig = (
Expand All @@ -42,12 +41,11 @@ export const warpConfigGetterMap: Record<
[WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH]:
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.EthereumEclipseTETH]: getEthereumEclipseTETHWarpConfig,
[WarpRouteIds.EthereumEclipseUSDC]: getEthereumEclipseUSDCWarpConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
[WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
[WarpRouteIds.EthereumZircuitPZETH]: getRenzoPZETHWarpConfig,
[WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig,
};

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 { warpConfigGetterMap } from '../../config/warp.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.keys(warpConfigGetterMap)) {
console.log(`\nChecking warp route ${warpRouteId}...`);
const warpModule = Modules.WARP;

Expand Down

0 comments on commit 1606f85

Please sign in to comment.