Skip to content

Commit

Permalink
feat: configure PNDR warp route (#5104)
Browse files Browse the repository at this point in the history
### Description

configure PNDR warp route 

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

Yes

### Testing

Manual
  • Loading branch information
yorhodes authored Jan 14, 2025
1 parent b505997 commit fd255ef
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { ethers } from 'ethers';

import { ChainMap, HypTokenRouterConfig, TokenType } from '@hyperlane-xyz/sdk';

import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';

const owners = {
ethereum: '0x9b948CC7CfC4B67262CbbcC37f9d09B61ea6f0E3',
bsc: '0xA788b57518bBE602ac94CCEE5ae7E4831a546Bfd',
lumiaprism: '0x1C4A50f3E9Bfeb268448D19d0D3fe6d58CB0f7BE',
};

const ISM_CONFIG = ethers.constants.AddressZero; // Default ISM

export const getBscEthereumLumiaPrismPNDRWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const ethereum: HypTokenRouterConfig = {
...routerConfig.ethereum,
owner: owners.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.PNDR,
interchainSecurityModule: ISM_CONFIG,
};

const bsc: HypTokenRouterConfig = {
...routerConfig.bsc,
owner: owners.bsc,
type: TokenType.synthetic,
interchainSecurityModule: ISM_CONFIG,
};

const lumiaprism: HypTokenRouterConfig = {
...routerConfig.lumiaprism,
owner: owners.lumiaprism,
type: TokenType.synthetic,
interchainSecurityModule: ISM_CONFIG,
};

return {
ethereum,
bsc,
lumiaprism,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum WarpRouteIds {
ArbitrumNeutronEclip = 'ECLIP/arbitrum-neutron',
ArbitrumNeutronTIA = 'TIA/arbitrum-neutron',
ArbitrumTreasureMAGIC = 'MAGIC/arbitrum-treasure',
BscEthereumLumiaPrismPNDR = 'PNDR/bsc-ethereum-lumiaprism',
EclipseEthereumApxEth = 'APXETH/eclipsemainnet-ethereum',
EclipseEthereumSolanaUSDC = 'USDC/eclipsemainnet-ethereum-solanamainnet',
EclipseEthereumSolanaUSDT = 'USDT/eclipsemainnet-ethereum-solanamainnet',
Expand Down
3 changes: 3 additions & 0 deletions typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { getBaseFormAIXBTWarpConfig } from './environments/mainnet3/warp/configG
import { getBaseFormGAMEWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseFormGAMEWarpConfig.js';
import { getBaseZeroNetworkCBBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.js';
import { getBobaBsquaredSwellUBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getBobaBsquaredSwellUBTCWarpConfig.js';
import { getBscEthereumLumiaPrismPNDRWarpConfig } from './environments/mainnet3/warp/configGetters/getBscEthereumLumiaPNDRWarpConfig.js';
import { getEclipseEthereumApxEthWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.js';
import { getEclipseEthereumSolanaUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.js';
import { getEclipseEthereumWBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.js';
Expand Down Expand Up @@ -70,6 +71,8 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH]:
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.BscEthereumLumiaPrismPNDR]:
getBscEthereumLumiaPrismPNDRWarpConfig,
[WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig,
[WarpRouteIds.EthereumInkUSDC]: getEthereumInkUSDCConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
Expand Down
1 change: 1 addition & 0 deletions typescript/infra/src/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const tokens: ChainMap<Record<string, Address>> = {
weETHs: '0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88',
pumpBTCsei: '0xe9ebd666954B7F0B5B044704c86B126651f6235d',
Re7LRT: '0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a',
PNDR: '0x73624d2dEF952C77a1f3B5AD995eef53E49639EC',
rstETH: '0x7a4EffD87C2f3C55CA251080b1343b605f327E3a',
WSTETH: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
},
Expand Down

0 comments on commit fd255ef

Please sign in to comment.