feat: SVM routes tooling (#4521)

### Description

<!--
What's included in this PR?
-->

### Drive-by changes

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

### Related issues

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

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
pull/4523/head
Daniel Savu 1 month ago committed by GitHub
parent 60ab32e884
commit daa9cbc41c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      typescript/cli/package.json
  2. 33
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumEclipseTETHWarpConfig.ts
  3. 34
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumEclipseUSDCWarpConfig.ts
  4. 6
      typescript/infra/config/warp.ts
  5. 2
      typescript/infra/package.json
  6. 2
      typescript/widgets/package.json
  7. 16
      yarn.lock

@ -5,7 +5,7 @@
"dependencies": {
"@aws-sdk/client-kms": "^3.577.0",
"@aws-sdk/client-s3": "^3.577.0",
"@hyperlane-xyz/registry": "4.1.0",
"@hyperlane-xyz/registry": "4.3.2",
"@hyperlane-xyz/sdk": "5.2.0",
"@hyperlane-xyz/utils": "5.2.0",
"@inquirer/prompts": "^3.0.0",

@ -0,0 +1,33 @@
import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { DEPLOYER } from '../../owners.js';
export const getEthereumEclipseTETHWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
// @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig
const eclipsemainnet: TokenRouterConfig = {
type: TokenType.synthetic,
foreignDeployment: 'BJa3fPvvjKx8gRCWunoSrWBbsmieub37gsGpjp4BfTfW',
gas: 300_000,
};
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
type: TokenType.collateral,
interchainSecurityModule: ethers.constants.AddressZero,
token: '0x19e099B7aEd41FA52718D780dDA74678113C0b32',
};
return {
eclipsemainnet,
ethereum,
};
};

@ -0,0 +1,34 @@
import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import { DEPLOYER } from '../../owners.js';
export const getEthereumEclipseUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
// @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig
const eclipsemainnet: TokenRouterConfig = {
type: TokenType.synthetic,
foreignDeployment: 'D6k6T3G74ij6atCtBiWBs5TbFa1hFVcrFUSGZHuV7q3Z',
gas: 300_000,
};
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
type: TokenType.collateral,
interchainSecurityModule: ethers.constants.AddressZero,
token: tokens.ethereum.USDC,
};
return {
eclipsemainnet,
ethereum,
};
};

@ -11,6 +11,8 @@ import { EnvironmentConfig } from '../src/config/environment.js';
import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js';
import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.js';
import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js';
import { getEthereumEclipseTETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumEclipseTETHWarpConfig.js';
import { getEthereumEclipseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumEclipseUSDCWarpConfig.js';
import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js';
import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js';
import { getEthereumVictionETHWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.js';
@ -27,6 +29,8 @@ export enum WarpRouteIds {
ArbitrumNeutronTIA = 'TIA/arbitrum-neutron',
EthereumInevmUSDC = 'USDC/ethereum-inevm',
EthereumInevmUSDT = 'USDT/ethereum-inevm',
EthereumEclipseTETH = 'tETH/eclipsemainnet-ethereum',
EthereumEclipseUSDC = 'USDC/eclipsemainnet-ethereum-solanamainnet',
EthereumVictionETH = 'ETH/ethereum-viction',
EthereumVictionUSDC = 'USDC/ethereum-viction',
EthereumVictionUSDT = 'USDT/ethereum-viction',
@ -56,6 +60,8 @@ export const warpConfigGetterMap: Record<
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
[WarpRouteIds.EthereumVictionUSDT]: getEthereumVictionUSDTWarpConfig,
[WarpRouteIds.MantapacificNeutronTIA]: getMantapacificNeutronTiaWarpConfig,
[WarpRouteIds.EthereumEclipseTETH]: getEthereumEclipseTETHWarpConfig,
[WarpRouteIds.EthereumEclipseUSDC]: getEthereumEclipseUSDCWarpConfig,
};
export async function getWarpConfig(

@ -14,7 +14,7 @@
"@ethersproject/providers": "^5.7.2",
"@google-cloud/secret-manager": "^5.5.0",
"@hyperlane-xyz/helloworld": "5.2.0",
"@hyperlane-xyz/registry": "4.1.0",
"@hyperlane-xyz/registry": "4.3.2",
"@hyperlane-xyz/sdk": "5.2.0",
"@hyperlane-xyz/utils": "5.2.0",
"@inquirer/prompts": "^5.3.8",

@ -7,7 +7,7 @@
"react-dom": "^18"
},
"dependencies": {
"@hyperlane-xyz/registry": "4.1.0",
"@hyperlane-xyz/registry": "4.3.2",
"@hyperlane-xyz/sdk": "5.2.0"
},
"devDependencies": {

@ -7590,7 +7590,7 @@ __metadata:
"@aws-sdk/client-s3": "npm:^3.577.0"
"@ethersproject/abi": "npm:*"
"@ethersproject/providers": "npm:*"
"@hyperlane-xyz/registry": "npm:4.1.0"
"@hyperlane-xyz/registry": "npm:4.3.2"
"@hyperlane-xyz/sdk": "npm:5.2.0"
"@hyperlane-xyz/utils": "npm:5.2.0"
"@inquirer/prompts": "npm:^3.0.0"
@ -7732,7 +7732,7 @@ __metadata:
"@ethersproject/providers": "npm:^5.7.2"
"@google-cloud/secret-manager": "npm:^5.5.0"
"@hyperlane-xyz/helloworld": "npm:5.2.0"
"@hyperlane-xyz/registry": "npm:4.1.0"
"@hyperlane-xyz/registry": "npm:4.3.2"
"@hyperlane-xyz/sdk": "npm:5.2.0"
"@hyperlane-xyz/utils": "npm:5.2.0"
"@inquirer/prompts": "npm:^5.3.8"
@ -7800,6 +7800,16 @@ __metadata:
languageName: node
linkType: hard
"@hyperlane-xyz/registry@npm:4.3.2":
version: 4.3.2
resolution: "@hyperlane-xyz/registry@npm:4.3.2"
dependencies:
yaml: "npm:2.4.5"
zod: "npm:^3.21.2"
checksum: 7b1ff07074e4499f74a4c75dbbf0b7e641b3610bfc2a67785db724748d887d7b03c9dc9738b790cb56e008d6453789432c863f3b251498f77c931f196b9dab86
languageName: node
linkType: hard
"@hyperlane-xyz/sdk@npm:5.2.0, @hyperlane-xyz/sdk@workspace:typescript/sdk":
version: 0.0.0-use.local
resolution: "@hyperlane-xyz/sdk@workspace:typescript/sdk"
@ -7874,7 +7884,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@hyperlane-xyz/widgets@workspace:typescript/widgets"
dependencies:
"@hyperlane-xyz/registry": "npm:4.1.0"
"@hyperlane-xyz/registry": "npm:4.3.2"
"@hyperlane-xyz/sdk": "npm:5.2.0"
"@storybook/addon-essentials": "npm:^7.6.14"
"@storybook/addon-interactions": "npm:^7.6.14"

Loading…
Cancel
Save