Skip to content

Commit a85fe7d

Browse files
authored
feat(infra): enable USDT/oft rebalancing for Eclipse USDT warp (#8645)
1 parent 4815a47 commit a85fe7d

2 files changed

Lines changed: 17 additions & 18 deletions

File tree

typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseUSDTWarpConfig.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import { getWarpFeeOwner } from '../../governance/utils.js';
88
import { chainOwners } from '../../owners.js';
99
import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js';
1010
import { usdtTokenAddresses } from '../tokens.js';
11+
import { WarpRouteIds } from '../warpIds.js';
1112
import {
1213
getFixedRoutingFeeConfig,
14+
getRebalancingBridgesConfigFor,
1315
getRebalancingUSDTConfigForChain,
1416
scaleDownConfig,
1517
} from './utils.js';
@@ -159,11 +161,10 @@ export const buildEclipseUSDTWarpConfig = async (
159161
): Promise<ChainMap<HypTokenRouterConfig>> => {
160162
const { ownersByChain, programIds, proxyAdmins } = options;
161163

162-
// TODO: uncomment when USDTOft warp routes are in the registry
163-
// const rebalancingConfigByChain = getRebalancingBridgesConfigFor(
164-
// rebalanceableCollateralChains,
165-
// [WarpRouteIds.USDTOft, WarpRouteIds.USDTOftLegacy],
166-
// );
164+
const rebalancingConfigByChain = getRebalancingBridgesConfigFor(
165+
rebalanceableCollateralChains,
166+
[WarpRouteIds.USDTOft, WarpRouteIds.USDTOftLegacy],
167+
);
167168

168169
const configs: Array<[DeploymentChain, HypTokenRouterConfig]> = [];
169170

@@ -175,7 +176,7 @@ export const buildEclipseUSDTWarpConfig = async (
175176
chain,
176177
routerConfig,
177178
ownersByChain,
178-
// rebalancingConfigByChain,
179+
rebalancingConfigByChain,
179180
);
180181
configs.push([
181182
chain,

typescript/infra/config/environments/mainnet3/warp/configGetters/utils.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ export const getRebalancingUSDTConfigForChain = (
191191
currentChain: keyof typeof usdtTokenAddresses,
192192
routerConfigByChain: ChainMap<RouterConfigWithoutOwner>,
193193
ownersByChain: ChainMap<Address>,
194-
// TODO: uncomment when USDTOft warp routes are in the registry
195-
// rebalancingConfigByChain: ChainMap<RebalancingConfig>,
194+
rebalancingConfigByChain: ChainMap<RebalancingConfig>,
196195
): HypTokenRouterConfig => {
197196
const owner = ownersByChain[currentChain];
198197
assert(owner, `Owner not found for chain ${currentChain}`);
@@ -203,22 +202,21 @@ export const getRebalancingUSDTConfigForChain = (
203202
`USDT token address not found for chain ${currentChain}`,
204203
);
205204

206-
// TODO: uncomment when USDTOft warp routes are in the registry
207-
// const currentRebalancingConfig = rebalancingConfigByChain[currentChain];
208-
// assert(
209-
// currentRebalancingConfig,
210-
// `Rebalancing config not found for chain ${currentChain}`,
211-
// );
212-
// const { allowedRebalancers, allowedRebalancingBridges } =
213-
// currentRebalancingConfig;
205+
const currentRebalancingConfig = rebalancingConfigByChain[currentChain];
206+
assert(
207+
currentRebalancingConfig,
208+
`Rebalancing config not found for chain ${currentChain}`,
209+
);
210+
const { allowedRebalancers, allowedRebalancingBridges } =
211+
currentRebalancingConfig;
214212

215213
return {
216214
type: TokenType.collateral,
217215
token: usdtTokenAddress,
218216
mailbox: routerConfigByChain[currentChain].mailbox,
219217
owner,
220-
// allowedRebalancers,
221-
// allowedRebalancingBridges,
218+
allowedRebalancers,
219+
allowedRebalancingBridges,
222220
};
223221
};
224222

0 commit comments

Comments
 (0)