diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts new file mode 100644 index 0000000000..e6268ef755 --- /dev/null +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/formConfigGetters.ts @@ -0,0 +1,65 @@ +import { ethers } from 'ethers'; + +import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk'; +import { Address } from '@hyperlane-xyz/utils'; + +import { + RouterConfigWithoutOwner, + tokens, +} from '../../../../../src/config/warp.js'; + +const safeOwners: ChainMap
= { + ethereum: '0xec5ad23e29203301B2C1a765718Cc1de7A8d3FbF', + form: '0x41B624412B529409A437f08Ef80bCabE81053650', +}; + +export const getEthereumFormUSDCWarpConfig = async ( + routerConfig: ChainMap, +): Promise> => { + 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, +): Promise> => { + const ethereum: HypTokenRouterConfig = { + mailbox: routerConfig.ethereum.mailbox, + owner: safeOwners.ethereum, + type: TokenType.collateral, + token: tokens.ethereum.USDT, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + const form: HypTokenRouterConfig = { + mailbox: routerConfig.form.mailbox, + owner: safeOwners.form, + type: TokenType.synthetic, + interchainSecurityModule: ethers.constants.AddressZero, + }; + + return { + ethereum, + form, + }; +}; diff --git a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts index d9bf87760d..475e85e53f 100644 --- a/typescript/infra/config/environments/mainnet3/warp/warpIds.ts +++ b/typescript/infra/config/environments/mainnet3/warp/warpIds.ts @@ -38,4 +38,6 @@ export enum WarpRouteIds { ArbitrumBaseBlastBscEthereumGnosisLiskMantleModeOptimismPolygonScrollZeroNetworkZoraMainnet = 'ETH/arbitrum-base-blast-bsc-ethereum-gnosis-lisk-mantle-mode-optimism-polygon-scroll-zeronetwork-zoramainnet', AppchainBaseUSDC = 'USDC/appchain-base', BobaBsquaredSwellUBTC = 'UBTC/boba-bsquared-swell', + EthereumFormUSDT = 'USDT/ethereum-form', + EthereumFormUSDC = 'USDC/ethereum-form', } diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index c68e2221d9..95fd9efb82 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -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'; @@ -84,6 +88,8 @@ export const warpConfigGetterMap: Record = { [WarpRouteIds.AppchainBaseUSDC]: getAppChainBaseUSDCWarpConfig, [WarpRouteIds.BobaBsquaredSwellUBTC]: getBobaBsquaredSwellUBTCWarpConfig, [WarpRouteIds.EthereumZircuitRe7LRT]: getEthereumZircuitRe7LRTWarpConfig, + [WarpRouteIds.EthereumFormUSDT]: getEthereumFormUSDTWarpConfig, + [WarpRouteIds.EthereumFormUSDC]: getEthereumFormUSDCWarpConfig, }; export async function getWarpConfig(