Skip to content

Commit

Permalink
feat: add lumia warp route to infra (#4705)
Browse files Browse the repository at this point in the history
### Description

- Add lumia warp route to infra config
  • Loading branch information
yorhodes authored Oct 28, 2024
1 parent 956ff75 commit f9919c4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
ChainMap,
RouterConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { objMap } from '@hyperlane-xyz/utils';

// Lumia Team
const owner = '0x8bBA07Ddc72455b55530C17e6f6223EF6E156863';

export const getEthereumBscLUMIAWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ethereum = {
type: TokenType.collateral,
token: '0xD9343a049D5DBd89CD19DC6BcA8c48fB3a0a42a7',
};

const bsc = {
type: TokenType.synthetic,
};

const lumia = {
type: TokenType.native,
};

const configMap = {
ethereum,
bsc,
lumia,
};

const merged = objMap(configMap, (chain, config) => ({
...routerConfig[chain],
...config,
owner,
}));

return merged as ChainMap<TokenRouterConfig>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export enum WarpRouteIds {
EthereumVictionUSDC = 'USDC/ethereum-viction',
EthereumVictionUSDT = 'USDT/ethereum-viction',
EthereumZircuitPZETH = 'PZETH/ethereum-zircuit',
EthereumBscLumiaLUMIA = 'LUMIA/bsc-ethereum-lumia',
InevmInjectiveINJ = 'INJ/inevm-injective',
MantapacificNeutronTIA = 'TIA/mantapacific-neutron',
}
2 changes: 2 additions & 0 deletions typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/
import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js';
import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.js';
import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js';
import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.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 @@ -51,6 +52,7 @@ export const warpConfigGetterMap: Record<
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
[WarpRouteIds.EthereumZircuitPZETH]: getRenzoPZETHWarpConfig,
[WarpRouteIds.EthereumBscLumiaLUMIA]: getEthereumBscLUMIAWarpConfig,
[WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig,
[WarpRouteIds.EclipseStrideTIA]: getEclipseStrideTiaWarpConfig,
[WarpRouteIds.EclipseStrideSTTIA]: getEclipseStrideStTiaWarpConfig,
Expand Down

1 comment on commit f9919c4

@IEOTeam
Copy link

Choose a reason for hiding this comment

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

A real feat, finally!

Please sign in to comment.