Skip to content

Commit

Permalink
Configure PNDR warp route
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes committed Jan 3, 2025
1 parent 99c91d8 commit f36c1dd
Show file tree
Hide file tree
Showing 5 changed files with 70 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 @@ -22,6 +22,7 @@ import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/
import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.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 @@ -60,6 +61,8 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiSwellTaikoZircuitEZETH]:
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.BscEthereumLumiaPrismPNDR]:
getBscEthereumLumiaPrismPNDRWarpConfig,
[WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
[WarpRouteIds.EthereumSeiPumpBTC]: getEthereumSeiPumpBTCWarpConfig,
Expand Down
17 changes: 17 additions & 0 deletions typescript/infra/pndr-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ethereum:
type: collateral
token: "0x73624d2dEF952C77a1f3B5AD995eef53E49639EC"
owner: "0x9b948CC7CfC4B67262CbbcC37f9d09B61ea6f0E3"
mailbox: "0xc005dc82818d67AF737725bD4bf75435d065D239"
interchainSecurityModule: "0x0000000000000000000000000000000000000000"
bsc:
type: synthetic
owner: "0xA788b57518bBE602ac94CCEE5ae7E4831a546Bfd"
mailbox: "0x2971b9Aec44bE4eb673DF1B88cDB57b96eefe8a4"
interchainSecurityModule: "0x0000000000000000000000000000000000000000"
lumiaprism:
type: synthetic
owner: "0x1C4A50f3E9Bfeb268448D19d0D3fe6d58CB0f7BE"
mailbox: "0x0dF25A2d59F03F039b56E90EdC5B89679Ace28Bc"
interchainSecurityModule: "0x0000000000000000000000000000000000000000"

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',
},
sei: {
fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269',
Expand Down

0 comments on commit f36c1dd

Please sign in to comment.