Skip to content

Commit

Permalink
Add USDC form warp route
Browse files Browse the repository at this point in the history
  • Loading branch information
nambrot committed Dec 20, 2024
1 parent 84b74a3 commit ea6bf5b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@ const safeOwners: ChainMap<Address> = {
form: '0x41B624412B529409A437f08Ef80bCabE81053650',
};

export const getEthereumFormUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const ethereum: HypTokenRouterConfig = {
mailbox: routerConfig.ethereum.mailbox,
owner: safeOwners.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDC,
interchainSecurityModule: ethers.constants.AddressZero,
};

// FiatTokenProxy 0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D
// MasterMinter 0x9Dec8Dfafcce2d45E8FF8C7792DB1D704AB1dc9D
const form: HypTokenRouterConfig = {
mailbox: routerConfig.form.mailbox,
owner: safeOwners.form,
type: TokenType.collateralFiat,
token: '0xFBf489bb4783D4B1B2e7D07ba39873Fb8068507D',
interchainSecurityModule: ethers.constants.AddressZero,
};

return {
ethereum,
form,
};
};

export const getEthereumFormUSDTWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export enum WarpRouteIds {
AppchainBaseUSDC = 'USDC/appchain-base',
BobaBsquaredSwellUBTC = 'UBTC/boba-bsquared-swell',
EthereumFormUSDT = 'USDT/ethereum-form',
EthereumFormUSDC = 'USDC/ethereum-form',
}
6 changes: 5 additions & 1 deletion typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import {
} from '../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../src/config/warp.js';

import {
getEthereumFormUSDCWarpConfig,
getEthereumFormUSDTWarpConfig,
} from './environments/mainnet3/warp/configGetters/formConfigGetters.js';
import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js';
import { getAppChainBaseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAppchainBaseUSDCWarpConfig.js';
import { getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.js';
Expand All @@ -30,7 +34,6 @@ import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/conf
import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js';
import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js';
import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.js';
import { getEthereumFormUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFormUSDTWarpConfig.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 Down Expand Up @@ -86,6 +89,7 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.BobaBsquaredSwellUBTC]: getBobaBsquaredSwellUBTCWarpConfig,
[WarpRouteIds.EthereumZircuitRe7LRT]: getEthereumZircuitRe7LRTWarpConfig,
[WarpRouteIds.EthereumFormUSDT]: getEthereumFormUSDTWarpConfig,
[WarpRouteIds.EthereumFormUSDC]: getEthereumFormUSDCWarpConfig,
};

export async function getWarpConfig(
Expand Down

0 comments on commit ea6bf5b

Please sign in to comment.