Skip to content

Commit

Permalink
Merge branch 'hyperlane-xyz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ljankovic-txfusion authored Jan 24, 2025
2 parents cad2dce + 47ae33c commit 3de0c45
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-grapes-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/core': minor
---

Revert zksync changes.
2 changes: 1 addition & 1 deletion typescript/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@aws-sdk/client-kms": "^3.577.0",
"@aws-sdk/client-s3": "^3.577.0",
"@hyperlane-xyz/registry": "6.18.0",
"@hyperlane-xyz/registry": "7.1.0",
"@hyperlane-xyz/sdk": "8.3.0",
"@hyperlane-xyz/utils": "8.3.0",
"@inquirer/core": "9.0.10",
Expand Down
2 changes: 1 addition & 1 deletion typescript/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "8.3.0",
"dependencies": {
"@hyperlane-xyz/core": "5.10.0",
"@hyperlane-xyz/registry": "6.18.0",
"@hyperlane-xyz/registry": "7.1.0",
"@hyperlane-xyz/sdk": "8.3.0",
"@openzeppelin/contracts-upgradeable": "^4.9.3",
"ethers": "^5.7.2"
Expand Down
1 change: 1 addition & 0 deletions typescript/infra/config/environments/mainnet3/owners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { supportedChainNames } from './supportedChainNames.js';

export const timelocks: ChainMap<Address | undefined> = {
arbitrum: '0xAC98b0cD1B64EA4fe133C6D2EDaf842cE5cF4b01',
ethereum: '0x59cf937Ea9FA9D7398223E3aA33d92F7f5f986A2', // symbiotic network timelock
};

export function localAccountRouters(): ChainMap<Address> {
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@ethersproject/providers": "*",
"@google-cloud/secret-manager": "^5.5.0",
"@hyperlane-xyz/helloworld": "8.3.0",
"@hyperlane-xyz/registry": "6.18.0",
"@hyperlane-xyz/registry": "7.1.0",
"@hyperlane-xyz/sdk": "8.3.0",
"@hyperlane-xyz/utils": "8.3.0",
"@inquirer/prompts": "3.3.2",
Expand Down
33 changes: 33 additions & 0 deletions typescript/infra/scripts/warp-routes/export-warp-configs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { getRegistry } from '../../config/registry.js';
import { getWarpConfig, warpConfigGetterMap } from '../../config/warp.js';
import { getArgs, withOutputFile } from '../agent-utils.js';
import { getEnvironmentConfig, getHyperlaneCore } from '../core-utils.js';

// Writes the warp configs into the Registry
async function main() {
const { environment } = await withOutputFile(getArgs()).argv;
const { multiProvider } = await getHyperlaneCore(environment);
const envConfig = getEnvironmentConfig(environment);
const registry = getRegistry();

const warpIdsToCheck = Object.keys(warpConfigGetterMap);
for (const warpRouteId of warpIdsToCheck) {
console.log(`Generating Warp config for ${warpRouteId}`);

const warpConfig = await getWarpConfig(
multiProvider,
envConfig,
warpRouteId,
);

const configFileName = `${warpRouteId}-deploy.yaml`;
registry.addWarpRouteConfig(warpConfig, configFileName);

// TODO: Use registry.getWarpRoutesPath() to dynamically generate path by removing "protected"
console.log(
`Warp config successfully created at ${registry.getUri()}/deployments/warp_routes/${configFileName}`,
);
}
}

main().catch((err) => console.error('Error:', err));
12 changes: 10 additions & 2 deletions typescript/infra/src/tx/govern-transaction-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,16 @@ export class GovernTransactionReader {
'schedule(address,uint256,bytes,bytes32,bytes32,uint256)'
].name
) {
const [target, value, data, eta, executor, delay] = decoded.args;
insight = `Schedule ${target} to be executed at ${eta} with ${value} ${data}. Executor: ${executor}, Delay: ${delay}`;
const [target, value, data, _predecessor, _salt, delay] = decoded.args;
const inner = await this.read(chain, {
to: target,
data,
value,
});

const eta = new Date(Date.now() + delay.toNumber() * 1000);

insight = `Schedule for ${eta}: ${JSON.stringify(inner)}`;
}

if (
Expand Down
2 changes: 1 addition & 1 deletion typescript/infra/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function writeJsonAtPath(filepath: string, obj: any) {
}

export function writeYamlAtPath(filepath: string, obj: any) {
const content = stringifyObject(obj, 'yaml');
const content = stringifyObject(obj, 'yaml', 2);
writeToFile(filepath, content);
}

Expand Down
5 changes: 4 additions & 1 deletion typescript/utils/src/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ export function stringifyObject(
if (format === 'json') {
return json;
}
return yamlStringify(JSON.parse(json), null, space);
return yamlStringify(JSON.parse(json), null, {
indent: space ?? 2,
sortMapEntries: true,
});
}

interface ObjectDiffOutput {
Expand Down
2 changes: 1 addition & 1 deletion typescript/widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@eslint/js": "^9.15.0",
"@hyperlane-xyz/registry": "6.18.0",
"@hyperlane-xyz/registry": "7.1.0",
"@storybook/addon-essentials": "^7.6.14",
"@storybook/addon-interactions": "^7.6.14",
"@storybook/addon-links": "^7.6.14",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7320,7 +7320,7 @@ __metadata:
"@eslint/js": "npm:^9.15.0"
"@ethersproject/abi": "npm:*"
"@ethersproject/providers": "npm:*"
"@hyperlane-xyz/registry": "npm:6.18.0"
"@hyperlane-xyz/registry": "npm:7.1.0"
"@hyperlane-xyz/sdk": "npm:8.3.0"
"@hyperlane-xyz/utils": "npm:8.3.0"
"@inquirer/core": "npm:9.0.10"
Expand Down Expand Up @@ -7424,7 +7424,7 @@ __metadata:
dependencies:
"@eslint/js": "npm:^9.15.0"
"@hyperlane-xyz/core": "npm:5.10.0"
"@hyperlane-xyz/registry": "npm:6.18.0"
"@hyperlane-xyz/registry": "npm:7.1.0"
"@hyperlane-xyz/sdk": "npm:8.3.0"
"@nomiclabs/hardhat-ethers": "npm:^2.2.3"
"@nomiclabs/hardhat-waffle": "npm:^2.0.6"
Expand Down Expand Up @@ -7475,7 +7475,7 @@ __metadata:
"@ethersproject/providers": "npm:*"
"@google-cloud/secret-manager": "npm:^5.5.0"
"@hyperlane-xyz/helloworld": "npm:8.3.0"
"@hyperlane-xyz/registry": "npm:6.18.0"
"@hyperlane-xyz/registry": "npm:7.1.0"
"@hyperlane-xyz/sdk": "npm:8.3.0"
"@hyperlane-xyz/utils": "npm:8.3.0"
"@inquirer/prompts": "npm:3.3.2"
Expand Down Expand Up @@ -7537,13 +7537,13 @@ __metadata:
languageName: unknown
linkType: soft

"@hyperlane-xyz/registry@npm:6.18.0":
version: 6.18.0
resolution: "@hyperlane-xyz/registry@npm:6.18.0"
"@hyperlane-xyz/registry@npm:7.1.0":
version: 7.1.0
resolution: "@hyperlane-xyz/registry@npm:7.1.0"
dependencies:
yaml: "npm:2.4.5"
zod: "npm:^3.21.2"
checksum: 10/0090afeffa60cf1891b1c7178d5f91d80db96a85595ba9a4ad7160cdc830737efc54022e11d416da4f4d9f7c032fde6f7aef678ae99e4a1f6142cdc06c50ccbc
checksum: 10/94b594ecd5734bc564e1a9ad220f4e5c9f04a98cd768cd4472afbaffe91009ae0680b8c4ffb01c13dbe913030dd730b22d5a73d7bfc88d6405df1e9f842ef939
languageName: node
linkType: hard

Expand Down Expand Up @@ -7642,7 +7642,7 @@ __metadata:
"@emotion/styled": "npm:^11.13.0"
"@eslint/js": "npm:^9.15.0"
"@headlessui/react": "npm:^2.1.8"
"@hyperlane-xyz/registry": "npm:6.18.0"
"@hyperlane-xyz/registry": "npm:7.1.0"
"@hyperlane-xyz/sdk": "npm:8.3.0"
"@hyperlane-xyz/utils": "npm:8.3.0"
"@interchain-ui/react": "npm:^1.23.28"
Expand Down

0 comments on commit 3de0c45

Please sign in to comment.