Skip to content

Commit

Permalink
feat: Add USDC to Ink <-> Ethereum (#5139)
Browse files Browse the repository at this point in the history
### Description
Add USDC between Ink and Ethereum

### 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
-->
  • Loading branch information
ltyu authored Jan 9, 2025
1 parent 2d018fa commit 2d4963c
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-cows-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/infra': minor
---

Add USDC between Ink and Ethereum
2 changes: 1 addition & 1 deletion .registryrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8481aeb47ed242783c8dc6ccd366f90a95b471bf
62ccc4da05f48d62a5a0fd5d1498b68b596c627b
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { ethers } from 'ethers';

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

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

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

export const getEthereumInkUSDCConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<HypTokenRouterConfig>> => {
const ethereum: HypTokenRouterConfig = {
...routerConfig.ethereum,
owner: abacusWorksEnvOwnerConfig.ethereum.owner,
proxyAdmin: {
owner: abacusWorksEnvOwnerConfig.ethereum.owner,
address: '0xd702dCed4DDeC529Ea763ddeBD8fb180C4D1843F',
},
type: TokenType.collateral,
token: tokens.ethereum.USDC,
interchainSecurityModule: ISM_CONFIG,
};

const ink: HypTokenRouterConfig = {
...routerConfig.ink,
owner: abacusWorksEnvOwnerConfig.ink.owner,
proxyAdmin: {
owner: abacusWorksEnvOwnerConfig.ink.owner,
address: '0xd9Cc2e652A162bb93173d1c44d46cd2c0bbDA59D',
},
type: TokenType.synthetic,
interchainSecurityModule: ISM_CONFIG,
};

return {
ethereum,
ink,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum WarpRouteIds {
EthereumFlowCbBTC = 'CBBTC/ethereum-flowmainnet',
EthereumInevmUSDC = 'USDC/ethereum-inevm',
EthereumInevmUSDT = 'USDT/ethereum-inevm',
EthereumInkUSDC = 'USDC/ethereum-ink',
EthereumSeiFastUSD = 'FASTUSD/ethereum-sei',
EthereumSeiPumpBTC = 'pumpBTCsei/ethereum-sei',
EthereumVanaETH = 'ETH/ethereum-vana',
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 @@ -32,6 +32,7 @@ import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/conf
import { getEthereumFlowCbBTCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.js';
import { getEthereumInevmUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.js';
import { getEthereumInevmUSDTWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.js';
import { getEthereumInkUSDCConfig } from './environments/mainnet3/warp/configGetters/getEthereumInkUSDCWarpConfig.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';
Expand Down Expand Up @@ -61,6 +62,7 @@ export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig,
[WarpRouteIds.EthereumInkUSDC]: getEthereumInkUSDCConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
[WarpRouteIds.EthereumSeiPumpBTC]: getEthereumSeiPumpBTCWarpConfig,
[WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
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: 'de11906-20241227-214834',
tag: '6da7f6f-20250109-210231',
},
warpRouteId: this.warpRouteId,
fullnameOverride: this.helmReleaseName,
Expand Down

0 comments on commit 2d4963c

Please sign in to comment.