Skip to content

Commit

Permalink
feat: deploy ETH warp route between plumetestnet and sepolia (#3285)
Browse files Browse the repository at this point in the history
### Description

PlumeTestnet <> Sepolia (Synthetic vs Native)


### Drive-by changes

Added artifacts to core deployment for sepolia for adding plume which I
missed in the original core deployment PR.

### Related issues

- fixes hyperlane-xyz/issues#1014

### Backward compatibility

Yes

### Testing

Manual
  • Loading branch information
aroralanuk authored Feb 21, 2024
1 parent c47ebdb commit 909b1ed
Show file tree
Hide file tree
Showing 9 changed files with 2,073 additions and 2,296 deletions.
820 changes: 261 additions & 559 deletions rust/config/testnet4_config.json

Large diffs are not rendered by default.

3,152 changes: 1,582 additions & 1,570 deletions typescript/infra/config/environments/testnet4/core/verification.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plumetestnet": {
"router": "0xD356C996277eFb7f75Ee8bd61b31cC781A12F54f"
},
"sepolia": {
"router": "0xd99eA1D8b9542D35252504DDd59EDe8C43FB15fd"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@
"constructorArguments": "00000000000000000000000049cfd6ef774acab14814d699e3f7ee36fdfba932",
"isProxy": false
}
],
"plumetestnet": [
{
"name": "HypERC20",
"address": "0xD356C996277eFb7f75Ee8bd61b31cC781A12F54f",
"constructorArguments": "000000000000000000000000000000000000000000000000000000000000001200000000000000000000000033db966328ea213b0f76ef96ca368ab37779f065",
"isProxy": false
}
],
"sepolia": [
{
"name": "HypNative",
"address": "0xd99eA1D8b9542D35252504DDd59EDe8C43FB15fd",
"constructorArguments": "000000000000000000000000ffaef09b3cd11d9b20d1a19becca54eec2884766",
"isProxy": false
}
]
}
2 changes: 2 additions & 0 deletions typescript/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"asn1.js": "5.4.1",
"aws-kms-ethers-signer": "^0.1.3",
"dotenv": "^10.0.0",
"json-stable-stringify": "^1.1.1",
"prom-client": "^14.0.1",
"prompts": "^2.4.2",
"yargs": "^17.7.2"
Expand All @@ -30,6 +31,7 @@
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@types/chai": "^4.2.21",
"@types/json-stable-stringify": "^1.0.36",
"@types/mocha": "^10.0.1",
"@types/node": "^16.9.1",
"@types/prompts": "^2.0.14",
Expand Down
25 changes: 15 additions & 10 deletions typescript/infra/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,25 @@ async function main() {
multiProvider,
);
const routerConfig = core.getRouterConfig(envConfig.owners);
const inevm = {
...routerConfig.inevm,
const plumetestnet = {
...routerConfig.plumetestnet,
type: TokenType.synthetic,
name: 'Wrapped Ether',
symbol: 'WETH',
decimals: 18,
totalSupply: '0',
};
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),
const sepolia = {
...routerConfig.sepolia,
type: TokenType.native,
interchainSecurityModule: aggregationIsm(
'plumetestnet',
Contexts.Hyperlane,
),
};
config = {
inevm,
ethereum,
plumetestnet,
sepolia,
};
deployer = new HypERC20Deployer(multiProvider, ismFactory);
} else if (module === Modules.INTERCHAIN_GAS_PAYMASTER) {
Expand Down
3 changes: 2 additions & 1 deletion typescript/infra/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as asn1 from 'asn1.js';
import { exec } from 'child_process';
import { ethers } from 'ethers';
import fs from 'fs';
import stringify from 'json-stable-stringify';
import path from 'path';
import { parse as yamlParse } from 'yaml';

Expand Down Expand Up @@ -179,7 +180,7 @@ export function writeJsonAtPath(filepath: string, obj: any) {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
fs.writeFileSync(filepath, JSON.stringify(obj, null, 2) + '\n');
fs.writeFileSync(filepath, stringify(obj, { space: ' ' }) + '\n');
}

export function writeJSON(directory: string, filename: string, obj: any) {
Expand Down
315 changes: 159 additions & 156 deletions typescript/sdk/src/consts/environments/testnet.json

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4354,6 +4354,7 @@ __metadata:
"@safe-global/protocol-kit": "npm:^1.2.0"
"@solana/web3.js": "npm:^1.78.0"
"@types/chai": "npm:^4.2.21"
"@types/json-stable-stringify": "npm:^1.0.36"
"@types/mocha": "npm:^10.0.1"
"@types/node": "npm:^16.9.1"
"@types/prompts": "npm:^2.0.14"
Expand All @@ -4366,6 +4367,7 @@ __metadata:
ethereum-waffle: "npm:^4.0.10"
ethers: "npm:^5.7.2"
hardhat: "npm:^2.19.0"
json-stable-stringify: "npm:^1.1.1"
mocha: "npm:^10.2.0"
prettier: "npm:^2.8.8"
prom-client: "npm:^14.0.1"
Expand Down Expand Up @@ -5985,6 +5987,13 @@ __metadata:
languageName: node
linkType: hard

"@types/json-stable-stringify@npm:^1.0.36":
version: 1.0.36
resolution: "@types/json-stable-stringify@npm:1.0.36"
checksum: 765b07589e11a3896c3d06bb9e3a9be681e7edd95adf27370df0647a91bd2bfcfaf0e091fd4a13729343b388973f73f7e789d6cc62ab988240518a2d27c4a4e2
languageName: node
linkType: hard

"@types/keyv@npm:^3.1.1, @types/keyv@npm:^3.1.4":
version: 3.1.4
resolution: "@types/keyv@npm:3.1.4"
Expand Down Expand Up @@ -11917,6 +11926,18 @@ __metadata:
languageName: node
linkType: hard

"json-stable-stringify@npm:^1.1.1":
version: 1.1.1
resolution: "json-stable-stringify@npm:1.1.1"
dependencies:
call-bind: "npm:^1.0.5"
isarray: "npm:^2.0.5"
jsonify: "npm:^0.0.1"
object-keys: "npm:^1.1.1"
checksum: 60853c1f63451319b5c7953465a555aa816cf84e60e3ca36b6c05225d8fdc4615127fb4ecb92f9f5ad880c552ab8cbae9a519f78b995e7788d6d89e57afafdeb
languageName: node
linkType: hard

"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1":
version: 5.0.1
resolution: "json-stringify-safe@npm:5.0.1"
Expand Down Expand Up @@ -11961,6 +11982,13 @@ __metadata:
languageName: node
linkType: hard

"jsonify@npm:^0.0.1":
version: 0.0.1
resolution: "jsonify@npm:0.0.1"
checksum: 7b86b6f4518582ff1d8b7624ed6c6277affd5246445e864615dbdef843a4057ac58587684faf129ea111eeb80e01c15f0a4d9d03820eb3f3985fa67e81b12398
languageName: node
linkType: hard

"jsonparse@npm:^1.2.0":
version: 1.3.1
resolution: "jsonparse@npm:1.3.1"
Expand Down

0 comments on commit 909b1ed

Please sign in to comment.