feat: add Flow <> Ethereum cbBTC warp route to infra, mild refactor to warp config getters (#4868)

### Description

- Includes the Flow cbBTC warp route getter
(https://github.com/hyperlane-xyz/hyperlane-registry/pull/380)
- Includes the ownership transfer for the weETHs warp route
- Forces config getters to be more explicit about ownership by having
the router config no longer implicitly set owner configs. See
https://discord.com/channels/935678348330434570/1306554055895683113 for
some context. Now you need to explicitly opt into transferring ownership
to our colder setup

### Drive-by changes

- Removes a bunch of ts-ignores that aren't needed in the config getters

### 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/4883/head
Trevor Porter 2 weeks ago committed by GitHub
parent 979bceb660
commit 58425a2de3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      typescript/infra/config/environments/mainnet3/misc-artifacts/velo-message-module-addresses.json
  2. 6
      typescript/infra/config/environments/mainnet3/misc-artifacts/velo-token-bridge-addresses.json
  3. 16
      typescript/infra/config/environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.ts
  4. 27
      typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts
  5. 20
      typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.ts
  6. 14
      typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.ts
  7. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts
  8. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts
  9. 25
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts
  10. 13
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts
  11. 13
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts
  12. 51
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts
  13. 44
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.ts
  14. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.ts
  15. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.ts
  16. 22
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.ts
  17. 9
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.ts
  18. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.ts
  19. 12
      typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.ts
  20. 11
      typescript/infra/config/environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.ts
  21. 8
      typescript/infra/config/environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.ts
  22. 1
      typescript/infra/config/environments/mainnet3/warp/warpIds.ts
  23. 38
      typescript/infra/config/warp.ts
  24. 8
      typescript/infra/src/config/environment.ts
  25. 14
      typescript/infra/src/config/warp.ts
  26. 2
      typescript/infra/src/warp/helm.ts
  27. 6
      typescript/infra/test/warpIds.test.ts

@ -4,5 +4,11 @@
},
"mode": {
"router": "0xF385603a12Be8b7B885222329c581FDD1C30071D"
},
"lisk": {
"router": "0xF385603a12Be8b7B885222329c581FDD1C30071D"
},
"fraxtal": {
"router": "0xF385603a12Be8b7B885222329c581FDD1C30071D"
}
}

@ -4,5 +4,11 @@
},
"mode": {
"router": "0xA7287a56C01ac8Baaf8e7B662bDB41b10889C7A6"
},
"lisk": {
"router": "0xA7287a56C01ac8Baaf8e7B662bDB41b10889C7A6"
},
"fraxtal": {
"router": "0xA7287a56C01ac8Baaf8e7B662bDB41b10889C7A6"
}
}

@ -2,17 +2,21 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
buildAggregationIsmConfigs,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getAncient8EthereumUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ismConfig = buildAggregationIsmConfigs(
'ethereum',
@ -22,6 +26,7 @@ export const getAncient8EthereumUSDCWarpConfig = async (
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDC,
interchainSecurityModule: ismConfig,
@ -31,12 +36,9 @@ export const getAncient8EthereumUSDCWarpConfig = async (
hook: '0x19b2cF952b70b217c90FC408714Fbc1acD29A6A8',
};
// @ts-ignore - The types as they stand require a synthetic to specify
// TokenMetadata, but in practice these are actually inferred from a
// collateral config. To avoid needing to specify the TokenMetadata, just
// ts-ignore for synthetic tokens.
const ancient8: TokenRouterConfig = {
...routerConfig.ancient8,
...abacusWorksEnvOwnerConfig.ancient8,
type: TokenType.synthetic,
// Uses the default ISM
interchainSecurityModule: ethers.constants.AddressZero,

@ -2,49 +2,46 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
// MEV Capital
const arbitrumOwner = '0x008615770B588633265cB01Abd19740fAe67d0B9';
const ethereumOwner = '0x008615770B588633265cB01Abd19740fAe67d0B9';
const zircuitOwner = '0xD0673e7F3FB4037CA79F53d2d311D0e017d39963';
export const getArbitrumEthereumZircuitAmphrETHWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const arbitrum: TokenRouterConfig = {
...routerConfig.arbitrum,
...getOwnerConfigForAddress(arbitrumOwner),
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
owner: arbitrumOwner,
ownerOverrides: {
proxyAdmin: arbitrumOwner,
},
};
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...getOwnerConfigForAddress(ethereumOwner),
type: TokenType.collateral,
token: tokens.ethereum.amphrETH,
owner: ethereumOwner,
interchainSecurityModule: ethers.constants.AddressZero,
ownerOverrides: {
proxyAdmin: ethereumOwner,
},
};
const zircuit: TokenRouterConfig = {
...routerConfig.zircuit,
...getOwnerConfigForAddress(zircuitOwner),
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
owner: zircuitOwner,
ownerOverrides: {
proxyAdmin: zircuitOwner,
},
};
return {

@ -1,23 +1,36 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
// Eclipse Fi team
const arbitrumOwner = '0xfF07222cb0AC905304d6586Aabf13f497C07F0C8';
const neutronOwner =
'neutron1aud8lty0wwmyc86ugkzqrusnrku0ckm0ym62v4ve0jjjyepjjg6spssrwj';
export const getArbitrumNeutronEclipWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const neutronRouter =
'6b04c49fcfd98bc4ea9c05cd5790462a39537c00028333474aebe6ddf20b73a3';
// @ts-ignore - foreignDeployment configs dont conform to the TokenRouterConfig
const neutron: TokenRouterConfig = {
...routerConfig.neutron,
...getOwnerConfigForAddress(neutronOwner),
type: TokenType.collateral,
token: 'factory/neutron10sr06r3qkhn7xzpw3339wuj77hu06mzna6uht0/eclip',
foreignDeployment: neutronRouter,
};
const arbitrum: TokenRouterConfig = {
...routerConfig.arbitrum,
...getOwnerConfigForAddress(arbitrumOwner),
type: TokenType.synthetic,
name: 'Eclipse Fi',
symbol: 'ECLIP',
@ -25,7 +38,6 @@ export const getArbitrumNeutronEclipWarpConfig = async (
totalSupply: 0,
gas: 600_000,
interchainSecurityModule: '0x676151bFB8D29690a359F99AE764860595504689', // This has diverged from the default ism on neutron, we cannot change as it is owned by the Eclip team
owner: '0xfF07222cb0AC905304d6586Aabf13f497C07F0C8', // Eclip team
};
return {

@ -1,23 +1,31 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
export const getArbitrumNeutronTiaWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const neutronRouter =
'910926c4cf95d107237a9cf0b3305fe9c81351ebcba3d218ceb0e4935d92ceac';
// @ts-ignore - foreignDeployment configs dont conform to the TokenRouterConfig
const neutron: TokenRouterConfig = {
...routerConfig.neutron,
...abacusWorksEnvOwnerConfig.neutron,
type: TokenType.collateral,
token:
'ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7',
foreignDeployment: neutronRouter,
};
const arbitrum: TokenRouterConfig = {
...routerConfig.arbitrum,
...abacusWorksEnvOwnerConfig.arbitrum,
type: TokenType.synthetic,
name: 'TIA',
symbol: 'TIA.n',

@ -2,18 +2,23 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEclipseEthereumSolanaUSDTWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const eclipsemainnet: TokenRouterConfig = {
...routerConfig.eclipsemainnet,
...abacusWorksEnvOwnerConfig.eclipsemainnet,
type: TokenType.synthetic,
foreignDeployment: '5g5ujyYUNvdydwyDVCpZwPpgYRqH5RYJRi156cxyE3me',
gas: 300_000,
@ -21,6 +26,7 @@ export const getEclipseEthereumSolanaUSDTWarpConfig = async (
};
let ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDT,
interchainSecurityModule: ethers.constants.AddressZero,

@ -2,18 +2,23 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEclipseEthereumWBTCWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const eclipsemainnet: TokenRouterConfig = {
...routerConfig.eclipsemainnet,
...abacusWorksEnvOwnerConfig.eclipsemainnet,
type: TokenType.synthetic,
foreignDeployment: 'A7EGCDYFw5R7Jfm6cYtKvY8dmkrYMgwRCJFkyQwpHTYu',
gas: 300_000,
@ -22,6 +27,7 @@ export const getEclipseEthereumWBTCWarpConfig = async (
let ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.WBTC,
interchainSecurityModule: ethers.constants.AddressZero,

@ -2,19 +2,30 @@ import { ethers } from 'ethers';
import {
ChainMap,
OwnableConfig,
RouterConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import { DEPLOYER } from '../../owners.js';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
// Safe owned by Veda
const ethereumOwner = '0xCEA8039076E35a825854c5C2f85659430b06ec96';
// Vault owned by Veda
const eclipseOwner = '4Cj1s2ipALjJk9foQV4oDaZYCZwSsVkAShQL1KFVJG9b';
export const getEclipseEthereumWeEthsWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
export async function getEclipseEthereumWeEthsWarpConfig(
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> {
const eclipsemainnet: TokenRouterConfig = {
...routerConfig.eclipsemainnet,
...getOwnerConfigForAddress(eclipseOwner),
type: TokenType.synthetic,
foreignDeployment: '7Zx4wU1QAw98MfvnPFqRh1oyumek7G5VAX6TKB3U1tcn',
gas: 300_000,
@ -23,14 +34,14 @@ export const getEclipseEthereumWeEthsWarpConfig = async (
let ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...getOwnerConfigForAddress(ethereumOwner),
type: TokenType.collateral,
token: tokens.ethereum.weETHs,
interchainSecurityModule: ethers.constants.AddressZero,
owner: DEPLOYER,
};
return {
eclipsemainnet,
ethereum,
};
};
}

@ -1,15 +1,23 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
// Stride team
const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh';
export const getEclipseStrideTiaWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const eclipsemainnet: TokenRouterConfig = {
...routerConfig.eclipsemainnet,
...abacusWorksEnvOwnerConfig.eclipsemainnet,
type: TokenType.synthetic,
foreignDeployment: 'BpXHAiktwjx7fN6M9ST9wr6qKAsH27wZFhdHEhReJsR6',
gas: 300_000,
@ -17,6 +25,7 @@ export const getEclipseStrideTiaWarpConfig = async (
const stride: TokenRouterConfig = {
...routerConfig.stride,
...getOwnerConfigForAddress(strideOwner),
type: TokenType.collateral,
foreignDeployment:
'stride1pvtesu3ve7qn7ctll2x495mrqf2ysp6fws68grvcu6f7n2ajghgsh2jdj6',

@ -1,15 +1,23 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
// Stride team
const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh';
export const getEclipseStrideStTiaWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const eclipsemainnet: TokenRouterConfig = {
...routerConfig.eclipsemainnet,
...abacusWorksEnvOwnerConfig.eclipsemainnet,
type: TokenType.synthetic,
foreignDeployment: 'tKUHyJ5NxhnwU94JUmzh1ekukDcHHX8mZF6fqxbMwX6',
gas: 300_000,
@ -17,6 +25,7 @@ export const getEclipseStrideStTiaWarpConfig = async (
const stride: TokenRouterConfig = {
...routerConfig.stride,
...getOwnerConfigForAddress(strideOwner),
type: TokenType.collateral,
foreignDeployment:
'stride134axwdlam929m3mar3wv95nvkyep7mr87ravkqcpf8dfe3v0pjlqwrw6ee',

@ -1,59 +1,50 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { objMap } from '@hyperlane-xyz/utils';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
// Lumia Team
const owner = '0x8bBA07Ddc72455b55530C17e6f6223EF6E156863';
const ownerConfig = {
owner,
// The proxyAdmins are warp-route specific
ownerOverrides: {
proxyAdmin: owner,
},
};
const ownerConfig = getOwnerConfigForAddress(owner);
export const getEthereumBscLUMIAWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ethereum = {
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...ownerConfig,
type: TokenType.collateral,
token: '0xD9343a049D5DBd89CD19DC6BcA8c48fB3a0a42a7',
ownerOverrides: {
proxyAdmin: owner,
},
};
const bsc = {
const bsc: TokenRouterConfig = {
...routerConfig.bsc,
...ownerConfig,
type: TokenType.synthetic,
ownerOverrides: {
proxyAdmin: owner,
},
};
const lumia = {
const lumia: TokenRouterConfig = {
...routerConfig.lumia,
...ownerConfig,
type: TokenType.native,
// As this has been removed from the registry in https://github.com/hyperlane-xyz/hyperlane-registry/pull/348,
// we must specify this explicitly.
mailbox: '0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7',
proxyAdmin: '0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D',
proxyAdmin: {
owner: owner,
address: '0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D',
},
};
const configMap = {
return {
ethereum,
bsc,
lumia,
};
const merged = objMap(configMap, (chain, config) => ({
...routerConfig[chain],
...config,
...ownerConfig,
}));
return merged as ChainMap<TokenRouterConfig>;
};

@ -0,0 +1,44 @@
import { ethers } from 'ethers';
import {
ChainMap,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
import { DEPLOYER } from '../../owners.js';
// Keep on our deployer for now until we get an address from Flow
const owner = DEPLOYER;
const ownerConfig = getOwnerConfigForAddress(owner);
export const getEthereumFlowCbBTCWarpConfig = async (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...ownerConfig,
type: TokenType.collateral,
token: tokens.ethereum.cbBTC,
interchainSecurityModule: ethers.constants.AddressZero,
};
const flowmainnet: TokenRouterConfig = {
...routerConfig.flowmainnet,
...ownerConfig,
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
};
return {
ethereum,
flowmainnet,
};
};

@ -2,18 +2,23 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEthereumInevmUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDC,
hook: '0xb87AC8EA4533AE017604E44470F7c1E550AC6F10', // aggregation of IGP and Merkle, arbitrary config not supported for now, TODO: may want to move to zero address in future
@ -21,6 +26,7 @@ export const getEthereumInevmUSDCWarpConfig = async (
const inevm: TokenRouterConfig = {
...routerConfig.inevm,
...abacusWorksEnvOwnerConfig.inevm,
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
};

@ -2,18 +2,23 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEthereumInevmUSDTWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDT,
hook: '0xb87AC8EA4533AE017604E44470F7c1E550AC6F10', // aggregation of IGP and Merkle, arbitrary config not supported for now, TODO: may want to move to zero address in future
@ -21,6 +26,7 @@ export const getEthereumInevmUSDTWarpConfig = async (
const inevm: TokenRouterConfig = {
...routerConfig.inevm,
...abacusWorksEnvOwnerConfig.inevm,
type: TokenType.synthetic,
interchainSecurityModule: ethers.constants.AddressZero,
};

@ -2,42 +2,42 @@ import { ethers } from 'ethers';
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import { getOwnerConfigForAddress } from '../../../../../src/config/environment.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
// Elixir
const owner = '0x00000000F51340906F767C6999Fe512b1275955C';
const ownerConfig = getOwnerConfigForAddress(owner);
export const getEthereumSeiFastUSDWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
_abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const sei: TokenRouterConfig = {
...routerConfig.viction,
...ownerConfig,
type: TokenType.XERC20,
name: 'fastUSD',
symbol: 'fastUSD',
decimals: 18,
token: tokens.sei.fastUSD,
interchainSecurityModule: ethers.constants.AddressZero,
owner,
ownerOverrides: {
proxyAdmin: owner,
},
};
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...ownerConfig,
type: TokenType.collateral,
token: tokens.ethereum.deUSD,
owner,
interchainSecurityModule: ethers.constants.AddressZero,
ownerOverrides: {
proxyAdmin: owner,
},
};
return {

@ -1,14 +1,17 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
buildAggregationIsmConfigs,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
export const getEthereumVictionETHWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ismConfig = buildAggregationIsmConfigs(
'ethereum',
@ -18,6 +21,7 @@ export const getEthereumVictionETHWarpConfig = async (
const viction: TokenRouterConfig = {
...routerConfig.viction,
...abacusWorksEnvOwnerConfig.viction,
type: TokenType.synthetic,
name: 'ETH',
symbol: 'ETH',
@ -28,6 +32,7 @@ export const getEthereumVictionETHWarpConfig = async (
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.native,
gas: 65_000,
interchainSecurityModule: ismConfig,

@ -1,16 +1,20 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
buildAggregationIsmConfigs,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEthereumVictionUSDCWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
// commit that the config was copied from https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/3067/commits/7ed5b460034ea5e140c6ff86bcd6baf6ebb824c4#diff-fab5dd1a27c76e4310699c57ccf92ab6274ef0acf17e079b17270cedf4057775R109
const ismConfig = buildAggregationIsmConfigs(
@ -21,6 +25,7 @@ export const getEthereumVictionUSDCWarpConfig = async (
const viction: TokenRouterConfig = {
...routerConfig.viction,
...abacusWorksEnvOwnerConfig.viction,
type: TokenType.synthetic,
name: 'USDC',
symbol: 'USDC',
@ -31,6 +36,7 @@ export const getEthereumVictionUSDCWarpConfig = async (
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDC,
gas: 65_000,

@ -1,16 +1,20 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
buildAggregationIsmConfigs,
defaultMultisigConfigs,
} from '@hyperlane-xyz/sdk';
import { tokens } from '../../../../../src/config/warp.js';
import {
RouterConfigWithoutOwner,
tokens,
} from '../../../../../src/config/warp.js';
export const getEthereumVictionUSDTWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const ismConfig = buildAggregationIsmConfigs(
'ethereum',
@ -20,6 +24,7 @@ export const getEthereumVictionUSDTWarpConfig = async (
const viction: TokenRouterConfig = {
...routerConfig.viction,
...abacusWorksEnvOwnerConfig.viction,
type: TokenType.synthetic,
name: 'USDT',
symbol: 'USDT',
@ -30,6 +35,7 @@ export const getEthereumVictionUSDTWarpConfig = async (
const ethereum: TokenRouterConfig = {
...routerConfig.ethereum,
...abacusWorksEnvOwnerConfig.ethereum,
type: TokenType.collateral,
token: tokens.ethereum.USDT,
gas: 65_000,

@ -1,23 +1,28 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
export const getInevmInjectiveINJWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const injectiveRouter = 'inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k';
// @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig
const injective: TokenRouterConfig = {
...routerConfig.injective,
...abacusWorksEnvOwnerConfig.injective,
type: TokenType.native,
foreignDeployment: injectiveRouter,
};
const inevm: TokenRouterConfig = {
...routerConfig.inevm,
...abacusWorksEnvOwnerConfig.inevm,
type: TokenType.native,
};

@ -1,12 +1,15 @@
import {
ChainMap,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
TokenType,
} from '@hyperlane-xyz/sdk';
import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js';
export const getMantapacificNeutronTiaWarpConfig = async (
routerConfig: ChainMap<RouterConfig>,
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
): Promise<ChainMap<TokenRouterConfig>> => {
const neutronRouter =
'0xc5fc6899019cb4a7649981d89eb7b1a0929d0a85b2d41802f3315129ad4b581a';
@ -18,6 +21,7 @@ export const getMantapacificNeutronTiaWarpConfig = async (
const mantapacific: TokenRouterConfig = {
...routerConfig.mantapacific,
...abacusWorksEnvOwnerConfig.mantapacific,
type: TokenType.synthetic,
name: 'TIA',
symbol: 'TIA',

@ -15,6 +15,7 @@ export enum WarpRouteIds {
EclipseSolanaWIF = 'WIF/eclipsemainnet-solanamainnet',
EclipseStrideSTTIA = 'stTIA/eclipsemainnet-stride',
EclipseStrideTIA = 'TIA/eclipsemainnet-stride',
EthereumFlowCbBTC = 'CBBTC/ethereum-flowmainnet',
EthereumInevmUSDC = 'USDC/ethereum-inevm',
EthereumInevmUSDT = 'USDT/ethereum-inevm',
EthereumSeiFastUSD = 'FASTUSD/ethereum-sei',

@ -1,15 +1,16 @@
import {
ChainMap,
MultiProvider,
RouterConfig,
OwnableConfig,
TokenRouterConfig,
} from '@hyperlane-xyz/sdk';
import { objMap } from '@hyperlane-xyz/utils';
import { getHyperlaneCore } from '../scripts/core-utils.js';
import {
EnvironmentConfig,
getRouterConfigsForAllVms,
} from '../src/config/environment.js';
import { RouterConfigWithoutOwner } from '../src/config/warp.js';
import { getAncient8EthereumUSDCWarpConfig } from './environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.js';
import { getArbitrumEthereumZircuitAmphrETHWarpConfig } from './environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.js';
@ -21,6 +22,7 @@ import { getEclipseEthereumWeEthsWarpConfig } from './environments/mainnet3/warp
import { getEclipseStrideTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.js';
import { getEclipseStrideStTiaWarpConfig } from './environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.js';
import { getEthereumBscLUMIAWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.js';
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 { getEthereumSeiFastUSDWarpConfig } from './environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.js';
@ -33,16 +35,12 @@ import { getRenzoEZETHWarpConfig } from './environments/mainnet3/warp/configGett
import { getRenzoPZETHWarpConfig } from './environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.js';
import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js';
type WarpConfigGetterWithConfig = (
routerConfig: ChainMap<RouterConfig>,
type WarpConfigGetter = (
routerConfig: ChainMap<RouterConfigWithoutOwner>,
abacusWorksEnvOwnerConfig: ChainMap<OwnableConfig>,
) => Promise<ChainMap<TokenRouterConfig>>;
type WarpConfigGetterWithoutConfig = () => Promise<ChainMap<TokenRouterConfig>>;
export const warpConfigGetterMap: Record<
string,
WarpConfigGetterWithConfig | WarpConfigGetterWithoutConfig
> = {
export const warpConfigGetterMap: Record<string, WarpConfigGetter> = {
[WarpRouteIds.Ancient8EthereumUSDC]: getAncient8EthereumUSDCWarpConfig,
[WarpRouteIds.ArbitrumEthereumZircuitAMPHRETH]:
getArbitrumEthereumZircuitAmphrETHWarpConfig,
@ -53,6 +51,7 @@ export const warpConfigGetterMap: Record<
[WarpRouteIds.ArbitrumBaseBlastBscEthereumFraxtalLineaModeOptimismSeiTaikoZircuitEZETH]:
getRenzoEZETHWarpConfig,
[WarpRouteIds.InevmInjectiveINJ]: getInevmInjectiveINJWarpConfig,
[WarpRouteIds.EthereumFlowCbBTC]: getEthereumFlowCbBTCWarpConfig,
[WarpRouteIds.EthereumSeiFastUSD]: getEthereumSeiFastUSDWarpConfig,
[WarpRouteIds.EthereumVictionETH]: getEthereumVictionETHWarpConfig,
[WarpRouteIds.EthereumVictionUSDC]: getEthereumVictionUSDCWarpConfig,
@ -77,6 +76,19 @@ export async function getWarpConfig(
envConfig,
multiProvider,
);
// Strip the owners from the router config
const routerConfigWithoutOwner = objMap(routerConfig, (_chain, config) => {
const { owner, ownerOverrides, ...configWithoutOwner } = config;
return configWithoutOwner;
});
// Isolate the owners from the router config
const abacusWorksEnvOwnerConfig = objMap(routerConfig, (_chain, config) => {
const { owner, ownerOverrides } = config;
return {
owner,
ownerOverrides,
};
});
const warpConfigGetter = warpConfigGetterMap[warpRouteId];
if (!warpConfigGetter) {
@ -87,9 +99,5 @@ export async function getWarpConfig(
);
}
if (warpConfigGetter.length === 1) {
return warpConfigGetter(routerConfig);
} else {
return (warpConfigGetter as WarpConfigGetterWithoutConfig)();
}
return warpConfigGetter(routerConfigWithoutOwner, abacusWorksEnvOwnerConfig);
}

@ -104,3 +104,11 @@ export async function getRouterConfigsForAllVms(
// Merge, giving evmRouterConfig precedence
return objMerge(allRouterConfigs, evmRouterConfig);
}
export function getOwnerConfigForAddress(owner: string): OwnableConfig {
return {
owner,
// To ensure that any other overrides aren't applied
ownerOverrides: {},
};
}

@ -1,13 +1,19 @@
import { ChainMap } from '@hyperlane-xyz/sdk';
import {
ChainMap,
OwnableConfig,
RouterConfig,
TokenRouterConfig,
} from '@hyperlane-xyz/sdk';
import { Address } from '@hyperlane-xyz/utils';
// Common collateral tokens to be used by warp route deployments.
export const tokens: ChainMap<Record<string, Address>> = {
ethereum: {
amphrETH: '0x5fD13359Ba15A84B76f7F87568309040176167cd',
cbBTC: '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf',
deUSD: '0x15700B564Ca08D9439C58cA5053166E8317aa138',
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
USDT: '0xdac17f958d2ee523a2206206994597c13d831ec7',
deUSD: '0x15700B564Ca08D9439C58cA5053166E8317aa138',
amphrETH: '0x5fD13359Ba15A84B76f7F87568309040176167cd',
WBTC: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
weETHs: '0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88',
},
@ -15,3 +21,5 @@ export const tokens: ChainMap<Record<string, Address>> = {
fastUSD: '0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269',
},
};
export type RouterConfigWithoutOwner = Omit<RouterConfig, keyof OwnableConfig>;

@ -22,7 +22,7 @@ export class WarpRouteMonitorHelmManager extends HelmManager {
return {
image: {
repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: '7544b99-20241119-162215',
tag: '4d0de30-20241119-171012',
},
warpRouteId: this.warpRouteId,
fullnameOverride: this.helmReleaseName,

@ -8,8 +8,10 @@ describe('Warp IDs', () => {
const registry = getRegistry();
for (const warpId of Object.values(WarpRouteIds)) {
// That's a long sentence!
expect(registry.getWarpRoute(warpId), `Warp ID ${warpId} not in registry`)
.to.not.be.null.and.not.be.undefined;
expect(
registry.getWarpRoute(warpId),
`Warp ID ${warpId} not in registry, the .registryrc or your local registry may be out of date`,
).to.not.be.null.and.not.be.undefined;
}
});
});

Loading…
Cancel
Save