Skip to content

Commit

Permalink
Deploy stable warp routes to inEVM (hyperlane-xyz#3233)
Browse files Browse the repository at this point in the history
### Description

Deploy USDC and USDT from ethereum to inEVM

### Related issues

- Fixes hyperlane-xyz/issues#1010

### Backward compatibility

Yes

### Testing

- [x] Manul warp UI testing

---------

Co-authored-by: Daniel Savu <[email protected]>
Co-authored-by: J M Rossy <[email protected]>
  • Loading branch information
3 people authored Feb 13, 2024
1 parent d2c2496 commit 66d9b29
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"inevm": {
"router": "0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4"
"HypERC20": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147"
},
"ethereum": {
"HypERC20Collateral": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configs and artifacts for the deployment of Hyperlane Warp Routes
# Between injective and inevm
description: Hyperlane Warp Route artifacts
timestamp: '2024-02-06T16:00:00.000Z'
deployer: Abacus Works (Hyperlane)
data:
config:
ethereum:
protocolType: ethereum
type: collateral
hypAddress: '0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f'
tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' # USDC
name: USDC
symbol: USDC
decimals: 6
inevm:
protocolType: ethereum
type: synthetic
hypAddress: '0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147'
name: USDC
symbol: USDC
decimals: 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configs and artifacts for the deployment of Hyperlane Warp Routes
# Between injective and inevm
description: Hyperlane Warp Route artifacts
timestamp: '2024-02-06T16:00:00.000Z'
deployer: Abacus Works (Hyperlane)
data:
config:
ethereum:
protocolType: ethereum
type: collateral
hypAddress: '0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19'
tokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7' # USDT
name: Tether USD
symbol: USDT
decimals: 6
inevm:
protocolType: ethereum
type: synthetic
hypAddress: '0x97423A68BAe94b5De52d767a17aBCc54c157c0E5'
name: Tether USD
symbol: USDT
decimals: 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"inevm": {
"HypERC20": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147"
},
"ethereum": {
"HypERC20Collateral": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"inevm": {
"HypERC20": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5"
},
"ethereum": {
"HypERC20Collateral": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,32 @@
"address": "0x4221a16A01F61c2b38A03C52d828a7041f6AAA49",
"constructorArguments": "000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239",
"isProxy": false
},
{
"name": "HypERC20Collateral",
"address": "0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19",
"constructorArguments": "000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239",
"isProxy": false
},
{
"name": "HypERC20Collateral",
"address": "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f",
"constructorArguments": "000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c005dc82818d67af737725bd4bf75435d065d239",
"isProxy": false
}
],
"inevm": [
{
"name": "HypERC20",
"address": "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7",
"isProxy": false
},
{
"name": "HypERC20",
"address": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147",
"constructorArguments": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a7",
"isProxy": false
}
]
}
26 changes: 25 additions & 1 deletion typescript/infra/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { prompt } from 'prompts';
import { HelloWorldDeployer } from '@hyperlane-xyz/helloworld';
import {
ChainMap,
HypERC20Deployer,
HyperlaneCore,
HyperlaneCoreDeployer,
HyperlaneDeployer,
Expand All @@ -13,10 +14,12 @@ import {
InterchainAccountDeployer,
InterchainQueryDeployer,
LiquidityLayerDeployer,
TokenType,
} from '@hyperlane-xyz/sdk';
import { objMap } from '@hyperlane-xyz/utils';

import { Contexts } from '../config/contexts';
import { aggregationIsm } from '../config/routingIsm';
import { deployEnvToSdkEnv } from '../src/config/environment';
import { deployWithArtifacts } from '../src/deployment/deploy';
import { TestQuerySenderDeployer } from '../src/deployment/testcontracts/testquerysender';
Expand Down Expand Up @@ -71,7 +74,28 @@ async function main() {
);
deployer = new HyperlaneCoreDeployer(multiProvider, ismFactory);
} else if (module === Modules.WARP) {
throw new Error('Warp is not supported. Use CLI instead.');
const core = HyperlaneCore.fromEnvironment(env, multiProvider);
const ismFactory = HyperlaneIsmFactory.fromAddressesMap(
getAddresses(environment, Modules.PROXY_FACTORY),
multiProvider,
);
const routerConfig = core.getRouterConfig(envConfig.owners);
const inevm = {
...routerConfig.inevm,
type: TokenType.synthetic,
};
const ethereum = {
...routerConfig.ethereum,
type: TokenType.collateral,
token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
hook: '0xb87AC8EA4533AE017604E44470F7c1E550AC6F10', // aggregation of IGP and Merkle, arbitrary config not supported for now
interchainSecurityModule: aggregationIsm('inevm', Contexts.Hyperlane),
};
config = {
inevm,
ethereum,
};
deployer = new HypERC20Deployer(multiProvider, ismFactory);
} else if (module === Modules.INTERCHAIN_GAS_PAYMASTER) {
config = envConfig.igp;
deployer = new HyperlaneIgpDeployer(multiProvider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
.alias('f', 'filePath')
.describe(
'filePath',
'indicate the filepatch to the warp route yaml file relative to typescript/infra',
'indicate the filepath to the warp route yaml file relative to the monorepo root',
)
.demandOption('filePath')
.string('filePath')
Expand Down
4 changes: 2 additions & 2 deletions typescript/infra/scripts/warp-routes/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export async function runWarpRouteHelmCommand(
function getHelmReleaseName(route: string): string {
const match = route.match(/\/([^/]+)-deployments\.yaml$/);
const name = match ? match[1] : route;
return `hyperlane-warp-route-${name}`;
return `hyperlane-warp-route-${name.toLowerCase()}`; // helm requires lower case release names
}

function getWarpRoutesHelmValues(configFilePath: string) {
const values = {
image: {
repository: 'gcr.io/abacus-labs-dev/hyperlane-monorepo',
tag: 'a84e439-20240131-224743',
tag: '4a8f20f-20240207-232324',
},
configFilePath: configFilePath,
};
Expand Down

0 comments on commit 66d9b29

Please sign in to comment.