Skip to content

Commit

Permalink
feat: artela-base warp route configs (#5169)
Browse files Browse the repository at this point in the history
### Description

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

- Add `USDC/artela-base` warp route config
- Add `WETH/artela-base` warp route config

[Related registry
PR](hyperlane-xyz/hyperlane-registry#488)

### Drive-by changes

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

### 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
-->
Yes
### Testing

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

None/Manual/Unit Tests
-->
CLI
  • Loading branch information
Xaroz authored Jan 15, 2025
1 parent aad2c2d commit 28becff
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-lamps-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/infra': minor
---

Add Artela/Base USDC and WETH warp route config
2 changes: 1 addition & 1 deletion .registryrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
195c073c3c34b234c8d0aed2a16962a2d3945354
47aba98bdd78ecb5a3f756dca6dc2e28325bab43
2 changes: 1 addition & 1 deletion rust/main/config/mainnet_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7372,7 +7372,7 @@
"blockExplorers": [
{
"apiUrl": "https://artscan.artela.network/api",
"family": "other",
"family": "blockscout",
"name": "Artela Explorer",
"url": "https://artscan.artela.network"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ethers } from 'ethers';

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

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

const artelaOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd';
const baseOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd';

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

export const getArtelaBaseUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const artela: HypTokenRouterConfig = {
...routerConfig.artela,
owner: artelaOwner,
type: TokenType.synthetic,
symbol: 'USDC.a',
interchainSecurityModule: ISM_CONFIG,
};

const base: HypTokenRouterConfig = {
...routerConfig.base,
owner: baseOwner,
type: TokenType.collateral,
token: tokens.base.USDC,
interchainSecurityModule: ISM_CONFIG,
};

return {
artela,
base,
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ethers } from 'ethers';

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

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

const artelaOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd';
const baseOwner = '0x801e8135867D65e742eb070A9fC0aD9c2f69B4cd';

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

export const getArtelaBaseWETHWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const artela: HypTokenRouterConfig = {
...routerConfig.artela,
owner: artelaOwner,
type: TokenType.synthetic,
symbol: 'WETH.a',
interchainSecurityModule: ISM_CONFIG,
};

const base: HypTokenRouterConfig = {
...routerConfig.base,
owner: baseOwner,
type: TokenType.collateral,
token: tokens.base.WETH,
interchainSecurityModule: ISM_CONFIG,
};

return {
artela,
base,
};
};
2 changes: 2 additions & 0 deletions typescript/infra/config/environments/mainnet3/warp/warpIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export enum WarpRouteIds {
EthereumFormWSTETH = 'WSTETH/ethereum-form',
BaseFormAIXBT = 'AIXBT/base-form',
BaseFormGAME = 'GAME/base-form',
ArtelaBaseUSDC = 'USDC/artela-base',
ArtelaBaseWETH = 'WETH/artela-base',
SolanaSoonBonk = 'Bonk/solanamainnet-soon',
SolanaSoonSOL = 'SOL/solanamainnet-soon',
}
4 changes: 4 additions & 0 deletions typescript/infra/config/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig } f
import { getArbitrumEthereumZircuitAmphrETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.js';
import { getArbitrumNeutronEclipWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.js';
import { getArbitrumNeutronTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.js';
import { getArtelaBaseUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getArtelaBaseUSDCWarpConfig.js';
import { getArtelaBaseWETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArtelaBaseWETHWarpConfig.js';
import { getBaseFormAIXBTWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseFormAIXBTWarpConfig.js';
import { getBaseFormGAMEWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseFormGAMEWarpConfig.js';
import { getBaseZeroNetworkCBBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.js';
Expand Down Expand Up @@ -111,6 +113,8 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.EthereumFormWSTETH]: getEthereumFormWSTETHWarpConfig,
[WarpRouteIds.BaseFormAIXBT]: getBaseFormAIXBTWarpConfig,
[WarpRouteIds.BaseFormGAME]: getBaseFormGAMEWarpConfig,
[WarpRouteIds.ArtelaBaseUSDC]: getArtelaBaseUSDCWarpConfig,
[WarpRouteIds.ArtelaBaseWETH]: getArtelaBaseWETHWarpConfig,
};

export async function getWarpConfig(
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 @@ -26,6 +26,7 @@ export const tokens: ChainMap<Record<string, Address>> = {
USDC: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
AIXBT: '0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825',
GAME: '0x1C4CcA7C5DB003824208aDDA61Bd749e55F463a3',
WETH: '0x4200000000000000000000000000000000000006',
},
bsquared: {
uBTC: '0x796e4D53067FF374B89b2Ac101ce0c1f72ccaAc2',
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/src/warp/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class WarpRouteMonitorHelmManager extends HelmManager {
return {
image: {
repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: '702c800-20250113-210127',
tag: 'b18ab47-20250114-203624',
},
warpRouteId: this.warpRouteId,
fullnameOverride: this.helmReleaseName,
Expand Down

0 comments on commit 28becff

Please sign in to comment.