Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(infra): WIP warp monitor for pumpBTC warp route b/w ethereum<>sei #5004

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { ethers } from 'ethers';

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

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

const ethereumOwner = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba';
const seiOwner = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba';

export const getEthereumSeiPumpBTCWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const ethereum: HypTokenRouterConfig = {
...routerConfig.ethereum,
...getOwnerConfigForAddress(ethereumOwner),
type: TokenType.collateral,
token: tokens.ethereum.pumpBTCsei,
interchainSecurityModule: ethers.constants.AddressZero,
};

const sei: HypTokenRouterConfig = {
...routerConfig.sei,
...getOwnerConfigForAddress(seiOwner),
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
};

return {
ethereum,
sei,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum WarpRouteIds {
EthereumInevmUSDC = 'USDC/ethereum-inevm',
EthereumInevmUSDT = 'USDT/ethereum-inevm',
EthereumSeiFastUSD = 'FASTUSD/ethereum-sei',
EthereumSeiPumpBTC = 'pumpBTCsei/ethereum-sei',
EthereumVictionETH = 'ETH/ethereum-viction',
EthereumVictionUSDC = 'USDC/ethereum-viction',
EthereumVictionUSDT = 'USDT/ethereum-viction',
Expand Down
2 changes: 2 additions & 0 deletions typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/con
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';
import { getEthereumSeiPumpBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiPumpBTCWarpConfig.js';
import { getEthereumVictionETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.js';
import { getEthereumVictionUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.js';
import { getEthereumVictionUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.js';
Expand Down Expand Up @@ -58,6 +59,7 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
[WarpRouteIds.EthereumSeiPumpBTC]: getEthereumSeiPumpBTCWarpConfig,
[WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
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 @@ -12,6 +12,7 @@ export const tokens: ChainMap<Record<string, Address>> = {
USDT: '0xdac17f958d2ee523a2206206994597c13d831ec7',
WBTC: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
weETHs: '0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88',
pumpBTCsei: '0x179149B7E74910d2A58b2a737e1a8B6F44388882',
},
sei: {
fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269',
Expand Down
Loading