diff --git a/.claude/skills/alert-validator-checkpoints-inconsistent/SKILL.md b/.claude/skills/alert-validator-checkpoints-inconsistent/SKILL.md index e32590fcb07..94faf99cb81 100644 --- a/.claude/skills/alert-validator-checkpoints-inconsistent/SKILL.md +++ b/.claude/skills/alert-validator-checkpoints-inconsistent/SKILL.md @@ -8,7 +8,6 @@ description: Debug validator checkpoint inconsistencies where some validators ar ## When to Use 1. **Alert-based triggers:** - - Alert mentions "checkpoint inconsistency", "validator inconsistent", or "validators behind" - Alert names like "Inconsistent latest checkpoints in validator set" - Alert names containing "checkpoint inconsistency" with a threshold (e.g., "> 20") diff --git a/.claude/skills/denylist-stuck-messages/SKILL.md b/.claude/skills/denylist-stuck-messages/SKILL.md index 01e2d4e232a..dcdcf0fcb9d 100644 --- a/.claude/skills/denylist-stuck-messages/SKILL.md +++ b/.claude/skills/denylist-stuck-messages/SKILL.md @@ -10,7 +10,6 @@ Add message IDs to the relayer denylist configuration, create a PR, and deploy. ## When to Use 1. **After investigation:** - - User ran `/investigate-stuck-messages` and wants to denylist the found messages - User says "denylist these" or "add these to blacklist" diff --git a/.claude/skills/fix-merkle-root-mismatch/SKILL.md b/.claude/skills/fix-merkle-root-mismatch/SKILL.md index d8a7d3d0c5e..831afbf600a 100644 --- a/.claude/skills/fix-merkle-root-mismatch/SKILL.md +++ b/.claude/skills/fix-merkle-root-mismatch/SKILL.md @@ -71,7 +71,6 @@ Before making any changes to the relayer database, you MUST: | 1478 | 0xa66dbdc1874acfddf14e75e6a20dd1632e9e3206c5f5855884da0d26d8ca12fa | 9891872 | 2. Use `AskUserQuestion` to get explicit confirmation: - - Question: "Do you want to apply these merkle tree fixes to the relayer database?" - Options: "Yes, apply fixes" / "No, cancel" diff --git a/.claude/skills/investigate-merkle-root-mismatch/SKILL.md b/.claude/skills/investigate-merkle-root-mismatch/SKILL.md index 0e9130d65f6..8551dc277e4 100644 --- a/.claude/skills/investigate-merkle-root-mismatch/SKILL.md +++ b/.claude/skills/investigate-merkle-root-mismatch/SKILL.md @@ -8,7 +8,6 @@ description: Investigate merkle root mismatch alerts between relayer and validat ## When to Use 1. **Alert-based triggers:** - - Alert mentions "merkle root mismatch" - GCP logs show: "checkpoint root does not match canonical root from merkle proof" - The `hyperlane_merkle_root_mismatch` metric is firing diff --git a/.claude/skills/investigate-stuck-messages/SKILL.md b/.claude/skills/investigate-stuck-messages/SKILL.md index 606b961a6b3..0201ac2f7ed 100644 --- a/.claude/skills/investigate-stuck-messages/SKILL.md +++ b/.claude/skills/investigate-stuck-messages/SKILL.md @@ -10,7 +10,6 @@ Query the relayer API to investigate stuck messages, their retry counts, and err ## When to Use 1. **Alert-based triggers:** - - Alert: "Known app context relayer queue length > 0 for 40m" - Any alert mentioning stuck messages in prepare queue - High retry counts for specific app contexts diff --git a/.claude/skills/warp-fork/SKILL.md b/.claude/skills/warp-fork/SKILL.md index 79d0877f677..19012cacd18 100644 --- a/.claude/skills/warp-fork/SKILL.md +++ b/.claude/skills/warp-fork/SKILL.md @@ -12,7 +12,6 @@ Fork a warp route using the local HTTP registry. 0. Check if `http://localhost:3333` is running. If not, run the start-http-registry SKILL. If that fails, use `AskUserQuestion` to prompt the user for an alternate registry URL to use instead of `http://localhost:3333`. 1. First, use `AskUserQuestion` to prompt the user for the warp route ID: - - Question: "Which warp route would you like to fork?" - Header: "Warp Route" - Options: Provide 2-3 common examples if known, otherwise use generic placeholders. Note that the fork may fail if the warp routes are invalid. Re-prompt the user! diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44e34be142a..338cc5171e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,16 +78,26 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Run prettier (changed files) + - name: Run oxfmt (changed files) if: github.event_name == 'pull_request' - run: >- - cat changed_files.txt | - xargs -r pnpm exec prettier --check --ignore-unknown --no-error-on-unmatched-pattern + run: | + cat changed_files.txt | grep -E '\.(js|ts|jsx|tsx|json|md)$' | \ + xargs -r pnpm exec oxfmt --check --no-error-on-unmatched-pattern + + - name: Run prettier for Solidity (changed files) + if: github.event_name == 'pull_request' + run: | + cat changed_files.txt | grep -E '\.sol$' | \ + xargs -r pnpm exec prettier --check --no-error-on-unmatched-pattern + + - name: Run oxfmt (all files) + if: github.event_name != 'pull_request' + run: pnpm exec oxfmt --check . + continue-on-error: true - - name: Run prettier (all files) + - name: Run prettier for Solidity (all files) if: github.event_name != 'pull_request' - run: >- - pnpm exec prettier --check --ignore-unknown --no-error-on-unmatched-pattern . + run: pnpm exec prettier --check 'solidity/contracts/**/*.sol' 'solidity/test/**/*.sol' continue-on-error: true - name: Clean up diff --git a/.lintstagedrc b/.lintstagedrc index 8f447cc01b3..5ee1f3e1038 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,7 +1,7 @@ { - "*.js": ["oxlint", "prettier --write"], - "*.ts": ["oxlint", "prettier --write"], - "*.md": "prettier --write", + "*.js": ["oxlint", "oxfmt --write"], + "*.ts": ["oxlint", "oxfmt --write"], + "*.md": "oxfmt --write", "*.sol": "prettier --write", - "*.json": "prettier --write" + "*.json": "oxfmt --write" } diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 00000000000..58b6805a305 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,36 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "trailingComma": "all", + "ignorePatterns": [ + "*.sol", + "solidity/**", + "*.rs", + "*.toml", + "*.sh", + "*.env", + "*.lock", + "*.Dockerfile", + "Dockerfile", + "**/dist/**", + ".changeset/**", + "pnpm-lock.yaml", + ".pnpm-store/**", + "rust/**", + "solidity/artifacts/**", + "solidity/cache/**", + "solidity/core-utils/typechain/**", + "solidity/lib/**", + "tools/**", + "typescript/cli/configs/**", + "typescript/helloworld/artifacts/**", + "typescript/helloworld/cache/**", + "typescript/helloworld/src/types/**", + "typescript/infra/helm/**/templates/**", + "typescript/infra/src/infrastructure/external-secrets/helm/templates/**", + "vectors/**" + ] +} diff --git a/.prettierrc b/.prettierrc index d3c7c17c5d8..c23a6dfdb83 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,25 +1,8 @@ { - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all", - "overrides": [ - { - "files": "*.sol", - "options": { - "printWidth": 80, - "tabWidth": 4, - "useTabs": false, - "singleQuote": false, - "bracketSpacing": false - } - } - ], - "importOrder": ["^@hyperlane-xyz/(.*)$", "^../(.*)$", "^./(.*)$"], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, - "importOrderParserPlugins": ["importAssertions", "typescript", "jsx"], - "plugins": [ - "prettier-plugin-solidity", - "@trivago/prettier-plugin-sort-imports" - ] + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false, + "plugins": ["prettier-plugin-solidity"] } diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..1f721b2d9fc --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["oxc.oxc-vscode", "esbenp.prettier-vscode"], + "unwantedRecommendations": [] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 6cb83cc9f63..c8687804966 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,28 @@ { - "rust-analyzer.linkedProjects": [ - "./rust/main/Cargo.toml", - "./rust/sealevel/Cargo.toml", - ], -} \ No newline at end of file + "rust-analyzer.linkedProjects": [ + "./rust/main/Cargo.toml", + "./rust/sealevel/Cargo.toml" + ], + "editor.formatOnSave": true, + "[typescript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[json]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[jsonc]": { + "editor.defaultFormatter": "oxc.oxc-vscode" + }, + "[solidity]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } +} diff --git a/LICENSE.md b/LICENSE.md index f5f4b8b5ecd..5312f821536 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,5 +1,4 @@ -Apache License -============== +# Apache License _Version 2.0, January 2004_ _<>_ @@ -89,27 +88,27 @@ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -* **(a)** You must give any other recipients of the Work or Derivative Works a copy of -this License; and -* **(b)** You must cause any modified files to carry prominent notices stating that You -changed the files; and -* **(c)** You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. +- **(a)** You must give any other recipients of the Work or Derivative Works a copy of + this License; and +- **(b)** You must cause any modified files to carry prominent notices stating that You + changed the files; and +- **(c)** You must retain, in the Source form of any Derivative Works that You distribute, + all copyright, patent, trademark, and attribution notices from the Source form + of the Work, excluding those notices that do not pertain to any part of the + Derivative Works; and +- **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any + Derivative Works that You distribute must include a readable copy of the + attribution notices contained within such NOTICE file, excluding those notices + that do not pertain to any part of the Derivative Works, in at least one of the + following places: within a NOTICE text file distributed as part of the + Derivative Works; within the Source form or documentation, if provided along + with the Derivative Works; or, within a display generated by the Derivative + Works, if and wherever such third-party notices normally appear. The contents of + the NOTICE file are for informational purposes only and do not modify the + License. You may add Your own attribution notices within Derivative Works that + You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as + modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or @@ -180,16 +179,15 @@ the same “printed page” as the copyright notice for easier identification wi third-party archives. Copyright [yyyy] [name of copyright owner] - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/README.md b/README.md index f1649bc0a77..a267b4f3232 100644 --- a/README.md +++ b/README.md @@ -125,12 +125,10 @@ For an alpha or beta version, follow the directions [here](https://github.com/ch To manually trigger Agent or Monorepo Docker builds in CI, you can use the workflows provided in the repository. Here are the steps to do so: 1. **Navigate to the workflow:** - - For agents, go to the [Rust Docker Workflow](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/workflows/rust-docker.yml). - For the monorepo, go to the [Monorepo Docker Workflow](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/workflows/monorepo-docker.yml). 2. **Trigger the workflow:** - - On the workflow page, click on the "Run workflow" button. - You may need to select a branch and decide whether to trigger builds for the `arm64` platform. diff --git a/docs/2025-11-20-multi-vm-migration.md b/docs/2025-11-20-multi-vm-migration.md index e22c487063e..3013d708b9d 100644 --- a/docs/2025-11-20-multi-vm-migration.md +++ b/docs/2025-11-20-multi-vm-migration.md @@ -115,7 +115,10 @@ import { AltVM } from '@hyperlane-xyz/provider-sdk'; import { GasAction, MinimumRequiredGasByAction } from '@hyperlane-xyz/utils'; // After -import { GasAction, MinimumRequiredGasByAction } from '@hyperlane-xyz/provider-sdk'; +import { + GasAction, + MinimumRequiredGasByAction, +} from '@hyperlane-xyz/provider-sdk'; ``` #### Protocol Type Imports (No Change Needed) diff --git a/docs/ai-agents/operational-debugging.md b/docs/ai-agents/operational-debugging.md index d23fb575975..ea69805d2ae 100644 --- a/docs/ai-agents/operational-debugging.md +++ b/docs/ai-agents/operational-debugging.md @@ -72,7 +72,6 @@ After identifying the alert, immediately check the corresponding dashboards for ### Key Dashboards for Debugging 1. **Easy Dashboard** (`uid: fdf6ada6uzvgga`) - - **Primary panels for incidents:** - "Prepare queues per Hyperlane App" - Filter by `app_context` to see specific application issues - "Critical Reprepare Reasons" - Shows operation_status breakdown for stuck messages @@ -80,18 +79,15 @@ After identifying the alert, immediately check the corresponding dashboards for - **Variables:** Set `chain` and `RelayerContext` filters to narrow down issues 2. **Relayers v2 & v3** (`uid: k4aYDtK4k`) - - "Prepare Queues by Remote" - Overall queue health by destination chain - "Queue Lengths" - Detailed view with queue_name breakdown - "Messages Processed" - Verify if messages are flowing 3. **RPC Usage & Errors** (`uid: bdbwtrzoms5c0c`) - - Check RPC error rates when suspecting infrastructure issues - Monitor specific chain RPC health 4. **Lander Dashboard** (`uid: 197feea9-f831-48ce-b936-eaaa3294a3f6`) - - **Transaction submission metrics:** - "Building Queue Length" - Messages waiting to be built into transactions - "Inclusion Queue Length" - Transactions waiting for inclusion on-chain @@ -106,7 +102,6 @@ After identifying the alert, immediately check the corresponding dashboards for - **Key for debugging:** High inclusion queue length indicates transaction submission issues 5. **Validator Dashboard - In-house** (`uid: xrNCvpK4k`) - - **Critical validator health metrics:** - "Unsigned Messages" - Messages observed but not yet signed by validators - "Messages Signed" - Rate of checkpoint signing activity @@ -175,7 +170,6 @@ rate(hyperlane_lander_finalized_transactions[5m]) - Filter by `app_context` to isolate the problematic application - Look at `operation_status` labels to understand error type 2. **Identify error patterns:** - - `Retry(Error estimating costs for process call)` → Gas estimation failure, check for contract reverts - `Retry(Could not fetch metadata)` → Usually temporary, only investigate if persistent - `Retry(ApplicationReport(...))` → Application-specific errors diff --git a/package.json b/package.json index 667c1c4868f..bb7411788b5 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,31 @@ { "name": "@hyperlane-xyz/monorepo", - "description": "A pnpm workspace of core Hyperlane packages", "version": "0.0.0", + "private": true, + "description": "A pnpm workspace of core Hyperlane packages", + "scripts": { + "agent-configs": "pnpm -C typescript/infra update-agent-config:mainnet3 && pnpm -C typescript/infra update-agent-config:testnet4", + "build": "turbo run build", + "build:zk": "turbo run build:zk", + "clean": "turbo run clean", + "format": "turbo run format", + "format:check": "oxfmt --check . && prettier --check 'solidity/contracts/**/*.sol' 'solidity/test/**/*.sol'", + "lint": "oxlint -c oxlint.json && turbo run lint", + "lint:catalog": "tsx scripts/lint-catalog-usage.ts", + "test": "turbo run test --continue", + "test:ci": "turbo run test:ci", + "coverage": "turbo run coverage", + "version:prepare": "pnpm changeset version && turbo run version:update && pnpm install", + "version:check": "pnpm changeset status", + "release": "pnpm build && pnpm changeset publish", + "postinstall": "husky install" + }, + "dependencies": { + "@changesets/cli": "^2.26.2" + }, "devDependencies": { "@eslint/eslintrc": "^3.2.0", "@eslint/js": "catalog:", - "@trivago/prettier-plugin-sort-imports": "catalog:", "@typescript-eslint/eslint-plugin": "catalog:", "@typescript-eslint/parser": "catalog:", "eslint": "catalog:", @@ -17,33 +37,14 @@ "globals": "catalog:", "husky": "^8.0.0", "lint-staged": "^12.4.3", + "oxfmt": "catalog:", "oxlint": "catalog:", "prettier": "catalog:", "prettier-plugin-solidity": "catalog:", "tsx": "catalog:", "turbo": "^2.5.3" }, - "dependencies": { - "@changesets/cli": "^2.26.2" - }, "packageManager": "pnpm@10.25.0", - "private": true, - "scripts": { - "agent-configs": "pnpm -C typescript/infra update-agent-config:mainnet3 && pnpm -C typescript/infra update-agent-config:testnet4", - "build": "turbo run build", - "build:zk": "turbo run build:zk", - "clean": "turbo run clean", - "prettier": "turbo run prettier", - "lint": "oxlint -c oxlint.json && turbo run lint", - "lint:catalog": "tsx scripts/lint-catalog-usage.ts", - "test": "turbo run test --continue", - "test:ci": "turbo run test:ci", - "coverage": "turbo run coverage", - "version:prepare": "pnpm changeset version && turbo run version:update && pnpm install", - "version:check": "pnpm changeset status", - "release": "pnpm build && pnpm changeset publish", - "postinstall": "husky install" - }, "pnpm": { "overrides": { "async": "^2.6.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53a40116653..e4f835f946e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,9 +96,6 @@ catalogs: '@starknet-react/chains': specifier: ^3.1.2 version: 3.1.3 - '@trivago/prettier-plugin-sort-imports': - specifier: ^5.2.2 - version: 5.2.2 '@turnkey/api-key-stamper': specifier: ^0.5.0 version: 0.5.0 @@ -213,6 +210,9 @@ catalogs: mocha-steps: specifier: ^1.3.0 version: 1.3.0 + oxfmt: + specifier: ^0.27.0 + version: 0.27.0 oxlint: specifier: ^1.42.0 version: 1.42.0 @@ -223,8 +223,8 @@ catalogs: specifier: ^13.0.0 version: 13.1.2 prettier: - specifier: ^3.5.3 - version: 3.5.3 + specifier: ^3.8.1 + version: 3.8.1 prettier-plugin-solidity: specifier: ^1.4.2 version: 1.4.2 @@ -327,9 +327,6 @@ importers: '@eslint/js': specifier: 'catalog:' version: 9.39.2 - '@trivago/prettier-plugin-sort-imports': - specifier: 'catalog:' - version: 5.2.2(prettier@3.5.3) '@typescript-eslint/eslint-plugin': specifier: 'catalog:' version: 8.54.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3) @@ -363,15 +360,18 @@ importers: lint-staged: specifier: ^12.4.3 version: 12.5.0(enquirer@2.4.1) + oxfmt: + specifier: 'catalog:' + version: 0.27.0 oxlint: specifier: 'catalog:' version: 1.42.0 prettier: specifier: 'catalog:' - version: 3.5.3 + version: 3.8.1 prettier-plugin-solidity: specifier: 'catalog:' - version: 1.4.2(prettier@3.5.3) + version: 1.4.2(prettier@3.8.1) tsx: specifier: 'catalog:' version: 4.19.1 @@ -449,10 +449,10 @@ importers: version: 0.2.12 prettier: specifier: 'catalog:' - version: 3.5.3 + version: 3.8.1 prettier-plugin-solidity: specifier: 'catalog:' - version: 1.4.2(prettier@3.5.3) + version: 1.4.2(prettier@3.8.1) solhint: specifier: 'catalog:' version: 5.2.0(typescript@5.8.3) @@ -461,7 +461,7 @@ importers: version: link:../solhint-plugin solhint-plugin-prettier: specifier: 'catalog:' - version: 0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.5.3))(prettier@3.5.3) + version: 0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.8.1))(prettier@3.8.1) solidity-bytes-utils: specifier: ^0.8.0 version: 0.8.4 @@ -520,9 +520,6 @@ importers: globby: specifier: ^14.1.0 version: 14.1.0 - prettier: - specifier: 'catalog:' - version: 3.5.3 tsx: specifier: 'catalog:' version: 4.19.1 @@ -599,9 +596,9 @@ importers: node-fetch: specifier: ^3.3.2 version: 3.3.2(patch_hash=9872737c7a2d7862012132c60c476cac6a03a48fe575d80388b4ba1176583bf9) - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 testcontainers: specifier: 'catalog:' version: 11.7.0 @@ -729,9 +726,6 @@ importers: pino-pretty: specifier: 'catalog:' version: 13.1.2 - prettier: - specifier: 'catalog:' - version: 3.5.3 ts-jest: specifier: ^29.1.2 version: 29.4.5(@babel/core@7.28.5)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.5))(jest-util@29.7.0)(jest@29.7.0(@types/node@24.10.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@24.10.9)(typescript@5.8.3)))(typescript@5.8.3) @@ -897,12 +891,12 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 + oxfmt: + specifier: 'catalog:' + version: 0.27.0 pino: specifier: 'catalog:' version: 8.21.0 - prettier: - specifier: 'catalog:' - version: 3.5.3 prom-client: specifier: 'catalog:' version: 14.2.0 @@ -1018,9 +1012,9 @@ importers: mocha-steps: specifier: 'catalog:' version: 1.3.0 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 testcontainers: specifier: 'catalog:' version: 11.7.0 @@ -1070,9 +1064,9 @@ importers: eslint-plugin-import: specifier: 'catalog:' version: 2.32.0(@typescript-eslint/parser@8.54.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.2(jiti@2.6.1)) - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 typescript: specifier: 'catalog:' version: 5.8.3 @@ -1188,9 +1182,6 @@ importers: chai: specifier: 'catalog:' version: 4.5.0 - prettier: - specifier: 'catalog:' - version: 3.5.3 typescript: specifier: 'catalog:' version: 5.8.3 @@ -1255,9 +1246,6 @@ importers: '@nomiclabs/hardhat-waffle': specifier: 'catalog:' version: 2.0.6(@nomiclabs/hardhat-ethers@2.2.3(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@18.19.130)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(@types/sinon-chai@3.2.12)(ethereum-waffle@4.0.10(@ensdomains/ens@0.4.5)(@ensdomains/resolver@0.2.4)(@ethersproject/abi@5.8.0)(@ethersproject/providers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3))(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@18.19.130)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)) - '@trivago/prettier-plugin-sort-imports': - specifier: 'catalog:' - version: 5.2.2(prettier@3.5.3) '@typechain/ethers-v5': specifier: 11.1.2 version: 11.1.2(@ethersproject/abi@5.8.0)(@ethersproject/providers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typechain@8.3.2(patch_hash=fbb49bf3d1f71d8430767373c9ae33cd36e1aedd8ae9584d00dc90775f804950)(typescript@5.8.3))(typescript@5.8.3) @@ -1311,16 +1299,16 @@ importers: version: 1.0.10(bufferutil@4.0.9)(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@18.19.130)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) prettier: specifier: 'catalog:' - version: 3.5.3 + version: 3.8.1 prettier-plugin-solidity: specifier: 'catalog:' - version: 1.4.2(prettier@3.5.3) + version: 1.4.2(prettier@3.8.1) solhint: specifier: 'catalog:' version: 5.2.0(typescript@5.8.3) solhint-plugin-prettier: specifier: 'catalog:' - version: 0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.5.3))(prettier@3.5.3) + version: 0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.8.1))(prettier@3.8.1) solidity-coverage: specifier: 'catalog:' version: 0.8.16(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@18.19.130)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)) @@ -1400,12 +1388,12 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 + oxfmt: + specifier: 'catalog:' + version: 0.27.0 pino-pretty: specifier: 'catalog:' version: 13.1.2 - prettier: - specifier: 'catalog:' - version: 3.5.3 sinon: specifier: 'catalog:' version: 13.0.2 @@ -1656,9 +1644,6 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: - specifier: 'catalog:' - version: 3.5.3 sinon: specifier: 'catalog:' version: 13.0.2 @@ -1750,9 +1735,9 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 sinon: specifier: 'catalog:' version: 13.0.2 @@ -1811,9 +1796,9 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 sinon: specifier: 'catalog:' version: 13.0.2 @@ -1936,9 +1921,9 @@ importers: mocha-steps: specifier: 'catalog:' version: 1.3.0 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 testcontainers: specifier: 'catalog:' version: 11.7.0 @@ -2054,9 +2039,9 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 sinon: specifier: 'catalog:' version: 13.0.2 @@ -2127,9 +2112,6 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: - specifier: 'catalog:' - version: 3.5.3 testcontainers: specifier: 'catalog:' version: 11.7.0 @@ -2236,9 +2218,9 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 sinon: specifier: 'catalog:' version: 13.0.2 @@ -2432,9 +2414,6 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: - specifier: 'catalog:' - version: 3.5.3 sinon: specifier: 'catalog:' version: 13.0.2 @@ -2526,9 +2505,6 @@ importers: node-fetch: specifier: ^3.3.2 version: 3.3.2(patch_hash=9872737c7a2d7862012132c60c476cac6a03a48fe575d80388b4ba1176583bf9) - prettier: - specifier: 'catalog:' - version: 3.5.3 ts-node: specifier: 'catalog:' version: 10.9.2(@types/node@24.10.9)(typescript@5.8.3) @@ -2628,9 +2604,6 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: - specifier: 'catalog:' - version: 3.5.3 sinon: specifier: 'catalog:' version: 13.0.2 @@ -2701,9 +2674,9 @@ importers: mocha: specifier: 'catalog:' version: 11.7.5 - prettier: + oxfmt: specifier: 'catalog:' - version: 3.5.3 + version: 0.27.0 sinon: specifier: 'catalog:' version: 13.0.2 @@ -2912,9 +2885,6 @@ importers: postcss: specifier: ^8.4.21 version: 8.5.6 - prettier: - specifier: 'catalog:' - version: 3.5.3 react: specifier: ^18.2.0 version: 18.3.1 @@ -5910,6 +5880,46 @@ packages: '@openzeppelin/contracts@4.9.6': resolution: {integrity: sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA==} + '@oxfmt/darwin-arm64@0.27.0': + resolution: {integrity: sha512-3vwqyzNlVTVFVzHMlrqxb4tgVgHp6FYS0uIxsIZ/SeEDG0azaqiOw/2t8LlJ9f72PKRLWSey+Ak99tiKgpbsnQ==} + cpu: [arm64] + os: [darwin] + + '@oxfmt/darwin-x64@0.27.0': + resolution: {integrity: sha512-5u8mZVLm70v6l1wLZ2MmeNIEzGsruwKw5F7duePzpakPfxGtLpiFNUwe4aBUJULTP6aMzH+A4dA0JOn8lb7Luw==} + cpu: [x64] + os: [darwin] + + '@oxfmt/linux-arm64-gnu@0.27.0': + resolution: {integrity: sha512-aql/LLYriX/5Ar7o5Qivnp/qMTUPNiOCr7cFLvmvzYZa3XL0H8XtbKUfIVm+9ILR0urXQzcml+L8pLe1p8sgEg==} + cpu: [arm64] + os: [linux] + + '@oxfmt/linux-arm64-musl@0.27.0': + resolution: {integrity: sha512-6u/kNb7hubthg4u/pn3MK/GJLwPgjDvDDnjjr7TC0/OK/xztef8ToXmycxIQ9OeDNIJJf7Z0Ss/rHnKvQOWzRw==} + cpu: [arm64] + os: [linux] + + '@oxfmt/linux-x64-gnu@0.27.0': + resolution: {integrity: sha512-EhvDfFHO1yrK/Cu75eU1U828lBsW2cV0JITOrka5AjR3PlmnQQ03Mr9ROkWkbPmzAMklXI4Q16eO+4n+7FhS1w==} + cpu: [x64] + os: [linux] + + '@oxfmt/linux-x64-musl@0.27.0': + resolution: {integrity: sha512-1pgjuwMT5sCekuteYZ7LkDsto7DJouaccwjozHqdWohSj2zJpFeSP2rMaC+6JJ1KD5r9HG9sWRuHZGEaoX9uOw==} + cpu: [x64] + os: [linux] + + '@oxfmt/win32-arm64@0.27.0': + resolution: {integrity: sha512-mmuEhXZEhAYAeyjVTWwGKIA3RSb2b/He9wrXkDJPhmqp8qISUzkVg1dQmLEt4hD+wI5rzR+6vchPt521tzuRDA==} + cpu: [arm64] + os: [win32] + + '@oxfmt/win32-x64@0.27.0': + resolution: {integrity: sha512-cXKVkL1DuRq31QjwHqtBEUztyBmM9YZKdeFhsDLBURNdk1CFW42uWsmTsaqrXSoiCj7nCjfP0pwTOzxhQZra/A==} + cpu: [x64] + os: [win32] + '@oxlint/darwin-arm64@1.42.0': resolution: {integrity: sha512-ui5CdAcDsXPQwZQEXOOSWsilJWhgj9jqHCvYBm2tDE8zfwZZuF9q58+hGKH1x5y0SV4sRlyobB2Quq6uU6EgeA==} cpu: [arm64] @@ -8412,22 +8422,6 @@ packages: resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} - '@trivago/prettier-plugin-sort-imports@5.2.2': - resolution: {integrity: sha512-fYDQA9e6yTNmA13TLVSA+WMQRc5Bn/c0EUBditUHNfMMxN7M82c38b1kEggVE3pLpZ0FwkwJkUEKMiOi52JXFA==} - engines: {node: '>18.12'} - peerDependencies: - '@vue/compiler-sfc': 3.x - prettier: 2.x - 3.x - prettier-plugin-svelte: 3.x - svelte: 4.x || 5.x - peerDependenciesMeta: - '@vue/compiler-sfc': - optional: true - prettier-plugin-svelte: - optional: true - svelte: - optional: true - '@trpc/client@10.45.2': resolution: {integrity: sha512-ykALM5kYWTLn1zYuUOZ2cPWlVfrXhc18HzBDyRhoPYN0jey4iQHEFSEowfnhg1RvYnrAVjNBgHNeSAXjrDbGwg==} peerDependencies: @@ -12907,9 +12901,6 @@ packages: engines: {node: '>=10'} hasBin: true - javascript-natural-sort@0.7.1: - resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} - jayson@4.2.0: resolution: {integrity: sha512-VfJ9t1YLwacIubLhONk0KFeosUBwstRWQ0IRT1KDjEjnVnSOVHC3uwugyV7L0c7R9lpVyrUGT2XWiBA1UTtpyg==} engines: {node: '>=8'} @@ -14235,6 +14226,11 @@ packages: typescript: optional: true + oxfmt@0.27.0: + resolution: {integrity: sha512-FHR0HR3WeMKBuVEQvW3EeiRZXs/cQzNHxGbhCoAIEPr1FVcOa9GCqrKJXPqv2jkzmCg6Wqot+DvN9RzemyFJhw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + oxlint@1.42.0: resolution: {integrity: sha512-qnspC/lrp8FgKNaONLLn14dm+W5t0SSlus6V5NJpgI2YNT1tkFYZt4fBf14ESxf9AAh98WBASnW5f0gtw462Lg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -14723,8 +14719,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} hasBin: true @@ -16325,6 +16321,10 @@ packages: resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} + tinypool@2.0.0: + resolution: {integrity: sha512-/RX9RzeH2xU5ADE7n2Ykvmi9ED3FBGPAjw9u3zucrNNaEBIO0HPSYgL0NT7+3p147ojeSdaVu08F6hjpv31HJg==} + engines: {node: ^20.0.0 || >=22.0.0} + tinyspy@2.2.1: resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} engines: {node: '>=14.0.0'} @@ -21985,6 +21985,30 @@ snapshots: '@openzeppelin/contracts@4.9.6': {} + '@oxfmt/darwin-arm64@0.27.0': + optional: true + + '@oxfmt/darwin-x64@0.27.0': + optional: true + + '@oxfmt/linux-arm64-gnu@0.27.0': + optional: true + + '@oxfmt/linux-arm64-musl@0.27.0': + optional: true + + '@oxfmt/linux-x64-gnu@0.27.0': + optional: true + + '@oxfmt/linux-x64-musl@0.27.0': + optional: true + + '@oxfmt/win32-arm64@0.27.0': + optional: true + + '@oxfmt/win32-x64@0.27.0': + optional: true + '@oxlint/darwin-arm64@1.42.0': optional: true @@ -22124,9 +22148,9 @@ snapshots: '@popperjs/core@2.11.8': {} - '@prettier/sync@0.3.0(prettier@3.5.3)': + '@prettier/sync@0.3.0(prettier@3.8.1)': dependencies: - prettier: 3.5.3 + prettier: 3.8.1 '@prisma/adapter-pg@7.3.0': dependencies: @@ -26152,18 +26176,6 @@ snapshots: '@tootallnate/once@2.0.0': {} - '@trivago/prettier-plugin-sort-imports@5.2.2(prettier@3.5.3)': - dependencies: - '@babel/generator': 7.28.5 - '@babel/parser': 7.27.0 - '@babel/traverse': 7.28.5 - '@babel/types': 7.28.5 - javascript-natural-sort: 0.7.1 - lodash: 4.17.21 - prettier: 3.5.3 - transitivePeerDependencies: - - supports-color - '@trpc/client@10.45.2(@trpc/server@10.45.2)': dependencies: '@trpc/server': 10.45.2 @@ -32625,8 +32637,6 @@ snapshots: filelist: 1.0.4 picocolors: 1.1.1 - javascript-natural-sort@0.7.1: {} - jayson@4.2.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 @@ -34428,6 +34438,19 @@ snapshots: transitivePeerDependencies: - zod + oxfmt@0.27.0: + dependencies: + tinypool: 2.0.0 + optionalDependencies: + '@oxfmt/darwin-arm64': 0.27.0 + '@oxfmt/darwin-x64': 0.27.0 + '@oxfmt/linux-arm64-gnu': 0.27.0 + '@oxfmt/linux-arm64-musl': 0.27.0 + '@oxfmt/linux-x64-gnu': 0.27.0 + '@oxfmt/linux-x64-musl': 0.27.0 + '@oxfmt/win32-arm64': 0.27.0 + '@oxfmt/win32-x64': 0.27.0 + oxlint@1.42.0: optionalDependencies: '@oxlint/darwin-arm64': 1.42.0 @@ -34919,15 +34942,15 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-solidity@1.4.2(prettier@3.5.3): + prettier-plugin-solidity@1.4.2(prettier@3.8.1): dependencies: '@solidity-parser/parser': 0.19.0 - prettier: 3.5.3 + prettier: 3.8.1 semver: 7.7.3 prettier@2.8.8: {} - prettier@3.5.3: {} + prettier@3.8.1: {} pretty-format@27.5.1: dependencies: @@ -36279,12 +36302,12 @@ snapshots: transitivePeerDependencies: - debug - solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.5.3))(prettier@3.5.3): + solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.4.2(prettier@3.8.1))(prettier@3.8.1): dependencies: - '@prettier/sync': 0.3.0(prettier@3.5.3) - prettier: 3.5.3 + '@prettier/sync': 0.3.0(prettier@3.8.1) + prettier: 3.8.1 prettier-linter-helpers: 1.0.0 - prettier-plugin-solidity: 1.4.2(prettier@3.5.3) + prettier-plugin-solidity: 1.4.2(prettier@3.8.1) solhint@5.2.0(typescript@5.8.3): dependencies: @@ -37118,6 +37141,8 @@ snapshots: tinypool@0.8.4: {} + tinypool@2.0.0: {} + tinyspy@2.2.1: {} tmp@0.0.33: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7fb820e86e1..e24404433ce 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -111,9 +111,9 @@ catalog: typescript-eslint: ^8.54.0 # Formatting - prettier: ^3.5.3 + oxfmt: ^0.27.0 + prettier: ^3.8.1 prettier-plugin-solidity: ^1.4.2 - '@trivago/prettier-plugin-sort-imports': ^5.2.2 # Testing mocha: ^11.5.0 diff --git a/solhint-plugin/package.json b/solhint-plugin/package.json index c0473462ec4..c6c4c2fb2ce 100644 --- a/solhint-plugin/package.json +++ b/solhint-plugin/package.json @@ -1,7 +1,7 @@ { "name": "solhint-plugin-hyperlane", - "private": true, "version": "19.9.0", + "private": true, "description": "", "license": "Apache-2.0", "type": "commonjs", diff --git a/solidity/.vscode/extensions.json b/solidity/.vscode/extensions.json index a5da9933830..f7567201294 100644 --- a/solidity/.vscode/extensions.json +++ b/solidity/.vscode/extensions.json @@ -5,6 +5,7 @@ // List of extensions which should be recommended for users of this workspace. "recommendations": [ "JuanBlanco.solidity", + "esbenp.prettier-vscode", "tintinweb.vscode-ethover", "ryanluker.vscode-coverage-gutters" ], diff --git a/solidity/package.json b/solidity/package.json index 02b85fe05ee..3a20937fbbd 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -1,102 +1,102 @@ { - "name": "@hyperlane-xyz/core", - "description": "Core solidity contracts for Hyperlane", - "version": "10.1.5", - "devDependencies": { - "@ethersproject/abi": "*", - "@hyperlane-xyz/utils": "workspace:*", - "@ethersproject/providers": "*", - "@hyperlane-xyz/tsconfig": "workspace:^", - "@matterlabs/hardhat-zksync-solc": "1.2.5", - "@matterlabs/hardhat-zksync-verify": "1.7.1", - "@nomicfoundation/hardhat-foundry": "1.2.0", - "@nomiclabs/hardhat-ethers": "catalog:", - "@nomiclabs/hardhat-waffle": "catalog:", - "@typechain/ethers-v5": "catalog:", - "@typechain/ethers-v6": "catalog:", - "@typechain/hardhat": "catalog:", - "@types/node": "catalog:", - "chai": "catalog:", - "eslint": "catalog:", - "ethereum-waffle": "catalog:", - "ethers": "catalog:", - "hardhat": "catalog:", - "hardhat-gas-reporter": "catalog:", - "hardhat-ignore-warnings": "^0.2.11", - "prettier": "catalog:", - "prettier-plugin-solidity": "catalog:", - "solhint": "catalog:", - "solhint-plugin-hyperlane": "workspace:^", - "solhint-plugin-prettier": "catalog:", - "solidity-bytes-utils": "^0.8.0", - "solidity-coverage": "catalog:", - "ts-generator": "^0.1.1", - "ts-node": "catalog:", - "tsx": "catalog:", - "typechain": "catalog:", - "typescript": "catalog:", - "zksync-ethers": "catalog:" - }, - "directories": { - "test": "test" - }, - "type": "module", - "exports": { - ".": "./dist/index.js", - "./mailbox": "./dist/typechain/contracts/Mailbox.js", - "./buildArtifact.js": "./dist/buildArtifact.js", - "./buildArtifact.json": "./dist/buildArtifact.json", - "./buildArtifact-zksync.js": "./dist/zksync/buildArtifact.js", - "./contracts": "./contracts" - }, - "types": "./dist/index.d.ts", - "files": [ - "/dist", - "/contracts", - "/dependencies" - ], - "engines": { - "node": ">=16" - }, - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "Hyperlane", - "Solidity" - ], - "license": "Apache-2.0", - "scripts": { - "deps:soldeer": "forge soldeer install --quiet", - "build": "pnpm version:update && pnpm hardhat-esm compile && tsc && ./exportBuildArtifact.sh", - "build:zk": "pnpm hardhat-zk compile && tsc && node generate-artifact-exports.mjs && ZKSYNC=true ./exportBuildArtifact.sh", - "prepublishOnly": "pnpm build && pnpm build:zk", - "lint": "solhint contracts/**/*.sol && eslint -c ./eslint.config.mjs", - "clean": "pnpm hardhat-esm clean && pnpm hardhat-zk clean && rm -rf ./dist ./cache ./cache-zk ./types ./coverage ./out ./forge-cache ./fixtures", - "coverage": "pnpm fixtures && ./coverage.sh", - "docs": "forge doc", - "fixtures": "mkdir -p ./fixtures/aggregation ./fixtures/multisig", - "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", - "hardhat-zk": "NODE_OPTIONS='--import tsx/esm' hardhat --config zk-hardhat.config.cts", - "prettier": "prettier --write ./contracts ./test", - "test": "pnpm version:exhaustive && pnpm hardhat-esm test && pnpm test:forge", - "test:hardhat": "pnpm hardhat-esm test", - "test:forge": "pnpm fixtures && forge test -vvv --decode-internal --no-match-contract Everclear", - "test:ci": "pnpm version:changed && pnpm test:hardhat && pnpm test:forge --no-match-test testFork", - "test:fork": "sh -c '. ./.env.default && forge test --match-test testFork && forge test --match-contract ForkTest'", - "gas": "forge snapshot", - "gas-ci": "pnpm gas --check --tolerance 2 || (echo 'Manually update gas snapshot' && exit 1)", - "slither": "slither .", - "storage": "./storage.sh", - "bytecode": "./bytecode.sh", - "interface": "./interface.sh", - "version:update": "sh ./bytecodeversion.sh", - "version:changed": "pnpm version:update && git diff --exit-code contracts/PackageVersioned.sol", - "version:exhaustive": "pnpm tsx ./test/exhaustiveversion.test.ts", - "test:interface": "pnpm tsx ./test/interface.test.ts" - }, - "peerDependencies": { - "@ethersproject/abi": "*", - "@ethersproject/providers": "*", - "@types/sinon-chai": "*" - } + "name": "@hyperlane-xyz/core", + "description": "Core solidity contracts for Hyperlane", + "version": "10.1.5", + "devDependencies": { + "@ethersproject/abi": "*", + "@hyperlane-xyz/utils": "workspace:*", + "@ethersproject/providers": "*", + "@hyperlane-xyz/tsconfig": "workspace:^", + "@matterlabs/hardhat-zksync-solc": "1.2.5", + "@matterlabs/hardhat-zksync-verify": "1.7.1", + "@nomicfoundation/hardhat-foundry": "1.2.0", + "@nomiclabs/hardhat-ethers": "catalog:", + "@nomiclabs/hardhat-waffle": "catalog:", + "@typechain/ethers-v5": "catalog:", + "@typechain/ethers-v6": "catalog:", + "@typechain/hardhat": "catalog:", + "@types/node": "catalog:", + "chai": "catalog:", + "eslint": "catalog:", + "ethereum-waffle": "catalog:", + "ethers": "catalog:", + "hardhat": "catalog:", + "hardhat-gas-reporter": "catalog:", + "hardhat-ignore-warnings": "^0.2.11", + "prettier": "catalog:", + "prettier-plugin-solidity": "catalog:", + "solhint": "catalog:", + "solhint-plugin-hyperlane": "workspace:^", + "solhint-plugin-prettier": "catalog:", + "solidity-bytes-utils": "^0.8.0", + "solidity-coverage": "catalog:", + "ts-generator": "^0.1.1", + "ts-node": "catalog:", + "tsx": "catalog:", + "typechain": "catalog:", + "typescript": "catalog:", + "zksync-ethers": "catalog:" + }, + "directories": { + "test": "test" + }, + "type": "module", + "exports": { + ".": "./dist/index.js", + "./mailbox": "./dist/typechain/contracts/Mailbox.js", + "./buildArtifact.js": "./dist/buildArtifact.js", + "./buildArtifact.json": "./dist/buildArtifact.json", + "./buildArtifact-zksync.js": "./dist/zksync/buildArtifact.js", + "./contracts": "./contracts" + }, + "types": "./dist/index.d.ts", + "files": [ + "/dist", + "/contracts", + "/dependencies" + ], + "engines": { + "node": ">=16" + }, + "homepage": "https://www.hyperlane.xyz", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "keywords": [ + "Hyperlane", + "Solidity" + ], + "license": "Apache-2.0", + "scripts": { + "deps:soldeer": "forge soldeer install --quiet", + "build": "pnpm version:update && pnpm hardhat-esm compile && tsc && ./exportBuildArtifact.sh", + "build:zk": "pnpm hardhat-zk compile && tsc && node generate-artifact-exports.mjs && ZKSYNC=true ./exportBuildArtifact.sh", + "prepublishOnly": "pnpm build && pnpm build:zk", + "lint": "solhint contracts/**/*.sol && eslint -c ./eslint.config.mjs", + "clean": "pnpm hardhat-esm clean && pnpm hardhat-zk clean && rm -rf ./dist ./cache ./cache-zk ./types ./coverage ./out ./forge-cache ./fixtures", + "coverage": "pnpm fixtures && ./coverage.sh", + "docs": "forge doc", + "fixtures": "mkdir -p ./fixtures/aggregation ./fixtures/multisig", + "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", + "hardhat-zk": "NODE_OPTIONS='--import tsx/esm' hardhat --config zk-hardhat.config.cts", + "format": "prettier --write ./contracts ./test", + "test": "pnpm version:exhaustive && pnpm hardhat-esm test && pnpm test:forge", + "test:hardhat": "pnpm hardhat-esm test", + "test:forge": "pnpm fixtures && forge test -vvv --decode-internal --no-match-contract Everclear", + "test:ci": "pnpm version:changed && pnpm test:hardhat && pnpm test:forge --no-match-test testFork", + "test:fork": "sh -c '. ./.env.default && forge test --match-test testFork && forge test --match-contract ForkTest'", + "gas": "forge snapshot", + "gas-ci": "pnpm gas --check --tolerance 2 || (echo 'Manually update gas snapshot' && exit 1)", + "slither": "slither .", + "storage": "./storage.sh", + "bytecode": "./bytecode.sh", + "interface": "./interface.sh", + "version:update": "sh ./bytecodeversion.sh", + "version:changed": "pnpm version:update && git diff --exit-code contracts/PackageVersioned.sol", + "version:exhaustive": "pnpm tsx ./test/exhaustiveversion.test.ts", + "test:interface": "pnpm tsx ./test/interface.test.ts" + }, + "peerDependencies": { + "@ethersproject/abi": "*", + "@ethersproject/providers": "*", + "@types/sinon-chai": "*" + } } diff --git a/starknet/CHANGELOG.md b/starknet/CHANGELOG.md index 1c6e7f53b22..65824d902dd 100644 --- a/starknet/CHANGELOG.md +++ b/starknet/CHANGELOG.md @@ -17,7 +17,6 @@ ### Patch Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/starknet/package.json b/starknet/package.json index 42670cb9d97..6482a5d81dc 100644 --- a/starknet/package.json +++ b/starknet/package.json @@ -1,34 +1,34 @@ { "name": "@hyperlane-xyz/starknet-core", - "description": "Core cairo contracts for Hyperlane", "version": "25.0.0", - "type": "module", + "description": "Core cairo contracts for Hyperlane", + "keywords": [ + "Cairo", + "Hyperlane", + "Starknet" + ], "homepage": "https://www.hyperlane.xyz", "license": "Apache-2.0", "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "dist" + ], + "type": "module", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, "scripts": { "fetch-contracts": "./scripts/fetch-contracts-release.sh", "generate-artifacts": "tsx ./scripts/generate-artifacts.ts", "build": "tsc && pnpm fetch-contracts && pnpm generate-artifacts", "clean": "rm -rf ./dist ./release", "lint": "eslint -c ./eslint.config.mjs .", - "prettier": "prettier --write ./src ./package.json" + "format": "oxfmt --write ./src" }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - } - }, - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "keywords": [ - "Hyperlane", - "Cairo", - "Starknet" - ], "dependencies": { "starknet": "catalog:" }, @@ -42,7 +42,6 @@ "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import": "catalog:", "globby": "^14.1.0", - "prettier": "catalog:", "tsx": "catalog:", "typescript": "catalog:" } diff --git a/turbo.json b/turbo.json index d8ff1d01d74..a913ce909b9 100644 --- a/turbo.json +++ b/turbo.json @@ -18,7 +18,7 @@ "clean": { "cache": false }, - "prettier": {}, + "format": {}, "lint": {}, "version:update": { "cache": false diff --git a/typescript/.vscode/extensions.json b/typescript/.vscode/extensions.json index 4108e99003b..ba94515710b 100644 --- a/typescript/.vscode/extensions.json +++ b/typescript/.vscode/extensions.json @@ -3,7 +3,11 @@ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp // List of extensions which should be recommended for users of this workspace. - "recommendations": ["dbaeumer.vscode-eslint", "tintinweb.vscode-ethover"], + "recommendations": [ + "dbaeumer.vscode-eslint", + "oxc.oxc-vscode", + "tintinweb.vscode-ethover" + ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] } diff --git a/typescript/aleo-sdk/CHANGELOG.md b/typescript/aleo-sdk/CHANGELOG.md index d6fed983e94..907681c96eb 100644 --- a/typescript/aleo-sdk/CHANGELOG.md +++ b/typescript/aleo-sdk/CHANGELOG.md @@ -95,7 +95,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/aleo-sdk/package.json b/typescript/aleo-sdk/package.json index c07ef43c887..a1ffc88da6d 100644 --- a/typescript/aleo-sdk/package.json +++ b/typescript/aleo-sdk/package.json @@ -2,35 +2,41 @@ "name": "@hyperlane-xyz/aleo-sdk", "version": "25.0.0", "description": "Hyperlane TypeScript SDK for the Aleo Hyperlane SDK module", - "type": "module", - "exports": { - ".": "./dist/index.js", - "./testing": "./dist/testing/index.js" - }, - "types": "dist/index.d.ts", - "files": [ - "/dist" - ], - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "keywords": [ - "hyperlane", "aleo", "blockchain", + "hyperlane", "sdk" ], + "homepage": "https://www.hyperlane.xyz", "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js", + "./testing": "./dist/testing/index.js" + }, "scripts": { "prebuild": "node scripts/generate-artifacts.js", "build": "pnpm prebuild && rm -rf ./dist && tsc", - "format": "prettier --write .", + "format": "oxfmt --write ./src", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", "clean": "rm -rf ./dist ./cache", "test": "echo \"no tests in aleo-sdk\"", "test:ci": "echo \"no tests in aleo-sdk\"", "test:e2e": "./scripts/run-e2e-test.sh" }, + "dependencies": { + "@hyperlane-xyz/provider-sdk": "workspace:*", + "@hyperlane-xyz/utils": "workspace:*", + "@provablehq/sdk": "0.9.15", + "bignumber.js": "catalog:", + "unzipper": "^0.12.3" + }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/tsconfig": "workspace:^", @@ -49,19 +55,12 @@ "mocha": "catalog:", "mocha-steps": "catalog:", "node-fetch": "^3.3.2", - "prettier": "catalog:", + "oxfmt": "catalog:", "testcontainers": "catalog:", "ts-node": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:" }, - "dependencies": { - "@hyperlane-xyz/provider-sdk": "workspace:*", - "@hyperlane-xyz/utils": "workspace:*", - "@provablehq/sdk": "0.9.15", - "bignumber.js": "catalog:", - "unzipper": "^0.12.3" - }, "peerDependencies": { "testcontainers": "catalog:" }, diff --git a/typescript/aleo-sdk/src/hook/igp-hook.ts b/typescript/aleo-sdk/src/hook/igp-hook.ts index 83ddd4d6422..42ff785768a 100644 --- a/typescript/aleo-sdk/src/hook/igp-hook.ts +++ b/typescript/aleo-sdk/src/hook/igp-hook.ts @@ -30,9 +30,10 @@ import { getSetIgpHookOwnerTx, } from './hook-tx.js'; -export class AleoIgpHookReader - implements ArtifactReader -{ +export class AleoIgpHookReader implements ArtifactReader< + IgpHookConfig, + DeployedHookAddress +> { constructor(protected readonly aleoClient: AnyAleoNetworkClient) {} async read( diff --git a/typescript/aleo-sdk/src/hook/merkle-tree-hook.ts b/typescript/aleo-sdk/src/hook/merkle-tree-hook.ts index 4b48a19382b..deb240d56ff 100644 --- a/typescript/aleo-sdk/src/hook/merkle-tree-hook.ts +++ b/typescript/aleo-sdk/src/hook/merkle-tree-hook.ts @@ -28,9 +28,10 @@ import { getNewHookAddress } from './base.js'; import { getMerkleTreeHookConfig } from './hook-query.js'; import { getCreateMerkleTreeHookTx } from './hook-tx.js'; -export class AleoMerkleTreeHookReader - implements ArtifactReader -{ +export class AleoMerkleTreeHookReader implements ArtifactReader< + MerkleTreeHookConfig, + DeployedHookAddress +> { constructor(protected readonly aleoClient: AnyAleoNetworkClient) {} async read( diff --git a/typescript/aleo-sdk/src/ism/multisig-ism.ts b/typescript/aleo-sdk/src/ism/multisig-ism.ts index e3799d51ef5..97362a8b776 100644 --- a/typescript/aleo-sdk/src/ism/multisig-ism.ts +++ b/typescript/aleo-sdk/src/ism/multisig-ism.ts @@ -23,9 +23,10 @@ import { getNewIsmAddress } from './base.js'; import { getMessageIdMultisigIsmConfig } from './ism-query.js'; import { getCreateMessageIdMultisigIsmTx } from './ism-tx.js'; -export class AleoMessageIdMultisigIsmReader - implements ArtifactReader -{ +export class AleoMessageIdMultisigIsmReader implements ArtifactReader< + MultisigIsmConfig, + DeployedIsmAddress +> { constructor(protected readonly aleoClient: AnyAleoNetworkClient) {} async read( diff --git a/typescript/aleo-sdk/src/ism/routing-ism.ts b/typescript/aleo-sdk/src/ism/routing-ism.ts index b0f0469c2e3..ed06c18ef53 100644 --- a/typescript/aleo-sdk/src/ism/routing-ism.ts +++ b/typescript/aleo-sdk/src/ism/routing-ism.ts @@ -30,9 +30,10 @@ import { getSetRoutingIsmRouteTx, } from './ism-tx.js'; -export class AleoRoutingIsmRawReader - implements ArtifactReader -{ +export class AleoRoutingIsmRawReader implements ArtifactReader< + RawRoutingIsmArtifactConfig, + DeployedIsmAddress +> { constructor(protected readonly aleoClient: AnyAleoNetworkClient) {} async read( diff --git a/typescript/aleo-sdk/src/ism/test-ism.ts b/typescript/aleo-sdk/src/ism/test-ism.ts index dba344c2efd..2c1f935090c 100644 --- a/typescript/aleo-sdk/src/ism/test-ism.ts +++ b/typescript/aleo-sdk/src/ism/test-ism.ts @@ -23,9 +23,10 @@ import { getNewIsmAddress } from './base.js'; import { getTestIsmConfig } from './ism-query.js'; import { getCreateTestIsmTx } from './ism-tx.js'; -export class AleoTestIsmReader - implements ArtifactReader -{ +export class AleoTestIsmReader implements ArtifactReader< + TestIsmConfig, + DeployedIsmAddress +> { constructor(protected readonly aleoClient: AnyAleoNetworkClient) {} async read( diff --git a/typescript/ccip-server/package.json b/typescript/ccip-server/package.json index e0742f56038..d93af1adcdc 100644 --- a/typescript/ccip-server/package.json +++ b/typescript/ccip-server/package.json @@ -1,19 +1,16 @@ { "name": "@hyperlane-xyz/ccip-server", "version": "25.0.0", - "description": "CCIP server", - "typings": "dist/index.d.ts", - "typedocMain": "src/index.ts", "private": true, + "description": "CCIP server", + "license": "Apache-2.0", + "author": "brolee", "files": [ "src", "dist" ], - "engines": { - "node": ">=16" - }, "type": "module", - "moduleResolution": "nodenext", + "typings": "dist/index.d.ts", "scripts": { "postinstall": "prisma generate", "build": "prisma generate && tsc -p tsconfig.json", @@ -22,30 +19,7 @@ "dev": "NODE_ENV=development LOG_FORMAT=pretty tsx watch src/server.ts", "test": "jest", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src/* ./tests/" - }, - "author": "brolee", - "license": "Apache-2.0", - "devDependencies": { - "@hyperlane-xyz/tsconfig": "workspace:^", - "@jest/globals": "^29.7.0", - "@types/cors": "^2", - "@types/express": "^4.17.1", - "@types/node": "catalog:", - "@types/pg": "^8.16.0", - "@types/pino-http": "^5.8.4", - "@typescript-eslint/eslint-plugin": "catalog:", - "@typescript-eslint/parser": "catalog:", - "@vercel/ncc": "catalog:", - "eslint": "catalog:", - "eslint-import-resolver-typescript": "catalog:", - "jest": "^29.7.0", - "nodemon": "^3.0.3", - "pino-pretty": "catalog:", - "prettier": "catalog:", - "ts-jest": "^29.1.2", - "tsx": "catalog:", - "typescript": "catalog:" + "format": "oxfmt --write ./src ./tests" }, "dependencies": { "@eth-optimism/core-utils": "^0.13.2", @@ -58,7 +32,6 @@ "@hyperlane-xyz/registry": "catalog:", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/utils": "workspace:*", - "pino": "catalog:", "@prisma/adapter-pg": "^7.3.0", "@prisma/client": "^7.3.0", "cors": "^2.8.5", @@ -66,9 +39,35 @@ "ethers": "catalog:", "express": "^4.17.1", "pg": "^8.17.2", + "pino": "catalog:", "pino-http": "^8.6.1", "prisma": "^7.3.0", "prom-client": "catalog:", "zod": "catalog:" - } + }, + "devDependencies": { + "@hyperlane-xyz/tsconfig": "workspace:^", + "@jest/globals": "^29.7.0", + "@types/cors": "^2", + "@types/express": "^4.17.1", + "@types/node": "catalog:", + "@types/pg": "^8.16.0", + "@types/pino-http": "^5.8.4", + "@typescript-eslint/eslint-plugin": "catalog:", + "@typescript-eslint/parser": "catalog:", + "@vercel/ncc": "catalog:", + "eslint": "catalog:", + "eslint-import-resolver-typescript": "catalog:", + "jest": "^29.7.0", + "nodemon": "^3.0.3", + "pino-pretty": "catalog:", + "ts-jest": "^29.1.2", + "tsx": "catalog:", + "typescript": "catalog:" + }, + "engines": { + "node": ">=16" + }, + "moduleResolution": "nodenext", + "typedocMain": "src/index.ts" } diff --git a/typescript/ccip-server/src/services/BaseService.ts b/typescript/ccip-server/src/services/BaseService.ts index 89a774dce38..47d1be16071 100644 --- a/typescript/ccip-server/src/services/BaseService.ts +++ b/typescript/ccip-server/src/services/BaseService.ts @@ -19,8 +19,7 @@ export interface ServiceConfigWithMultiProvider extends ServiceConfig { multiProvider: MultiProvider; } -export interface ServiceConfigWithBaseUrl - extends ServiceConfigWithMultiProvider { +export interface ServiceConfigWithBaseUrl extends ServiceConfigWithMultiProvider { baseUrl: string; } diff --git a/typescript/cli/CHANGELOG.md b/typescript/cli/CHANGELOG.md index b5f3ec8c02c..95f04eebef9 100644 --- a/typescript/cli/CHANGELOG.md +++ b/typescript/cli/CHANGELOG.md @@ -22,7 +22,6 @@ - c094f7f: Allowed `warp check --ica` to validate ICA ownership on chains before warp apply/extension by moving config filtering after the ICA check. - 42b72c3: Extracted relayer into dedicated `@hyperlane-xyz/relayer` package - - Moved `HyperlaneRelayer` class from SDK to new package - Moved ISM metadata builders from SDK to relayer package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments @@ -83,7 +82,6 @@ - bc8b22f: Moved rebalancer-specific type definitions from `@hyperlane-xyz/sdk` to `@hyperlane-xyz/rebalancer`. Updated CLI and infra imports to use the new location. The rebalancer package is now self-contained and doesn't pollute the SDK with rebalancer-specific types. - 7032a7c: Added `hyperlane ica deploy` command to deploy Interchain Accounts (ICAs) on destination chains for a specified owner on an origin chain. The command accepts `--origin`, `--destinations`, `--owner`, and `--key` parameters, and outputs a table showing the deployment status for each destination chain. - 9963e0e: feat: separate rebalancer package - - Extract rebalancer logic from CLI into dedicated `@hyperlane-xyz/rebalancer` package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments - CLI now imports from new package, maintaining backward compatibility for manual rebalancing @@ -99,7 +97,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility @@ -1389,7 +1386,6 @@ - f44589e45: Improve warp and kurtosis deploy command UX - 2da6ccebe: Allow users to only configure validators for their chain - - Don't restrict user to having two chains for ism config - If the user accidentally picks two chains, we prompt them again to confirm if they don't want to use the hyperlane validators for their multisigConfig diff --git a/typescript/cli/package.json b/typescript/cli/package.json index 931ca6d5bca..2dbb422b9e9 100644 --- a/typescript/cli/package.json +++ b/typescript/cli/package.json @@ -2,6 +2,44 @@ "name": "@hyperlane-xyz/cli", "version": "25.0.0", "description": "A command-line utility for common Hyperlane operations", + "keywords": [ + "CLI", + "Deployment", + "Hyperlane", + "Permissionless", + "Typescript" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "bin": { + "hyperlane": "./bundle/index.js" + }, + "files": [ + "./bundle", + "./examples", + "package.json" + ], + "type": "module", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", + "scripts": { + "hyperlane": "node ./dist/cli.js", + "build": "pnpm version:update && tsc", + "bundle": "rm -rf ./bundle && ncc build ./dist/cli.js -o bundle && node ../../scripts/ncc.post-bundle.mjs", + "dev": "pnpm version:update && tsc --watch", + "clean": "rm -rf ./dist && rm -rf ./bundle", + "lint": "eslint -c ./eslint.config.mjs", + "format": "oxfmt --write ./src ./examples", + "test:ci": "mocha --config .mocharc.json", + "test:ethereum:e2e": "./src/tests/ethereum/run-e2e-test.sh", + "test:cross-chain:e2e": "./src/tests/cross-chain/run-e2e-test.sh", + "test:cosmosnative:e2e": "./src/tests/cosmosnative/run-e2e-test.sh", + "test:radix:e2e": "./src/tests/radix/run-e2e-test.sh", + "test:aleo:e2e": "./src/tests/aleo/run-e2e-test.sh", + "version:update": "echo \"export const VERSION = '$npm_package_version';\" > src/version.ts", + "prepack": "pnpm bundle" + }, "devDependencies": { "@aws-sdk/client-kms": "catalog:", "@aws-sdk/client-s3": "catalog:", @@ -19,8 +57,8 @@ "@hyperlane-xyz/provider-sdk": "workspace:*", "@hyperlane-xyz/radix-sdk": "workspace:*", "@hyperlane-xyz/rebalancer": "workspace:*", - "@hyperlane-xyz/relayer": "workspace:*", "@hyperlane-xyz/registry": "catalog:", + "@hyperlane-xyz/relayer": "workspace:*", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/tsconfig": "workspace:^", "@hyperlane-xyz/utils": "workspace:*", @@ -54,8 +92,8 @@ "latest-version": "^8.0.0", "lodash-es": "catalog:", "mocha": "catalog:", + "oxfmt": "catalog:", "pino": "catalog:", - "prettier": "catalog:", "prom-client": "catalog:", "sinon": "catalog:", "terminal-link": "^3.0.0", @@ -70,45 +108,7 @@ "zod-validation-error": "catalog:", "zx": "^8.1.4" }, - "scripts": { - "hyperlane": "node ./dist/cli.js", - "build": "pnpm version:update && tsc", - "bundle": "rm -rf ./bundle && ncc build ./dist/cli.js -o bundle && node ../../scripts/ncc.post-bundle.mjs", - "dev": "pnpm version:update && tsc --watch", - "clean": "rm -rf ./dist && rm -rf ./bundle", - "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src ./examples", - "test:ci": "mocha --config .mocharc.json", - "test:ethereum:e2e": "./src/tests/ethereum/run-e2e-test.sh", - "test:cross-chain:e2e": "./src/tests/cross-chain/run-e2e-test.sh", - "test:cosmosnative:e2e": "./src/tests/cosmosnative/run-e2e-test.sh", - "test:radix:e2e": "./src/tests/radix/run-e2e-test.sh", - "test:aleo:e2e": "./src/tests/aleo/run-e2e-test.sh", - "version:update": "echo \"export const VERSION = '$npm_package_version';\" > src/version.ts", - "prepack": "pnpm bundle" - }, - "files": [ - "./bundle", - "./examples", - "package.json" - ], - "main": "./dist/src/index.js", - "types": "./dist/src/index.d.ts", - "type": "module", "engines": { "node": ">=16" - }, - "bin": { - "hyperlane": "./bundle/index.js" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "license": "Apache-2.0", - "homepage": "https://www.hyperlane.xyz", - "keywords": [ - "Hyperlane", - "CLI", - "Permissionless", - "Deployment", - "Typescript" - ] + } } diff --git a/typescript/cli/src/commands/options.ts b/typescript/cli/src/commands/options.ts index 97632f86b8a..97df57f7d34 100644 --- a/typescript/cli/src/commands/options.ts +++ b/typescript/cli/src/commands/options.ts @@ -147,8 +147,10 @@ export const outputFileCommandOption = ( demandOption, }); -interface InputFileCommandOptionConfig - extends Pick { +interface InputFileCommandOptionConfig extends Pick< + Options, + 'demandOption' | 'alias' | 'description' +> { defaultPath?: string; } diff --git a/typescript/cli/src/context/types.ts b/typescript/cli/src/context/types.ts index 8b8a2ba6046..a708b0b681e 100644 --- a/typescript/cli/src/context/types.ts +++ b/typescript/cli/src/context/types.ts @@ -44,8 +44,10 @@ export interface ContextSettings extends BaseContext { authToken?: string; } -export interface CommandContext - extends Omit { +export interface CommandContext extends Omit< + BaseContext, + 'key' | 'skipConfirmation' +> { key?: SignerKeyProtocolMap; registry: IRegistry; chainMetadata: ChainMap; diff --git a/typescript/cli/src/submitters/EV5FileSubmitter.ts b/typescript/cli/src/submitters/EV5FileSubmitter.ts index 43685fd40ca..5addc534546 100644 --- a/typescript/cli/src/submitters/EV5FileSubmitter.ts +++ b/typescript/cli/src/submitters/EV5FileSubmitter.ts @@ -40,9 +40,7 @@ async function withFileLock( } } -export class EV5FileSubmitter - implements TxSubmitterInterface -{ +export class EV5FileSubmitter implements TxSubmitterInterface { txSubmitterType: TxSubmitterType = CustomTxSubmitterType.FILE as TxSubmitterType; protected readonly logger: Logger = rootLogger.child({ diff --git a/typescript/cli/src/utils/input.ts b/typescript/cli/src/utils/input.ts index b0806f2b8d0..57c568ae106 100644 --- a/typescript/cli/src/utils/input.ts +++ b/typescript/cli/src/utils/input.ts @@ -361,11 +361,10 @@ interface BuildViewOptions { instructions?: string; } -interface GetErrorMessageOptions - extends Pick< - BuildViewOptions, - 'theme' | 'errorMsg' | 'status' | 'searchTerm' - > { +interface GetErrorMessageOptions extends Pick< + BuildViewOptions, + 'theme' | 'errorMsg' | 'status' | 'searchTerm' +> { currentItemCount: number; } @@ -385,11 +384,10 @@ function getErrorMessage({ return ''; } -interface GetHelpTipsOptions - extends Pick< - BuildViewOptions, - 'theme' | 'pageSize' | 'firstRender' | 'instructions' - > { +interface GetHelpTipsOptions extends Pick< + BuildViewOptions, + 'theme' | 'pageSize' | 'firstRender' | 'instructions' +> { currentItemCount: number; } diff --git a/typescript/cosmos-sdk/CHANGELOG.md b/typescript/cosmos-sdk/CHANGELOG.md index 0f991278783..788b8ed9723 100644 --- a/typescript/cosmos-sdk/CHANGELOG.md +++ b/typescript/cosmos-sdk/CHANGELOG.md @@ -85,7 +85,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/cosmos-sdk/package.json b/typescript/cosmos-sdk/package.json index 14239b4f879..f285a0c0e77 100644 --- a/typescript/cosmos-sdk/package.json +++ b/typescript/cosmos-sdk/package.json @@ -2,7 +2,20 @@ "name": "@hyperlane-xyz/cosmos-sdk", "version": "25.0.0", "description": "Hyperlane TypeScript SDK for the Cosmos Hyperlane SDK module", + "keywords": [ + "blockchain", + "cosmos", + "hyperlane", + "sdk" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], "type": "module", + "types": "dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", @@ -13,30 +26,26 @@ "default": "./dist/testing/index.js" } }, - "types": "dist/index.d.ts", - "files": [ - "/dist" - ], - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "cosmos", - "blockchain", - "sdk" - ], - "license": "Apache-2.0", "scripts": { "build": "rm -rf ./dist && tsc", - "format": "prettier --write .", + "format": "oxfmt --write ./src", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", "clean": "rm -rf ./dist ./cache", "dev": "tsc --watch", "test": "echo \"no tests in cosmos-sdk\"", "test:ci": "echo \"no tests in cosmos-sdk\"", "test:e2e": "mocha --config .mocharc-e2e.json" }, + "dependencies": { + "@cosmjs/amino": "catalog:", + "@cosmjs/math": "catalog:", + "@cosmjs/proto-signing": "catalog:", + "@cosmjs/stargate": "catalog:", + "@cosmjs/tendermint-rpc": "catalog:", + "@hyperlane-xyz/cosmos-types": "workspace:*", + "@hyperlane-xyz/provider-sdk": "workspace:*", + "@hyperlane-xyz/utils": "workspace:*" + }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/eslint-config": "workspace:^", @@ -44,30 +53,20 @@ "@types/chai": "catalog:", "@types/chai-as-promised": "catalog:", "@types/mocha": "catalog:", - "chai": "catalog:", - "chai-as-promised": "catalog:", "@typescript-eslint/eslint-plugin": "catalog:", "@typescript-eslint/parser": "catalog:", + "chai": "catalog:", + "chai-as-promised": "catalog:", "eslint": "catalog:", "eslint-config-prettier": "catalog:", "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import": "catalog:", "mocha": "catalog:", "mocha-steps": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "testcontainers": "catalog:", "ts-node": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:" - }, - "dependencies": { - "@cosmjs/amino": "catalog:", - "@cosmjs/math": "catalog:", - "@cosmjs/proto-signing": "catalog:", - "@cosmjs/stargate": "catalog:", - "@cosmjs/tendermint-rpc": "catalog:", - "@hyperlane-xyz/cosmos-types": "workspace:*", - "@hyperlane-xyz/provider-sdk": "workspace:*", - "@hyperlane-xyz/utils": "workspace:*" } } diff --git a/typescript/cosmos-sdk/src/hook/igp-hook.ts b/typescript/cosmos-sdk/src/hook/igp-hook.ts index 28c44fc4ce0..092429bfa37 100644 --- a/typescript/cosmos-sdk/src/hook/igp-hook.ts +++ b/typescript/cosmos-sdk/src/hook/igp-hook.ts @@ -29,9 +29,10 @@ import { * Reader for Cosmos IGP (Interchain Gas Paymaster) Hook. * Reads deployed IGP hook configuration from the chain. */ -export class CosmosIgpHookReader - implements ArtifactReader -{ +export class CosmosIgpHookReader implements ArtifactReader< + IgpHookConfig, + DeployedHookAddress +> { constructor(protected readonly query: CosmosHookQueryClient) {} async read( diff --git a/typescript/cosmos-sdk/src/hook/merkle-tree-hook.ts b/typescript/cosmos-sdk/src/hook/merkle-tree-hook.ts index 8e466a172d2..248cfd693bc 100644 --- a/typescript/cosmos-sdk/src/hook/merkle-tree-hook.ts +++ b/typescript/cosmos-sdk/src/hook/merkle-tree-hook.ts @@ -28,9 +28,10 @@ import { getCreateMerkleTreeHookTx } from './hook-tx.js'; * Reads deployed MerkleTree hook configuration from the chain. * MerkleTree hooks are immutable once deployed. */ -export class CosmosMerkleTreeHookReader - implements ArtifactReader -{ +export class CosmosMerkleTreeHookReader implements ArtifactReader< + MerkleTreeHookConfig, + DeployedHookAddress +> { constructor(private readonly query: CosmosHookQueryClient) {} async read( diff --git a/typescript/cosmos-sdk/src/hyperlane/interchain_security/messages.ts b/typescript/cosmos-sdk/src/hyperlane/interchain_security/messages.ts index c282cecda06..933a63ae613 100644 --- a/typescript/cosmos-sdk/src/hyperlane/interchain_security/messages.ts +++ b/typescript/cosmos-sdk/src/hyperlane/interchain_security/messages.ts @@ -4,14 +4,12 @@ import { type isTx } from '@hyperlane-xyz/cosmos-types'; import { type COSMOS_MODULE_MESSAGE_REGISTRY as R } from '../../registry.js'; -export interface MsgCreateMessageIdMultisigIsmEncodeObject - extends EncodeObject { +export interface MsgCreateMessageIdMultisigIsmEncodeObject extends EncodeObject { readonly typeUrl: typeof R.MsgCreateMessageIdMultisigIsm.proto.type; readonly value: Partial; } -export interface MsgCreateMerkleRootMultisigIsmEncodeObject - extends EncodeObject { +export interface MsgCreateMerkleRootMultisigIsmEncodeObject extends EncodeObject { readonly typeUrl: typeof R.MsgCreateMerkleRootMultisigIsm.proto.type; readonly value: Partial; } diff --git a/typescript/cosmos-sdk/src/ism/multisig-ism.ts b/typescript/cosmos-sdk/src/ism/multisig-ism.ts index 72e30e0c890..68ac3be616a 100644 --- a/typescript/cosmos-sdk/src/ism/multisig-ism.ts +++ b/typescript/cosmos-sdk/src/ism/multisig-ism.ts @@ -31,9 +31,10 @@ import { * Reader for Cosmos Message ID Multisig ISM. * Uses message IDs for validator signature verification. */ -export class CosmosMessageIdMultisigIsmReader - implements ArtifactReader -{ +export class CosmosMessageIdMultisigIsmReader implements ArtifactReader< + MultisigIsmConfig, + DeployedIsmAddress +> { constructor(private readonly query: CosmosIsmQueryClient) {} async read( @@ -118,9 +119,10 @@ export class CosmosMessageIdMultisigIsmWriter * Reader for Cosmos Merkle Root Multisig ISM. * Uses merkle root proofs for validator signature verification. */ -export class CosmosMerkleRootMultisigIsmReader - implements ArtifactReader -{ +export class CosmosMerkleRootMultisigIsmReader implements ArtifactReader< + MultisigIsmConfig, + DeployedIsmAddress +> { constructor(private readonly query: CosmosIsmQueryClient) {} async read( diff --git a/typescript/cosmos-sdk/src/ism/routing-ism.ts b/typescript/cosmos-sdk/src/ism/routing-ism.ts index 2fc9d014ca2..74fcfe7cb07 100644 --- a/typescript/cosmos-sdk/src/ism/routing-ism.ts +++ b/typescript/cosmos-sdk/src/ism/routing-ism.ts @@ -32,9 +32,10 @@ import { * Returns nested ISMs as address-only references (UNDERIVED state). * The GenericIsmReader from deploy-sdk handles recursive expansion of nested ISMs. */ -export class CosmosRoutingIsmRawReader - implements ArtifactReader -{ +export class CosmosRoutingIsmRawReader implements ArtifactReader< + RawRoutingIsmArtifactConfig, + DeployedIsmAddress +> { constructor(protected readonly query: CosmosIsmQueryClient) {} async read( diff --git a/typescript/cosmos-sdk/src/ism/test-ism.ts b/typescript/cosmos-sdk/src/ism/test-ism.ts index f7ca64309cc..55a6ca2ca9c 100644 --- a/typescript/cosmos-sdk/src/ism/test-ism.ts +++ b/typescript/cosmos-sdk/src/ism/test-ism.ts @@ -24,9 +24,10 @@ import { getCreateTestIsmTx } from './ism-tx.js'; * Reader for Cosmos NoopIsm (test ISM). * This is the simplest ISM type with no configuration beyond its address. */ -export class CosmosTestIsmReader - implements ArtifactReader -{ +export class CosmosTestIsmReader implements ArtifactReader< + TestIsmConfig, + DeployedIsmAddress +> { constructor(private readonly query: CosmosIsmQueryClient) {} async read( diff --git a/typescript/cosmos-types/package.json b/typescript/cosmos-types/package.json index 9f345e8fdcf..8b401c10945 100644 --- a/typescript/cosmos-types/package.json +++ b/typescript/cosmos-types/package.json @@ -2,33 +2,36 @@ "name": "@hyperlane-xyz/cosmos-types", "version": "25.0.0", "description": "Hyperlane TypeScript SDK types for the Cosmos Hyperlane SDK module", - "type": "module", - "exports": { - ".": "./dist/index.js" - }, - "types": "dist/index.d.ts", - "files": [ - "/dist" - ], - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "keywords": [ - "hyperlane", - "cosmos", "blockchain", + "cosmos", + "hyperlane", "sdk", "types" ], + "homepage": "https://www.hyperlane.xyz", "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js" + }, "scripts": { "build": "rm -rf ./dist && tsc", - "format": "prettier --write .", + "format": "oxfmt --write ./src", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", "clean": "rm -rf ./dist ./cache", "test": "echo \"no tests in cosmos-types\"", "test:ci": "echo \"no tests in cosmos-types\"" }, + "dependencies": { + "long": "^5.2.4", + "protobufjs": "^7.4.0" + }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/tsconfig": "workspace:^", @@ -39,12 +42,8 @@ "eslint-config-prettier": "catalog:", "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:" - }, - "dependencies": { - "long": "^5.2.4", - "protobufjs": "^7.4.0" } } diff --git a/typescript/deploy-sdk/CHANGELOG.md b/typescript/deploy-sdk/CHANGELOG.md index 9389178b895..818490f1ade 100644 --- a/typescript/deploy-sdk/CHANGELOG.md +++ b/typescript/deploy-sdk/CHANGELOG.md @@ -111,7 +111,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/deploy-sdk/package.json b/typescript/deploy-sdk/package.json index 886e82155ed..c5f32fcd1a5 100644 --- a/typescript/deploy-sdk/package.json +++ b/typescript/deploy-sdk/package.json @@ -2,12 +2,12 @@ "name": "@hyperlane-xyz/deploy-sdk", "version": "1.3.1", "description": "Deployer SDK for the Hyperlane Protocol", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "license": "Apache-2.0", - "type": "module", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "files": [ "dist" ], + "type": "module", "types": "./dist/index.d.ts", "exports": { ".": "./dist/index.js", @@ -19,7 +19,7 @@ "dev": "tsc --watch", "lint": "eslint", "clean": "rm -rf ./dist", - "prettier": "prettier --write .", + "format": "oxfmt --write .", "test": "mocha --config .mocharc.json './src/**/*.test.ts' --exit" }, "dependencies": { diff --git a/typescript/deploy-sdk/src/hook/hook-reader.ts b/typescript/deploy-sdk/src/hook/hook-reader.ts index ddee9fd1da7..dd61d6df6f0 100644 --- a/typescript/deploy-sdk/src/hook/hook-reader.ts +++ b/typescript/deploy-sdk/src/hook/hook-reader.ts @@ -44,9 +44,10 @@ export function createHookReader( * Generic Hook Reader that can read any hook type by detecting its type. * Unlike ISMs, hooks don't have composite/nested types, so no recursive expansion needed. */ -export class HookReader - implements ArtifactReader -{ +export class HookReader implements ArtifactReader< + HookArtifactConfig, + DeployedHookAddress +> { protected readonly logger: Logger = rootLogger.child({ module: HookReader.name, }); diff --git a/typescript/deploy-sdk/src/ism/generic-ism.ts b/typescript/deploy-sdk/src/ism/generic-ism.ts index 91e7e51a57a..cd088702770 100644 --- a/typescript/deploy-sdk/src/ism/generic-ism.ts +++ b/typescript/deploy-sdk/src/ism/generic-ism.ts @@ -99,9 +99,10 @@ function artifactToDerivedConfig( * Generic ISM Reader that can read any ISM type by detecting its type * and recursively expanding nested ISMs (e.g., for routing ISMs). */ -export class IsmReader - implements ArtifactReader -{ +export class IsmReader implements ArtifactReader< + IsmArtifactConfig, + DeployedIsmAddress +> { protected readonly logger: Logger = rootLogger.child({ module: IsmReader.name, }); diff --git a/typescript/deploy-sdk/src/ism/routing-ism.ts b/typescript/deploy-sdk/src/ism/routing-ism.ts index cf7128659c3..c663b5be55e 100644 --- a/typescript/deploy-sdk/src/ism/routing-ism.ts +++ b/typescript/deploy-sdk/src/ism/routing-ism.ts @@ -30,9 +30,10 @@ type DeployedRoutingIsmArtifact = ArtifactDeployed< DeployedIsmAddress >; -export class RoutingIsmWriter - implements ArtifactWriter -{ +export class RoutingIsmWriter implements ArtifactWriter< + RoutingIsmArtifactConfig, + DeployedIsmAddress +> { protected readonly logger: Logger = rootLogger.child({ module: RoutingIsmWriter.name, }); diff --git a/typescript/deploy-sdk/src/protocol.ts b/typescript/deploy-sdk/src/protocol.ts index 1ca00313219..8dd89ba762c 100644 --- a/typescript/deploy-sdk/src/protocol.ts +++ b/typescript/deploy-sdk/src/protocol.ts @@ -15,23 +15,20 @@ export async function loadProtocolProviders( } switch (protocol) { case ProtocolType.CosmosNative: { - const { CosmosNativeProtocolProvider } = await import( - '@hyperlane-xyz/cosmos-sdk' - ); + const { CosmosNativeProtocolProvider } = + await import('@hyperlane-xyz/cosmos-sdk'); registerProtocol(protocol, () => new CosmosNativeProtocolProvider()); break; } case ProtocolType.Radix: { - const { RadixProtocolProvider } = await import( - '@hyperlane-xyz/radix-sdk' - ); + const { RadixProtocolProvider } = + await import('@hyperlane-xyz/radix-sdk'); registerProtocol(protocol, () => new RadixProtocolProvider()); break; } case ProtocolType.Aleo: { - const { AleoProtocolProvider } = await import( - '@hyperlane-xyz/aleo-sdk' - ); + const { AleoProtocolProvider } = + await import('@hyperlane-xyz/aleo-sdk'); registerProtocol(protocol, () => new AleoProtocolProvider()); break; } diff --git a/typescript/eslint-config/package.json b/typescript/eslint-config/package.json index 08a3bb5ed80..88d2d55d0bb 100644 --- a/typescript/eslint-config/package.json +++ b/typescript/eslint-config/package.json @@ -1,10 +1,10 @@ { "name": "@hyperlane-xyz/eslint-config", "version": "25.0.0", - "description": "Hyperlane ESLint config", "private": true, - "type": "module", + "description": "Hyperlane ESLint config", "license": "Apache-2.0", + "type": "module", "exports": { ".": "./index.js" }, diff --git a/typescript/github-proxy/package.json b/typescript/github-proxy/package.json index 235d77f830b..cdd5b31ccfb 100644 --- a/typescript/github-proxy/package.json +++ b/typescript/github-proxy/package.json @@ -1,8 +1,18 @@ { "name": "@hyperlane-xyz/github-proxy", - "description": "Github proxy that adds the API key to requests", "version": "25.0.0", "private": true, + "description": "Github proxy that adds the API key to requests", + "keywords": [ + "Github", + "Hyperlane", + "Proxy", + "Typescript" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "type": "module", "scripts": { "deploy": "wrangler deploy", "deploy:staging": "wrangler deploy --env staging", @@ -10,26 +20,15 @@ "dev": "wrangler dev", "start": "wrangler dev", "test": "vitest", - "prettier": "prettier --write ./src ./test", + "format": "oxfmt --write ./src ./test", "cf-typegen": "wrangler types" }, - "type": "module", - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "Hyperlane", - "Github", - "Proxy", - "Typescript" - ], - "license": "Apache-2.0", "devDependencies": { "@cloudflare/vitest-pool-workers": "^0.4.5", "@cloudflare/workers-types": "^4.20240821.1", "@faker-js/faker": "^8.4.1", "@hyperlane-xyz/tsconfig": "workspace:^", "chai": "catalog:", - "prettier": "catalog:", "typescript": "catalog:", "vitest": "1.4.0", "wrangler": "^3.74.0" diff --git a/typescript/helloworld/.prettierrc b/typescript/helloworld/.prettierrc index d7662e1351d..2d51c224efc 100644 --- a/typescript/helloworld/.prettierrc +++ b/typescript/helloworld/.prettierrc @@ -14,11 +14,7 @@ } } ], - "importOrder": ["^@hyperlane-xyz/(.*)$", "^../(.*)$", "^./(.*)$"], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, "plugins": [ - "prettier-plugin-solidity", - "@trivago/prettier-plugin-sort-imports" + "prettier-plugin-solidity" ] } diff --git a/typescript/helloworld/CHANGELOG.md b/typescript/helloworld/CHANGELOG.md index ac7193ca270..d6ee99dc07a 100644 --- a/typescript/helloworld/CHANGELOG.md +++ b/typescript/helloworld/CHANGELOG.md @@ -1293,7 +1293,6 @@ ### Minor Changes - 9681df08d: Enabled verification of contracts as part of the deployment flow. - - Solidity build artifact is now included as part of the `@hyperlane-xyz/core` package. - Updated the `HyperlaneDeployer` to perform contract verification immediately after deploying a contract. A default verifier is instantiated using the core build artifact. - Updated the `HyperlaneIsmFactory` to re-use the `HyperlaneDeployer` for deployment where possible. diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index 01d99051579..d1657fd22e8 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -1,7 +1,35 @@ { "name": "@hyperlane-xyz/helloworld", - "description": "A basic skeleton of an Hyperlane app", "version": "25.0.0", + "description": "A basic skeleton of an Hyperlane app", + "keywords": [ + "HelloWorld", + "Hyperlane", + "Solidity", + "Typescript" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist", + "/contracts" + ], + "type": "module", + "types": "./dist/index.d.ts", + "exports": "./dist/index.js", + "scripts": { + "build": "pnpm hardhat-esm clean && pnpm hardhat-esm compile && pnpm exec tsc", + "clean": "pnpm hardhat-esm clean && rm -rf dist cache src/types", + "coverage": "pnpm hardhat-esm coverage", + "lint": "pnpm lint:sol && pnpm lint:ts", + "lint:sol": "solhint contracts/**/*.sol", + "lint:ts": "eslint -c ./eslint.config.mjs", + "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", + "format": "oxfmt --write ./src && prettier --write ./contracts", + "test": "pnpm hardhat-esm test $(find ./src/test -name '*.test.ts')", + "test:ci": "pnpm test" + }, "dependencies": { "@hyperlane-xyz/core": "workspace:*", "@hyperlane-xyz/registry": "catalog:", @@ -15,11 +43,11 @@ }, "devDependencies": { "@eslint/js": "catalog:", + "@ethereum-waffle/chai": "^4.0.10", "@ethersproject/abi": "*", "@ethersproject/providers": "*", "@nomiclabs/hardhat-ethers": "catalog:", "@nomiclabs/hardhat-waffle": "catalog:", - "@trivago/prettier-plugin-sort-imports": "catalog:", "@typechain/ethers-v5": "catalog:", "@typechain/ethers-v6": "catalog:", "@typechain/hardhat": "catalog:", @@ -34,7 +62,6 @@ "eslint-config-prettier": "catalog:", "eslint-import-resolver-typescript": "catalog:", "eslint-plugin-import": "catalog:", - "@ethereum-waffle/chai": "^4.0.10", "ethereum-waffle": "catalog:", "hardhat": "catalog:", "hardhat-gas-reporter": "catalog:", @@ -44,38 +71,10 @@ "solhint-plugin-prettier": "catalog:", "solidity-coverage": "catalog:", "ts-node": "catalog:", - "typechain": "catalog:", "tsx": "catalog:", + "typechain": "catalog:", "typescript": "catalog:" }, - "homepage": "https://www.hyperlane.xyz", - "keywords": [ - "Hyperlane", - "HelloWorld", - "Solidity", - "Typescript" - ], - "license": "Apache-2.0", - "type": "module", - "exports": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "/dist", - "/contracts" - ], - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "scripts": { - "build": "pnpm hardhat-esm clean && pnpm hardhat-esm compile && pnpm exec tsc", - "clean": "pnpm hardhat-esm clean && rm -rf dist cache src/types", - "coverage": "pnpm hardhat-esm coverage", - "lint": "pnpm lint:sol && pnpm lint:ts", - "lint:sol": "solhint contracts/**/*.sol", - "lint:ts": "eslint -c ./eslint.config.mjs", - "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", - "prettier": "prettier --write ./contracts ./src", - "test": "pnpm hardhat-esm test $(find ./src/test -name '*.test.ts')", - "test:ci": "pnpm test" - }, "peerDependencies": { "@ethersproject/abi": "*", "@ethersproject/providers": "*", diff --git a/typescript/http-registry-server/package.json b/typescript/http-registry-server/package.json index 9156c840ece..8a1dcf23e43 100644 --- a/typescript/http-registry-server/package.json +++ b/typescript/http-registry-server/package.json @@ -3,15 +3,15 @@ "version": "25.0.0", "private": true, "description": "An HTTP server for the Hyperlane registry", - "license": "Apache-2.0", "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/hyperlane-xyz/hyperlane-monorepo" }, + "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", - "type": "module", "scripts": { "build": "tsc -p tsconfig.json", "clean": "rm -rf ./dist", @@ -19,7 +19,7 @@ "start:dev": "NODE_ENV=development LOG_FORMAT=pretty node dist/scripts/run-server.js", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src ./test", + "format": "oxfmt --write ./src ./test", "test": "pnpm test:unit", "test:ci": "pnpm test", "test:unit": "mocha --config .mocharc.json './test/**/*.ts' --exit" @@ -47,8 +47,8 @@ "chai-as-promised": "catalog:", "eslint": "catalog:", "mocha": "catalog:", + "oxfmt": "catalog:", "pino-pretty": "catalog:", - "prettier": "catalog:", "sinon": "catalog:", "supertest": "^6.3.3", "tsx": "catalog:", diff --git a/typescript/infra/CHANGELOG.md b/typescript/infra/CHANGELOG.md index 0a319c339f1..b326a1b4d72 100644 --- a/typescript/infra/CHANGELOG.md +++ b/typescript/infra/CHANGELOG.md @@ -50,7 +50,6 @@ ### Patch Changes - 42b72c3: Extracted relayer into dedicated `@hyperlane-xyz/relayer` package - - Moved `HyperlaneRelayer` class from SDK to new package - Moved ISM metadata builders from SDK to relayer package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments @@ -1552,7 +1551,6 @@ - 9681df08d: Remove support for goerli networks (including optimismgoerli, arbitrumgoerli, lineagoerli and polygonzkevmtestnet) - 9681df08d: Enabled verification of contracts as part of the deployment flow. - - Solidity build artifact is now included as part of the `@hyperlane-xyz/core` package. - Updated the `HyperlaneDeployer` to perform contract verification immediately after deploying a contract. A default verifier is instantiated using the core build artifact. - Updated the `HyperlaneIsmFactory` to re-use the `HyperlaneDeployer` for deployment where possible. diff --git a/typescript/infra/package.json b/typescript/infra/package.json index c55036da9aa..623d2b7fd30 100644 --- a/typescript/infra/package.json +++ b/typescript/infra/package.json @@ -1,7 +1,40 @@ { "name": "@hyperlane-xyz/infra", - "description": "Infrastructure utilities for the Hyperlane Network", "version": "25.0.0", + "private": true, + "description": "Infrastructure utilities for the Hyperlane Network", + "keywords": [ + "Hyperlane", + "Infrastructure", + "Typescript" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "type": "module", + "scripts": { + "start:http-registry": "tsx scripts/http-registry.ts", + "build": "tsc", + "check": "tsc --noEmit", + "clean": "rm -rf ./dist ./cache", + "deploy-core": "tsx scripts/deploy.ts -e test -m core", + "deploy-igp": "tsx scripts/deploy.ts -e test -m igp", + "deploy-ism": "tsx scripts/deploy.ts -e test -m ism", + "deploy-hook": "tsx scripts/deploy.ts -e test -m hook", + "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", + "kathy": "pnpm tsx ./scripts/send-test-messages.ts", + "format": "oxfmt --write ./src ./config ./scripts ./test", + "test:warp": "mocha --config ../sdk/.mocharc.json test/warp-configs.test.ts", + "test:gitleaks": "mocha --config ../sdk/.mocharc.json test/gitleaks.test.ts", + "test:balance": "mocha --config ../sdk/.mocharc.json test/balance-alerts.test.ts", + "test:unit": "mocha --config ../sdk/.mocharc.json \"test/**/*.test.ts\" --ignore \"test/{warp-configs,balance-alerts,gitleaks}.test.ts\"", + "test:hardhat": "pnpm hardhat-esm test test/govern.hardhat-test.ts", + "test": "pnpm test:unit && pnpm test:hardhat && pnpm test:warp && pnpm test:balance", + "test:ci": "pnpm test:unit && pnpm test:hardhat", + "update-agent-config:mainnet3": "tsx scripts/agents/update-agent-config.ts -e mainnet3", + "update-agent-config:test": "tsx scripts/agents/update-agent-config.ts -e test", + "update-agent-config:testnet4": "tsx scripts/agents/update-agent-config.ts -e testnet4" + }, "dependencies": { "@arbitrum/sdk": "catalog:", "@aws-sdk/client-iam": "^3.74.0", @@ -16,14 +49,14 @@ "@google-cloud/pino-logging-gcp-config": "catalog:", "@google-cloud/secret-manager": "^5.5.0", "@hyperlane-xyz/core": "workspace:*", + "@hyperlane-xyz/deploy-sdk": "workspace:*", "@hyperlane-xyz/http-registry-server": "workspace:*", "@hyperlane-xyz/keyfunder": "workspace:*", "@hyperlane-xyz/metrics": "workspace:*", + "@hyperlane-xyz/provider-sdk": "workspace:*", "@hyperlane-xyz/rebalancer": "workspace:*", - "@hyperlane-xyz/relayer": "workspace:*", "@hyperlane-xyz/registry": "catalog:", - "@hyperlane-xyz/deploy-sdk": "workspace:*", - "@hyperlane-xyz/provider-sdk": "workspace:*", + "@hyperlane-xyz/relayer": "workspace:*", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/utils": "workspace:*", "@inquirer/input": "^1.0.0", @@ -82,44 +115,10 @@ "ethers": "catalog:", "hardhat": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", "sinon": "catalog:", "smol-toml": "1.4.2", "ts-node": "catalog:", "tsx": "catalog:", "typescript": "catalog:" - }, - "private": true, - "homepage": "https://www.hyperlane.xyz", - "keywords": [ - "Hyperlane", - "Typescript", - "Infrastructure" - ], - "license": "Apache-2.0", - "type": "module", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "scripts": { - "start:http-registry": "tsx scripts/http-registry.ts", - "build": "tsc", - "check": "tsc --noEmit", - "clean": "rm -rf ./dist ./cache", - "deploy-core": "tsx scripts/deploy.ts -e test -m core", - "deploy-igp": "tsx scripts/deploy.ts -e test -m igp", - "deploy-ism": "tsx scripts/deploy.ts -e test -m ism", - "deploy-hook": "tsx scripts/deploy.ts -e test -m hook", - "hardhat-esm": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts", - "kathy": "pnpm tsx ./scripts/send-test-messages.ts", - "prettier": "prettier --write ./src ./config ./scripts ./test", - "test:warp": "mocha --config ../sdk/.mocharc.json test/warp-configs.test.ts", - "test:gitleaks": "mocha --config ../sdk/.mocharc.json test/gitleaks.test.ts", - "test:balance": "mocha --config ../sdk/.mocharc.json test/balance-alerts.test.ts", - "test:unit": "mocha --config ../sdk/.mocharc.json \"test/**/*.test.ts\" --ignore \"test/{warp-configs,balance-alerts,gitleaks}.test.ts\"", - "test:hardhat": "pnpm hardhat-esm test test/govern.hardhat-test.ts", - "test": "pnpm test:unit && pnpm test:hardhat && pnpm test:warp && pnpm test:balance", - "test:ci": "pnpm test:unit && pnpm test:hardhat", - "update-agent-config:mainnet3": "tsx scripts/agents/update-agent-config.ts -e mainnet3", - "update-agent-config:test": "tsx scripts/agents/update-agent-config.ts -e test", - "update-agent-config:testnet4": "tsx scripts/agents/update-agent-config.ts -e testnet4" } } diff --git a/typescript/infra/src/config/agent/agent.ts b/typescript/infra/src/config/agent/agent.ts index 99a8e050979..3a4cd890252 100644 --- a/typescript/infra/src/config/agent/agent.ts +++ b/typescript/infra/src/config/agent/agent.ts @@ -59,8 +59,7 @@ interface HelmHyperlaneValues { // See rust/main/helm/values.yaml for the full list of options and their defaults. // This is at `.hyperlane.chains` in the values file. -export interface HelmAgentChainOverride - extends DeepPartial { +export interface HelmAgentChainOverride extends DeepPartial { name: AgentChainMetadata['name']; } diff --git a/typescript/infra/src/config/funding.ts b/typescript/infra/src/config/funding.ts index aea69d453c4..ab79e868e89 100644 --- a/typescript/infra/src/config/funding.ts +++ b/typescript/infra/src/config/funding.ts @@ -30,8 +30,9 @@ export interface CronJobConfig { prometheusPushGateway: string; } -export interface KeyFunderConfig - extends CronJobConfig { +export interface KeyFunderConfig< + SupportedChains extends readonly ChainName[], +> extends CronJobConfig { contextFundingFrom: Contexts; contextsAndRolesToFund: ContextAndRolesMap; cyclesBetweenEthereumMessages?: number; diff --git a/typescript/keyfunder/package.json b/typescript/keyfunder/package.json index ec28150bb2c..a5c3dd625e1 100644 --- a/typescript/keyfunder/package.json +++ b/typescript/keyfunder/package.json @@ -3,20 +3,31 @@ "version": "0.0.3", "private": true, "description": "Hyperlane Key Funder Service - funds agent keys with native tokens", - "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "keywords": [ + "agent", + "blockchain", + "funding", + "hyperlane", + "interchain", + "keyfunder" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "files": [ "dist", "src" ], + "type": "module", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "scripts": { "build": "tsc", "bundle": "rm -rf ./bundle && ncc build ./dist/service.js -o bundle -e @google-cloud/pino-logging-gcp-config && node ../../scripts/ncc.post-bundle.mjs", "clean": "rm -rf dist cache bundle", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", "test:ci": "pnpm test", "start": "node dist/service.js", @@ -49,23 +60,12 @@ "chai-as-promised": "catalog:", "eslint": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "sinon": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "keyfunder", - "funding", - "agent", - "blockchain", - "interchain" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/metrics/package.json b/typescript/metrics/package.json index 622bdf6ec21..c69d134c172 100644 --- a/typescript/metrics/package.json +++ b/typescript/metrics/package.json @@ -2,19 +2,29 @@ "name": "@hyperlane-xyz/metrics", "version": "0.1.3", "description": "Shared Prometheus metrics utilities for Hyperlane monitoring", - "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "keywords": [ + "hyperlane", + "metrics", + "monitoring", + "prometheus", + "warp-route" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "files": [ "dist", "src" ], + "type": "module", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "scripts": { "build": "tsc", "clean": "rm -rf dist", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", "test:ci": "pnpm test" }, @@ -36,22 +46,12 @@ "chai": "catalog:", "eslint": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "sinon": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "prometheus", - "monitoring", - "metrics", - "warp-route" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/metrics/src/types.ts b/typescript/metrics/src/types.ts index ea593ef4a32..a73c19c50b8 100644 --- a/typescript/metrics/src/types.ts +++ b/typescript/metrics/src/types.ts @@ -68,8 +68,7 @@ export interface WarpRouteMetricLabels extends BaseWarpRouteMetricLabels { /** * Value at risk metric labels. */ -export interface WarpRouteValueAtRiskMetricLabels - extends BaseWarpRouteMetricLabels { +export interface WarpRouteValueAtRiskMetricLabels extends BaseWarpRouteMetricLabels { collateral_chain_name: ChainName; collateral_token_standard: SupportedTokenStandards; } diff --git a/typescript/provider-sdk/CHANGELOG.md b/typescript/provider-sdk/CHANGELOG.md index eb6c21fd75d..71705dd6818 100644 --- a/typescript/provider-sdk/CHANGELOG.md +++ b/typescript/provider-sdk/CHANGELOG.md @@ -70,7 +70,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/provider-sdk/package.json b/typescript/provider-sdk/package.json index 34f08c5e306..4d61c0ad9a1 100644 --- a/typescript/provider-sdk/package.json +++ b/typescript/provider-sdk/package.json @@ -2,12 +2,12 @@ "name": "@hyperlane-xyz/provider-sdk", "version": "1.3.1", "description": "Protocol Provider SDK for the Hyperlane Protocol", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "license": "Apache-2.0", - "type": "module", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "files": [ "dist" ], + "type": "module", "exports": { ".": "./dist/index.js", "./altvm": "./dist/altvm.js", @@ -29,7 +29,7 @@ "dev": "tsc --watch", "lint": "eslint", "clean": "rm -rf ./dist", - "prettier": "prettier --write .", + "format": "oxfmt --write .", "test": "mocha --config .mocharc.json", "test:ci": "mocha --config .mocharc.json" }, diff --git a/typescript/provider-sdk/src/hook.ts b/typescript/provider-sdk/src/hook.ts index d91e8595ee0..b9541526ba3 100644 --- a/typescript/provider-sdk/src/hook.ts +++ b/typescript/provider-sdk/src/hook.ts @@ -149,12 +149,11 @@ export type RawHookArtifactConfig = RawHookArtifactConfigs[HookType]; * Should be used to implement an object/closure or class that individually deploys * Hooks on chain */ -export interface IRawHookArtifactManager - extends IArtifactManager< - HookType, - RawHookArtifactConfigs, - DeployedHookAddress - > { +export interface IRawHookArtifactManager extends IArtifactManager< + HookType, + RawHookArtifactConfigs, + DeployedHookAddress +> { /** * Read any hook by detecting its type and delegating to the appropriate reader. * This is the generic entry point for reading hooks of unknown types. diff --git a/typescript/provider-sdk/src/ism.ts b/typescript/provider-sdk/src/ism.ts index a404aa2914c..9f99a3bdcfb 100644 --- a/typescript/provider-sdk/src/ism.ts +++ b/typescript/provider-sdk/src/ism.ts @@ -134,8 +134,11 @@ export type DeployedRawIsmArtifact = ArtifactDeployed< * Should be used to implement an object/closure or class that individually deploys * ISMs on chain */ -export interface IRawIsmArtifactManager - extends IArtifactManager { +export interface IRawIsmArtifactManager extends IArtifactManager< + IsmType, + RawIsmArtifactConfigs, + DeployedIsmAddress +> { /** * Read any ISM by detecting its type and delegating to the appropriate reader. * This is the generic entry point for reading ISMs of unknown types. diff --git a/typescript/radix-sdk/CHANGELOG.md b/typescript/radix-sdk/CHANGELOG.md index 60b8b629937..0252593c2b4 100644 --- a/typescript/radix-sdk/CHANGELOG.md +++ b/typescript/radix-sdk/CHANGELOG.md @@ -71,7 +71,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/radix-sdk/package.json b/typescript/radix-sdk/package.json index f8bac86dc2e..5fed715b356 100644 --- a/typescript/radix-sdk/package.json +++ b/typescript/radix-sdk/package.json @@ -2,7 +2,21 @@ "name": "@hyperlane-xyz/radix-sdk", "version": "25.0.0", "description": "Hyperlane TypeScript SDK for the Radix Hyperlane SDK module", + "keywords": [ + "blockchain", + "hyperlane", + "radix", + "sdk" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist", + "docker-compose.yml" + ], "type": "module", + "types": "dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", @@ -13,25 +27,10 @@ "default": "./dist/testing/index.js" } }, - "types": "dist/index.d.ts", - "files": [ - "/dist", - "docker-compose.yml" - ], - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "radix", - "blockchain", - "sdk" - ], - "license": "Apache-2.0", "scripts": { "build": "rm -rf ./dist && tsc", - "format": "prettier --write .", + "format": "oxfmt --write ./src", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", "clean": "rm -rf ./dist ./cache", "dev": "tsc --watch", "test": "echo \"no tests in radix-sdk\"", @@ -39,6 +38,16 @@ "test:ci": "pnpm test:unit", "test:e2e": "mocha --config .mocharc.e2e.json" }, + "dependencies": { + "@hyperlane-xyz/provider-sdk": "workspace:*", + "@hyperlane-xyz/utils": "workspace:*", + "@radixdlt/babylon-core-api-sdk": "^1.3.0", + "@radixdlt/babylon-gateway-api-sdk": "catalog:", + "@radixdlt/radix-engine-toolkit": "^1.0.5", + "bignumber.js": "catalog:", + "decimal.js": "^10.4.3", + "ethers": "catalog:" + }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/eslint-config": "workspace:^", @@ -54,21 +63,11 @@ "eslint-plugin-import": "catalog:", "mocha": "catalog:", "mocha-steps": "catalog:", - "prettier": "catalog:", - "ts-node": "catalog:", + "oxfmt": "catalog:", "testcontainers": "catalog:", + "ts-node": "catalog:", "tsx": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:" - }, - "dependencies": { - "@hyperlane-xyz/provider-sdk": "workspace:*", - "@hyperlane-xyz/utils": "workspace:*", - "@radixdlt/babylon-core-api-sdk": "^1.3.0", - "@radixdlt/babylon-gateway-api-sdk": "catalog:", - "@radixdlt/radix-engine-toolkit": "^1.0.5", - "bignumber.js": "catalog:", - "decimal.js": "^10.4.3", - "ethers": "catalog:" } } diff --git a/typescript/radix-sdk/src/hook/igp-hook.ts b/typescript/radix-sdk/src/hook/igp-hook.ts index 022ec7ddd20..c9b01d49e0a 100644 --- a/typescript/radix-sdk/src/hook/igp-hook.ts +++ b/typescript/radix-sdk/src/hook/igp-hook.ts @@ -26,9 +26,10 @@ import { getSetIgpOwnerTx, } from './hook-tx.js'; -export class RadixIgpHookReader - implements ArtifactReader -{ +export class RadixIgpHookReader implements ArtifactReader< + IgpHookConfig, + DeployedHookAddress +> { constructor(protected readonly gateway: Readonly) {} async read( diff --git a/typescript/radix-sdk/src/hook/merkle-tree-hook.ts b/typescript/radix-sdk/src/hook/merkle-tree-hook.ts index 59fc9852927..7aa523d1ed4 100644 --- a/typescript/radix-sdk/src/hook/merkle-tree-hook.ts +++ b/typescript/radix-sdk/src/hook/merkle-tree-hook.ts @@ -21,9 +21,10 @@ import { AnnotatedRadixTransaction } from '../utils/types.js'; import { getMerkleTreeHookConfig } from './hook-query.js'; import { getCreateMerkleTreeHookTx } from './hook-tx.js'; -export class RadixMerkleTreeHookReader - implements ArtifactReader -{ +export class RadixMerkleTreeHookReader implements ArtifactReader< + MerkleTreeHookConfig, + DeployedHookAddress +> { constructor(private readonly gateway: Readonly) {} async read( diff --git a/typescript/radix-sdk/src/ism/multisig-ism.ts b/typescript/radix-sdk/src/ism/multisig-ism.ts index 584c3544f4f..0aae9851f53 100644 --- a/typescript/radix-sdk/src/ism/multisig-ism.ts +++ b/typescript/radix-sdk/src/ism/multisig-ism.ts @@ -24,9 +24,10 @@ import { getCreateMessageIdMultisigIsmTx, } from './ism-tx.js'; -export class RadixMessageIdMultisigIsmReader - implements ArtifactReader -{ +export class RadixMessageIdMultisigIsmReader implements ArtifactReader< + MultisigIsmConfig, + DeployedIsmAddress +> { constructor(private readonly gateway: Readonly) {} async read( @@ -102,9 +103,10 @@ export class RadixMessageIdMultisigIsmWriter } } -export class RadixMerkleRootMultisigIsmReader - implements ArtifactReader -{ +export class RadixMerkleRootMultisigIsmReader implements ArtifactReader< + MultisigIsmConfig, + DeployedIsmAddress +> { constructor(private readonly gateway: Readonly) {} async read( diff --git a/typescript/radix-sdk/src/ism/routing-ism.ts b/typescript/radix-sdk/src/ism/routing-ism.ts index 5049ed1d170..dadd72ce24e 100644 --- a/typescript/radix-sdk/src/ism/routing-ism.ts +++ b/typescript/radix-sdk/src/ism/routing-ism.ts @@ -28,9 +28,10 @@ import { getSetRoutingIsmOwnerTx, } from './ism-tx.js'; -export class RadixRoutingIsmRawReader - implements ArtifactReader -{ +export class RadixRoutingIsmRawReader implements ArtifactReader< + RawRoutingIsmArtifactConfig, + DeployedIsmAddress +> { constructor(protected readonly gateway: Readonly) {} async read( diff --git a/typescript/radix-sdk/src/ism/test-ism.ts b/typescript/radix-sdk/src/ism/test-ism.ts index 35db775741d..b74c8084183 100644 --- a/typescript/radix-sdk/src/ism/test-ism.ts +++ b/typescript/radix-sdk/src/ism/test-ism.ts @@ -21,9 +21,10 @@ import { AnnotatedRadixTransaction } from '../utils/types.js'; import { getTestIsmConfig } from './ism-query.js'; import { getCreateNoopIsmTx } from './ism-tx.js'; -export class RadixTestIsmReader - implements ArtifactReader -{ +export class RadixTestIsmReader implements ArtifactReader< + TestIsmConfig, + DeployedIsmAddress +> { constructor(private readonly gateway: Readonly) {} async read( diff --git a/typescript/rebalancer-sim/package.json b/typescript/rebalancer-sim/package.json index a8af59a2cc2..940b0c2ad40 100644 --- a/typescript/rebalancer-sim/package.json +++ b/typescript/rebalancer-sim/package.json @@ -2,28 +2,38 @@ "name": "@hyperlane-xyz/rebalancer-sim", "version": "0.1.2", "description": "Fast real-time simulation framework for testing Hyperlane warp route rebalancers", - "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "keywords": [ + "hyperlane", + "rebalancer", + "simulation", + "testing", + "warp-route" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "files": [ "dist", "src" ], + "type": "module", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "scripts": { "build": "tsc", "clean": "rm -rf dist cache", "dev": "tsc --watch", "generate-scenarios": "tsx scripts/generate-scenarios.ts", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "mocha --config .mocharc.json './test/**/*.test.ts' --exit", "test:ci": "pnpm test" }, "dependencies": { "@hyperlane-xyz/core": "workspace:*", "@hyperlane-xyz/provider-sdk": "workspace:*", - "@hyperlane-xyz/registry": "catalog:", "@hyperlane-xyz/rebalancer": "workspace:*", + "@hyperlane-xyz/registry": "catalog:", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/utils": "workspace:*", "ethers": "catalog:", @@ -41,22 +51,11 @@ "chai-as-promised": "catalog:", "eslint": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", "testcontainers": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "rebalancer", - "simulation", - "testing", - "warp-route" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/rebalancer/CHANGELOG.md b/typescript/rebalancer/CHANGELOG.md index 071ae9a4074..a436faaf0c1 100644 --- a/typescript/rebalancer/CHANGELOG.md +++ b/typescript/rebalancer/CHANGELOG.md @@ -39,7 +39,6 @@ - 0e1e48a: Inflight-aware rebalancing system with ActionTracker, new strategies, and type safety improvements. Breaking changes: - - IRebalancer.rebalance() returned RebalanceExecutionResult[] instead of void - IStrategy.getRebalancingRoutes() accepted optional inflightContext parameter - IStrategy required a name property @@ -47,7 +46,6 @@ - MonitorEvent included confirmedBlockTags for confirmed block queries New features: - - ActionTracker for tracking pending transfers and rebalance actions with Explorer integration - CollateralDeficitStrategy for just-in-time rebalancing based on pending inbound transfers - CompositeStrategy for chaining multiple strategies with coordination @@ -56,7 +54,6 @@ - Strategy config supports array format for composing multiple strategies (backwards compatible) Bug fixes: - - Record failure metrics when rebalance results contain failures - Treat missing Dispatch event as rebalance failure - Fix CompositeStrategy oscillation by separating proposed from pending rebalances @@ -128,7 +125,6 @@ - bc8b22f: Moved rebalancer-specific type definitions from `@hyperlane-xyz/sdk` to `@hyperlane-xyz/rebalancer`. Updated CLI and infra imports to use the new location. The rebalancer package is now self-contained and doesn't pollute the SDK with rebalancer-specific types. - 9963e0e: feat: separate rebalancer package - - Extract rebalancer logic from CLI into dedicated `@hyperlane-xyz/rebalancer` package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments - CLI now imports from new package, maintaining backward compatibility for manual rebalancing diff --git a/typescript/rebalancer/package.json b/typescript/rebalancer/package.json index 76ea04f1883..c0eb217b429 100644 --- a/typescript/rebalancer/package.json +++ b/typescript/rebalancer/package.json @@ -2,9 +2,17 @@ "name": "@hyperlane-xyz/rebalancer", "version": "1.0.2", "description": "Hyperlane Warp Route Collateral Rebalancer Service", - "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "keywords": [ + "blockchain", + "collateral", + "hyperlane", + "interchain", + "rebalancer", + "warp-route" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "bin": { "hyperlane-rebalancer": "./dist/service.js" }, @@ -12,13 +20,16 @@ "dist", "src" ], + "type": "module", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "scripts": { "build": "tsc", "bundle": "rm -rf ./bundle && ncc build ./dist/service.js -o bundle -e @google-cloud/pino-logging-gcp-config && node ../../scripts/ncc.post-bundle.mjs", "clean": "rm -rf dist cache bundle", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", "test:ci": "pnpm test", "start": "node dist/service.js", @@ -27,11 +38,11 @@ "dependencies": { "@google-cloud/pino-logging-gcp-config": "catalog:", "@hyperlane-xyz/core": "workspace:*", + "@hyperlane-xyz/metrics": "workspace:*", "@hyperlane-xyz/provider-sdk": "workspace:*", "@hyperlane-xyz/registry": "catalog:", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/utils": "workspace:*", - "@hyperlane-xyz/metrics": "workspace:*", "@inquirer/prompts": "catalog:", "@inquirer/select": "catalog:", "bignumber.js": "catalog:", @@ -59,23 +70,12 @@ "chai-as-promised": "catalog:", "eslint": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "sinon": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "rebalancer", - "warp-route", - "collateral", - "blockchain", - "interchain" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/rebalancer/src/tracking/store/InMemoryStore.ts b/typescript/rebalancer/src/tracking/store/InMemoryStore.ts index 181cf49fd90..bbd94e22b85 100644 --- a/typescript/rebalancer/src/tracking/store/InMemoryStore.ts +++ b/typescript/rebalancer/src/tracking/store/InMemoryStore.ts @@ -11,9 +11,10 @@ import type { IStore } from './IStore.js'; * @template T - The entity type extending TrackedActionBase * @template Status - The status enum type for this entity */ -export class InMemoryStore - implements IStore -{ +export class InMemoryStore< + T extends TrackedActionBase, + Status extends string, +> implements IStore { protected data: Map = new Map(); async save(entity: T): Promise { diff --git a/typescript/rebalancer/src/tracking/types.ts b/typescript/rebalancer/src/tracking/types.ts index d2c3180e813..c55e39c580e 100644 --- a/typescript/rebalancer/src/tracking/types.ts +++ b/typescript/rebalancer/src/tracking/types.ts @@ -20,9 +20,7 @@ export interface Timestamped { } export interface TrackedActionBase - extends Identifiable, - CrossChainAction, - Timestamped { + extends Identifiable, CrossChainAction, Timestamped { status: string; } diff --git a/typescript/relayer/CHANGELOG.md b/typescript/relayer/CHANGELOG.md index bd4fba41ae5..1cc0047ac3f 100644 --- a/typescript/relayer/CHANGELOG.md +++ b/typescript/relayer/CHANGELOG.md @@ -41,7 +41,6 @@ ### Minor Changes - 42b72c3: Extracted relayer into dedicated `@hyperlane-xyz/relayer` package - - Moved `HyperlaneRelayer` class from SDK to new package - Moved ISM metadata builders from SDK to relayer package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments diff --git a/typescript/relayer/package.json b/typescript/relayer/package.json index 4be57a06d2b..e91895e4a7a 100644 --- a/typescript/relayer/package.json +++ b/typescript/relayer/package.json @@ -2,17 +2,24 @@ "name": "@hyperlane-xyz/relayer", "version": "1.0.1", "description": "Hyperlane Message Relayer Service", - "type": "module", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "./fs": { - "types": "./dist/fs/index.d.ts", - "default": "./dist/fs/index.js" - } + "keywords": [ + "blockchain", + "hyperlane", + "interchain", + "message", + "relayer" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "bin": { + "hyperlane-relayer": "./dist/fs/service.js" }, + "files": [ + "dist", + "src" + ], + "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "typesVersions": { @@ -22,20 +29,23 @@ ] } }, - "bin": { - "hyperlane-relayer": "./dist/fs/service.js" + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./fs": { + "types": "./dist/fs/index.d.ts", + "default": "./dist/fs/index.js" + } }, - "files": [ - "dist", - "src" - ], "scripts": { "build": "tsc", "bundle": "rm -rf ./bundle && ncc build ./dist/fs/service.js -o bundle -e @google-cloud/pino-logging-gcp-config && node ../../scripts/ncc.post-bundle.mjs", "clean": "rm -rf dist cache bundle", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "pnpm test:unit && pnpm test:hardhat", "test:ci": "pnpm test", "test:unit": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", @@ -62,7 +72,6 @@ "devDependencies": { "@ethersproject/providers": "*", "@hyperlane-xyz/eslint-config": "workspace:^", - "@vercel/ncc": "catalog:", "@hyperlane-xyz/tsconfig": "workspace:^", "@nomiclabs/hardhat-ethers": "catalog:", "@nomiclabs/hardhat-waffle": "catalog:", @@ -71,28 +80,19 @@ "@types/mocha": "catalog:", "@types/node": "catalog:", "@types/sinon": "catalog:", + "@vercel/ncc": "catalog:", "chai": "catalog:", "chai-as-promised": "catalog:", "eslint": "catalog:", "ethereum-waffle": "catalog:", "hardhat": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "sinon": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "relayer", - "message", - "interchain", - "blockchain" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/relayer/src/metadata/multisig.ts b/typescript/relayer/src/metadata/multisig.ts index cb42515746a..53cdcf6a71b 100644 --- a/typescript/relayer/src/metadata/multisig.ts +++ b/typescript/relayer/src/metadata/multisig.ts @@ -44,8 +44,10 @@ interface MessageIdMultisigMetadata { checkpoint: Omit; } -interface MerkleRootMultisigMetadata - extends Omit { +interface MerkleRootMultisigMetadata extends Omit< + MessageIdMultisigMetadata, + 'type' +> { type: typeof IsmType.MERKLE_ROOT_MULTISIG; proof: MerkleProof; } diff --git a/typescript/relayer/src/metadata/types.ts b/typescript/relayer/src/metadata/types.ts index 01a20ba6790..9d3230534b6 100644 --- a/typescript/relayer/src/metadata/types.ts +++ b/typescript/relayer/src/metadata/types.ts @@ -90,8 +90,7 @@ export interface MultisigMetadataBuildResult extends BaseMetadataBuildResult { } /** Result for aggregation ISM types */ -export interface AggregationMetadataBuildResult - extends BaseMetadataBuildResult { +export interface AggregationMetadataBuildResult extends BaseMetadataBuildResult { type: typeof IsmType.AGGREGATION | typeof IsmType.STORAGE_AGGREGATION; /** Required number of passing sub-modules */ threshold: number; diff --git a/typescript/sdk/CHANGELOG.md b/typescript/sdk/CHANGELOG.md index 6012e0a8432..c1584964d7e 100644 --- a/typescript/sdk/CHANGELOG.md +++ b/typescript/sdk/CHANGELOG.md @@ -32,7 +32,6 @@ Added real-time validator signature status to MetadataBuilder. The builder now returns detailed information about which validators have signed a message, their checkpoint indices, and actual signatures. New exports: `ValidatorInfo`, `MetadataBuildResult`, `DerivedHookConfig`, and helper functions `isMetadataBuildable()`, `getSignedValidatorCount()`, `isQuorumMet()`. Performance optimizations: - - EvmIsmReader routing ISM derivation reduced from ~5.7s to ~724ms via messageContext short-circuit - EvmHookReader RPC calls parallelized across all derivation methods - SmartProvider retry logic fixed to correctly identify permanent errors @@ -76,7 +75,6 @@ - 6ddef74: Fix warp check for Aleo. - 9aa93f4: Added optional `waitConfirmations` parameter to `sendTransaction()` and `handleTx()` methods in MultiProvider, which allowed callers to specify a custom number of confirmations or a block tag like "finalized" or "safe" to wait for before returning. Added `waitForBlockTag()` helper method that polled until the tagged block number reached the transaction's block number. Exported new `SendTransactionOptions` interface from SDK. - 42b72c3: Extracted relayer into dedicated `@hyperlane-xyz/relayer` package - - Moved `HyperlaneRelayer` class from SDK to new package - Moved ISM metadata builders from SDK to relayer package - New package supports both manual CLI execution and continuous daemon mode for K8s deployments @@ -194,7 +192,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility @@ -504,7 +501,6 @@ ### Minor Changes - 554ff1a66: Add M0 PortalLite token adapter support for bridging M tokens - - Add new TokenStandard.EvmM0PortalLite for M0 Portal integration - Implement M0PortalLiteTokenAdapter for handling M0 token transfers - Support for M0's transferMLikeToken function to bridge wrapped M tokens (e.g., mUSD) @@ -1863,7 +1859,6 @@ **Breaking change**: Token Adapter `quoteGasPayment` method renamed to `quoteTransferRemoteGas` for clarity. - 9681df08d: Remove support for goerli networks (including optimismgoerli, arbitrumgoerli, lineagoerli and polygonzkevmtestnet) - 9681df08d: Enabled verification of contracts as part of the deployment flow. - - Solidity build artifact is now included as part of the `@hyperlane-xyz/core` package. - Updated the `HyperlaneDeployer` to perform contract verification immediately after deploying a contract. A default verifier is instantiated using the core build artifact. - Updated the `HyperlaneIsmFactory` to re-use the `HyperlaneDeployer` for deployment where possible. diff --git a/typescript/sdk/package.json b/typescript/sdk/package.json index b2556fc9331..8f1ece67506 100644 --- a/typescript/sdk/package.json +++ b/typescript/sdk/package.json @@ -1,7 +1,38 @@ { "name": "@hyperlane-xyz/sdk", - "description": "The official SDK for the Hyperlane Network", "version": "25.0.0", + "description": "The official SDK for the Hyperlane Network", + "keywords": [ + "Hyperlane", + "SDK", + "Typescript" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "sideEffects": false, + "types": "./dist/index.d.ts", + "exports": { + ".": "./dist/index.js" + }, + "scripts": { + "build": "tsc", + "dev": "tsc --watch", + "check": "tsc --noEmit", + "clean": "rm -rf ./dist ./cache", + "lint": "eslint -c ./eslint.config.mjs", + "prepublishOnly": "pnpm build", + "format": "oxfmt --write ./src", + "test": "pnpm test:unit && pnpm test:hardhat && pnpm test:foundry", + "test:ci": "pnpm test", + "test:unit": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", + "test:hardhat": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts test $(find ./src -name \"*.hardhat-test.ts\")", + "test:foundry": "./scripts/foundry-test.sh" + }, "dependencies": { "@arbitrum/sdk": "catalog:", "@aws-sdk/client-s3": "catalog:", @@ -14,8 +45,8 @@ "@cosmjs/proto-signing": "catalog:", "@cosmjs/stargate": "catalog:", "@cosmjs/tendermint-rpc": "catalog:", - "@hyperlane-xyz/core": "workspace:*", "@hyperlane-xyz/aleo-sdk": "workspace:*", + "@hyperlane-xyz/core": "workspace:*", "@hyperlane-xyz/cosmos-sdk": "workspace:*", "@hyperlane-xyz/deploy-sdk": "workspace:*", "@hyperlane-xyz/provider-sdk": "workspace:*", @@ -64,7 +95,6 @@ "hardhat": "catalog:", "hardhat-gas-reporter": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", "sinon": "catalog:", "solidity-coverage": "catalog:", "ts-node": "catalog:", @@ -72,41 +102,10 @@ "typescript": "catalog:", "yaml": "catalog:" }, - "type": "module", - "exports": { - ".": "./dist/index.js" + "peerDependencies": { + "@ethersproject/abi": "*" }, - "types": "./dist/index.d.ts", - "files": [ - "/dist" - ], - "sideEffects": false, "engines": { "node": ">=16" - }, - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "Hyperlane", - "SDK", - "Typescript" - ], - "license": "Apache-2.0", - "scripts": { - "build": "tsc", - "dev": "tsc --watch", - "check": "tsc --noEmit", - "clean": "rm -rf ./dist ./cache", - "lint": "eslint -c ./eslint.config.mjs", - "prepublishOnly": "pnpm build", - "prettier": "prettier --write ./src", - "test": "pnpm test:unit && pnpm test:hardhat && pnpm test:foundry", - "test:ci": "pnpm test", - "test:unit": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", - "test:hardhat": "NODE_OPTIONS='--import tsx/esm' hardhat --config hardhat.config.cts test $(find ./src -name \"*.hardhat-test.ts\")", - "test:foundry": "./scripts/foundry-test.sh" - }, - "peerDependencies": { - "@ethersproject/abi": "*" } } diff --git a/typescript/sdk/src/block-explorer/etherscan.ts b/typescript/sdk/src/block-explorer/etherscan.ts index ea9f980ae4c..9fa338e5080 100644 --- a/typescript/sdk/src/block-explorer/etherscan.ts +++ b/typescript/sdk/src/block-explorer/etherscan.ts @@ -127,11 +127,10 @@ function getFormPostRequestBody< }; } -interface GetContractDeploymentTransaction - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.CONTRACT, - EtherscanLikeExplorerApiAction.GET_CONTRACT_CREATION_CODE - > { +interface GetContractDeploymentTransaction extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.CONTRACT, + EtherscanLikeExplorerApiAction.GET_CONTRACT_CREATION_CODE +> { contractaddresses: Address; } @@ -181,11 +180,10 @@ export async function getContractDeploymentTransaction( } // based on https://docs.etherscan.io/api-endpoints/logs -interface GetEventLogs - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.LOGS, - EtherscanLikeExplorerApiAction.GET_LOGS - > { +interface GetEventLogs extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.LOGS, + EtherscanLikeExplorerApiAction.GET_LOGS +> { address: Address; fromBlock: number; toBlock: number; @@ -238,11 +236,10 @@ export async function getLogsFromEtherscanLikeExplorerAPI( ); } -interface GetContractVerificationStatus - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.CONTRACT, - EtherscanLikeExplorerApiAction.GETSOURCECODE - > { +interface GetContractVerificationStatus extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.CONTRACT, + EtherscanLikeExplorerApiAction.GETSOURCECODE +> { address: Address; } @@ -293,11 +290,10 @@ type VerifyImplementationContractViaSolidityStandardJsonOptions = { constructorArguments?: HexString; }; -interface RawVerifyImplementationContractViaSolidityStandardJsonOptions - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.CONTRACT, - EtherscanLikeExplorerApiAction.VERIFY_IMPLEMENTATION - > { +interface RawVerifyImplementationContractViaSolidityStandardJsonOptions extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.CONTRACT, + EtherscanLikeExplorerApiAction.VERIFY_IMPLEMENTATION +> { codeformat: 'solidity-standard-json-input'; compilerversion: string; // see https://etherscan.io/solcversions for list of support versions licenseType?: ExplorerLicenseType; @@ -348,11 +344,10 @@ type VerifyProxyContractOptions = { implementationAddress: Address; }; -interface RawVerifyProxyContractOptions - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.CONTRACT, - EtherscanLikeExplorerApiAction.VERIFY_PROXY - > { +interface RawVerifyProxyContractOptions extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.CONTRACT, + EtherscanLikeExplorerApiAction.VERIFY_PROXY +> { address: Address; expectedimplementation: Address; } @@ -379,12 +374,11 @@ export async function verifyProxyContract( return handleEtherscanResponse(response); } -interface RawGetContractVerificationStatus - extends BaseEtherscanLikeAPIParams< - EtherscanLikeExplorerApiModule.CONTRACT, - | EtherscanLikeExplorerApiAction.CHECK_IMPLEMENTATION_STATUS - | EtherscanLikeExplorerApiAction.CHECK_PROXY_STATUS - > { +interface RawGetContractVerificationStatus extends BaseEtherscanLikeAPIParams< + EtherscanLikeExplorerApiModule.CONTRACT, + | EtherscanLikeExplorerApiAction.CHECK_IMPLEMENTATION_STATUS + | EtherscanLikeExplorerApiAction.CHECK_PROXY_STATUS +> { guid: string; } diff --git a/typescript/sdk/src/deploy/HyperlaneDeployer.ts b/typescript/sdk/src/deploy/HyperlaneDeployer.ts index 39555fd3929..7c1be30f1bf 100644 --- a/typescript/sdk/src/deploy/HyperlaneDeployer.ts +++ b/typescript/sdk/src/deploy/HyperlaneDeployer.ts @@ -455,9 +455,9 @@ export abstract class HyperlaneDeployer< // Estimate gas for the initialize transaction const estimatedGas = await contract .connect(signer) - .estimateGas[ - this.initializeFnSignature(contractName) - ](...initializeArgs); + .estimateGas[this.initializeFnSignature(contractName)]( + ...initializeArgs, + ); // deploy with buffer on gas limit const overrides = this.multiProvider.getTransactionOverrides(chain); diff --git a/typescript/sdk/src/providers/MultiProvider.ts b/typescript/sdk/src/providers/MultiProvider.ts index 6f8004a2067..836a5af43c2 100644 --- a/typescript/sdk/src/providers/MultiProvider.ts +++ b/typescript/sdk/src/providers/MultiProvider.ts @@ -374,10 +374,13 @@ export class MultiProvider extends ChainMetadataManager { const contractFactory = factory.connect(signer); const deployTx = contractFactory.getDeployTransaction(...params); estimatedGas = await signer.estimateGas(deployTx); - contract = await contractFactory.deploy(...params, { - gasLimit: addBufferToGasLimit(estimatedGas), - ...overrides, - }); + contract = await contractFactory.deploy( + ...params, + { + gasLimit: addBufferToGasLimit(estimatedGas), + ...overrides, + }, + ); // manually wait for deploy tx to be confirmed for non-zksync chains await this.handleTx(chainNameOrId, contract.deployTransaction); } diff --git a/typescript/sdk/src/providers/ProviderType.ts b/typescript/sdk/src/providers/ProviderType.ts index eaa3bc1372f..80fce483340 100644 --- a/typescript/sdk/src/providers/ProviderType.ts +++ b/typescript/sdk/src/providers/ProviderType.ts @@ -175,8 +175,7 @@ interface TypedProviderBase { provider: T; } -export interface EthersV5Provider - extends TypedProviderBase { +export interface EthersV5Provider extends TypedProviderBase { type: ProviderType.EthersV5; provider: EV5Providers.Provider; } @@ -191,26 +190,28 @@ export interface SolanaWeb3Provider extends TypedProviderBase { provider: Connection; } -export interface CosmJsProvider - extends TypedProviderBase> { +export interface CosmJsProvider extends TypedProviderBase< + Promise +> { type: ProviderType.CosmJs; provider: Promise; } -export interface CosmJsWasmProvider - extends TypedProviderBase> { +export interface CosmJsWasmProvider extends TypedProviderBase< + Promise +> { type: ProviderType.CosmJsWasm; provider: Promise; } -export interface CosmJsNativeProvider - extends TypedProviderBase> { +export interface CosmJsNativeProvider extends TypedProviderBase< + Promise +> { type: ProviderType.CosmJsNative; provider: Promise; } -export interface StarknetJsProvider - extends TypedProviderBase { +export interface StarknetJsProvider extends TypedProviderBase { type: ProviderType.Starknet; provider: StarknetProvider; } @@ -274,14 +275,12 @@ export interface CosmJsContract extends TypedContractBase { contract: never; } -export interface CosmJsWasmContract - extends TypedContractBase { +export interface CosmJsWasmContract extends TypedContractBase { type: ProviderType.CosmJsWasm; contract: CosmWasmContract; } -export interface StarknetJsContract - extends TypedContractBase { +export interface StarknetJsContract extends TypedContractBase { type: ProviderType.Starknet; contract: StarknetContract; } @@ -310,8 +309,7 @@ interface TypedTransactionBase { transaction: T; } -export interface EthersV5Transaction - extends TypedTransactionBase { +export interface EthersV5Transaction extends TypedTransactionBase { type: ProviderType.EthersV5; transaction: EV5Transaction; } @@ -321,8 +319,7 @@ export interface ViemTransaction extends TypedTransactionBase { transaction: VTransaction; } -export interface SolanaWeb3Transaction - extends TypedTransactionBase { +export interface SolanaWeb3Transaction extends TypedTransactionBase { type: ProviderType.SolanaWeb3; transaction: SolTransaction; } @@ -332,38 +329,32 @@ export interface CosmJsTransaction extends TypedTransactionBase { transaction: CmTransaction; } -export interface CosmJsWasmTransaction - extends TypedTransactionBase { +export interface CosmJsWasmTransaction extends TypedTransactionBase { type: ProviderType.CosmJsWasm; transaction: ExecuteInstruction; } -export interface CosmJsNativeTransaction - extends TypedTransactionBase { +export interface CosmJsNativeTransaction extends TypedTransactionBase { type: ProviderType.CosmJsNative; transaction: CmTransaction; } -export interface StarknetJsTransaction - extends TypedTransactionBase { +export interface StarknetJsTransaction extends TypedTransactionBase { type: ProviderType.Starknet; transaction: StarknetInvocation; } -export interface RadixTransaction - extends TypedTransactionBase { +export interface RadixTransaction extends TypedTransactionBase { type: ProviderType.Radix; transaction: RadixSDKTransaction; } -export interface AleoTransaction - extends TypedTransactionBase { +export interface AleoTransaction extends TypedTransactionBase { type: ProviderType.Aleo; transaction: AleoSDKTransaction; } -export interface ZKSyncTransaction - extends TypedTransactionBase { +export interface ZKSyncTransaction extends TypedTransactionBase { type: ProviderType.ZkSync; transaction: zkSyncTypes.TransactionRequest; } @@ -420,62 +411,52 @@ interface TypedTransactionReceiptBase { receipt: T; } -export interface EthersV5TransactionReceipt - extends TypedTransactionReceiptBase { +export interface EthersV5TransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.EthersV5; receipt: EV5Providers.TransactionReceipt; } -export interface ViemTransactionReceipt - extends TypedTransactionReceiptBase { +export interface ViemTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.Viem; receipt: VTransactionReceipt; } -export interface SolanaWeb3TransactionReceipt - extends TypedTransactionReceiptBase { +export interface SolanaWeb3TransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.SolanaWeb3; receipt: SolTransactionReceipt; } -export interface CosmJsTransactionReceipt - extends TypedTransactionReceiptBase { +export interface CosmJsTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.CosmJs; receipt: DeliverTxResponse; } -export interface CosmJsWasmTransactionReceipt - extends TypedTransactionReceiptBase { +export interface CosmJsWasmTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.CosmJsWasm; receipt: DeliverTxResponse; } -export interface CosmJsNativeTransactionReceipt - extends TypedTransactionReceiptBase { +export interface CosmJsNativeTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.CosmJsNative; receipt: DeliverTxResponse; } -export interface StarknetJsTransactionReceipt - extends TypedTransactionReceiptBase { +export interface StarknetJsTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.Starknet; receipt: StarknetTxReceipt; } -export interface ZKSyncTransactionReceipt - extends TypedTransactionReceiptBase { +export interface ZKSyncTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.ZkSync; receipt: zkSyncTypes.TransactionReceipt; } -export interface RadixTransactionReceipt - extends TypedTransactionReceiptBase { +export interface RadixTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.Radix; receipt: RadixSDKReceipt; } -export interface AleoTransactionReceipt - extends TypedTransactionReceiptBase { +export interface AleoTransactionReceipt extends TypedTransactionReceiptBase { type: ProviderType.Aleo; receipt: AleoSDKReceipt; } diff --git a/typescript/sdk/src/providers/SmartProvider/types.ts b/typescript/sdk/src/providers/SmartProvider/types.ts index d08933af47f..9c4998ff0b5 100644 --- a/typescript/sdk/src/providers/SmartProvider/types.ts +++ b/typescript/sdk/src/providers/SmartProvider/types.ts @@ -6,8 +6,10 @@ export type RpcConfigWithConnectionInfo = RpcUrl & { connection?: utils.ConnectionInfo; }; -export interface ChainMetadataWithRpcConnectionInfo - extends Omit { +export interface ChainMetadataWithRpcConnectionInfo extends Omit< + ChainMetadata, + 'rpcUrls' +> { rpcUrls: Array; } diff --git a/typescript/sdk/src/providers/transactions/submitter/IcaTxSubmitter.ts b/typescript/sdk/src/providers/transactions/submitter/IcaTxSubmitter.ts index 9839fc17b2c..77314fbb68f 100644 --- a/typescript/sdk/src/providers/transactions/submitter/IcaTxSubmitter.ts +++ b/typescript/sdk/src/providers/transactions/submitter/IcaTxSubmitter.ts @@ -30,9 +30,7 @@ type EvmIcaTxSubmitterConstructorConfig = Omit< originInterchainAccountRouter: Address; }; -export class EvmIcaTxSubmitter - implements TxSubmitterInterface -{ +export class EvmIcaTxSubmitter implements TxSubmitterInterface { readonly txSubmitterType: TxSubmitterType = TxSubmitterType.INTERCHAIN_ACCOUNT; diff --git a/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts b/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts index ecec8faa9f9..82fbc387d0c 100644 --- a/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts +++ b/typescript/sdk/src/providers/transactions/submitter/builder/TxSubmitterBuilder.ts @@ -26,9 +26,9 @@ import { TxSubmitterType } from '../TxSubmitterTypes.js'; * new EV5JsonRpcTxSubmitter(chainC) * ).submit(txs); */ -export class TxSubmitterBuilder - implements TxSubmitterInterface -{ +export class TxSubmitterBuilder< + TProtocol extends ProtocolType, +> implements TxSubmitterInterface { public readonly txSubmitterType: TxSubmitterType; protected readonly logger: Logger = rootLogger.child({ diff --git a/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TimelockSubmitter.ts b/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TimelockSubmitter.ts index a17f00f4d07..882fa413bd6 100644 --- a/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TimelockSubmitter.ts +++ b/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TimelockSubmitter.ts @@ -25,9 +25,7 @@ type EvmTimelockControllerSubmitterConstructorConfig = Required< > >; -export class EV5TimelockSubmitter - implements TxSubmitterInterface -{ +export class EV5TimelockSubmitter implements TxSubmitterInterface { public readonly txSubmitterType: TxSubmitterType = TxSubmitterType.TIMELOCK_CONTROLLER; diff --git a/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.ts b/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.ts index d1c452f7d10..5aff86a7968 100644 --- a/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.ts +++ b/typescript/sdk/src/providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.ts @@ -3,8 +3,7 @@ import { ProtocolType } from '@hyperlane-xyz/utils'; import { MultiProvider } from '../../../MultiProvider.js'; import { TxSubmitterInterface } from '../TxSubmitterInterface.js'; -export interface EV5TxSubmitterInterface - extends TxSubmitterInterface { +export interface EV5TxSubmitterInterface extends TxSubmitterInterface { /** * The EV5 multi-provider to use for transaction submission. */ diff --git a/typescript/sdk/src/rpc/evm/EvmEventLogsReader.ts b/typescript/sdk/src/rpc/evm/EvmEventLogsReader.ts index 10c027ae2ee..a8d77d71e88 100644 --- a/typescript/sdk/src/rpc/evm/EvmEventLogsReader.ts +++ b/typescript/sdk/src/rpc/evm/EvmEventLogsReader.ts @@ -47,9 +47,7 @@ interface IEvmEventLogsReaderStrategy { ): Promise; } -export class EvmEtherscanLikeEventLogsReader - implements IEvmEventLogsReaderStrategy -{ +export class EvmEtherscanLikeEventLogsReader implements IEvmEventLogsReaderStrategy { constructor( protected readonly chain: ChainNameOrId, protected readonly config: Awaited< diff --git a/typescript/sdk/src/signers/cosmos/cosmjs.ts b/typescript/sdk/src/signers/cosmos/cosmjs.ts index 90651bef4da..fdca8a29218 100644 --- a/typescript/sdk/src/signers/cosmos/cosmjs.ts +++ b/typescript/sdk/src/signers/cosmos/cosmjs.ts @@ -8,9 +8,7 @@ import { CosmJsNativeTransaction } from '../../providers/ProviderType.js'; import { ChainName } from '../../types.js'; import { IMultiProtocolSigner } from '../types.js'; -export class CosmosNativeMultiProtocolSignerAdapter - implements IMultiProtocolSigner -{ +export class CosmosNativeMultiProtocolSignerAdapter implements IMultiProtocolSigner { constructor( private readonly chainName: ChainName, private readonly accountAddress: Address, diff --git a/typescript/sdk/src/signers/evm/ethersv5.ts b/typescript/sdk/src/signers/evm/ethersv5.ts index 8e7f2c7d3f6..d53c2ffde3a 100644 --- a/typescript/sdk/src/signers/evm/ethersv5.ts +++ b/typescript/sdk/src/signers/evm/ethersv5.ts @@ -10,9 +10,7 @@ import { EthersV5Transaction } from '../../providers/ProviderType.js'; import { ChainName } from '../../types.js'; import { IMultiProtocolSigner } from '../types.js'; -export class EvmMultiProtocolSignerAdapter - implements IMultiProtocolSigner -{ +export class EvmMultiProtocolSignerAdapter implements IMultiProtocolSigner { private readonly multiProvider: MultiProvider; constructor( diff --git a/typescript/sdk/src/signers/radix/radix-toolkit.ts b/typescript/sdk/src/signers/radix/radix-toolkit.ts index 533f00317ae..24e4bb57fb6 100644 --- a/typescript/sdk/src/signers/radix/radix-toolkit.ts +++ b/typescript/sdk/src/signers/radix/radix-toolkit.ts @@ -10,9 +10,7 @@ import { RadixTransaction } from '../../providers/ProviderType.js'; import { ChainName } from '../../types.js'; import { IMultiProtocolSigner } from '../types.js'; -export class RadixMultiProtocolSignerAdapter - implements IMultiProtocolSigner -{ +export class RadixMultiProtocolSignerAdapter implements IMultiProtocolSigner { constructor( private readonly chainName: ChainName, private readonly signer: AltVM.ISigner< diff --git a/typescript/sdk/src/signers/starknet/starknetjs.ts b/typescript/sdk/src/signers/starknet/starknetjs.ts index 4de060808fb..547bb38ebe7 100644 --- a/typescript/sdk/src/signers/starknet/starknetjs.ts +++ b/typescript/sdk/src/signers/starknet/starknetjs.ts @@ -8,9 +8,7 @@ import { StarknetJsTransaction } from '../../providers/ProviderType.js'; import { ChainName } from '../../types.js'; import { IMultiProtocolSigner } from '../types.js'; -export class StarknetMultiProtocolSignerAdapter - implements IMultiProtocolSigner -{ +export class StarknetMultiProtocolSignerAdapter implements IMultiProtocolSigner { private readonly signer: StarknetAccount; constructor( diff --git a/typescript/sdk/src/signers/svm/solana-web3js.ts b/typescript/sdk/src/signers/svm/solana-web3js.ts index b1a05a2ed39..f5c2cf1baf3 100644 --- a/typescript/sdk/src/signers/svm/solana-web3js.ts +++ b/typescript/sdk/src/signers/svm/solana-web3js.ts @@ -62,9 +62,7 @@ export class KeypairSvmTransactionSigner implements SvmTransactionSigner { } } -export class SvmMultiProtocolSignerAdapter - implements IMultiProtocolSigner -{ +export class SvmMultiProtocolSignerAdapter implements IMultiProtocolSigner { private readonly signer: SvmTransactionSigner; private readonly svmProvider: Connection; private readonly config: Required; diff --git a/typescript/sdk/src/zksync/ZKSyncDeployer.ts b/typescript/sdk/src/zksync/ZKSyncDeployer.ts index 087cb2190ce..09624db6c42 100644 --- a/typescript/sdk/src/zksync/ZKSyncDeployer.ts +++ b/typescript/sdk/src/zksync/ZKSyncDeployer.ts @@ -79,11 +79,14 @@ export class ZKSyncDeployer { ); // Encode deploy transaction so it can be estimated. - const deployTx = factory.getDeployTransaction(...constructorArguments, { - customData: { - factoryDeps, + const deployTx = factory.getDeployTransaction( + ...constructorArguments, + { + customData: { + factoryDeps, + }, }, - }); + ); deployTx.from = this.zkWallet.address; return this.zkWallet.provider.estimateGas(deployTx); @@ -123,13 +126,16 @@ export class ZKSyncDeployer { const { customData, ..._overrides } = overrides ?? {}; // Encode and send the deploy transaction providing factory dependencies. - const contract = await factory.deploy(...constructorArguments, { - ..._overrides, - customData: { - ...customData, - factoryDeps, + const contract = await factory.deploy( + ...constructorArguments, + { + ..._overrides, + customData: { + ...customData, + factoryDeps, + }, }, - }); + ); await contract.deployed(); diff --git a/typescript/tron-sdk/package.json b/typescript/tron-sdk/package.json index 0bfbfc3fdfc..ba1091059dc 100644 --- a/typescript/tron-sdk/package.json +++ b/typescript/tron-sdk/package.json @@ -2,33 +2,40 @@ "name": "@hyperlane-xyz/tron-sdk", "version": "21.0.0", "description": "Hyperlane TypeScript SDK for the TRON Hyperlane SDK module", - "type": "module", - "exports": { - ".": "./dist/index.js" - }, - "types": "dist/index.d.ts", - "files": [ - "/dist" - ], - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "keywords": [ - "hyperlane", - "tron", "blockchain", - "sdk" + "hyperlane", + "sdk", + "tron" ], + "homepage": "https://www.hyperlane.xyz", "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js" + }, "scripts": { "build": "rm -rf ./dist && tsc", - "format": "prettier --write .", + "format": "oxfmt --write ./src", "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", "clean": "rm -rf ./dist ./cache", "test": "echo \"no tests in tron-sdk\"", "test:ci": "echo \"no tests in tron-sdk\"", "test:e2e": "./scripts/run-e2e-test.sh" }, + "dependencies": { + "@hyperlane-xyz/eslint-config": "workspace:*", + "@hyperlane-xyz/provider-sdk": "workspace:*", + "@hyperlane-xyz/registry": "catalog:", + "@hyperlane-xyz/utils": "workspace:*", + "bignumber.js": "catalog:", + "tronweb": "^6.1.1" + }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/tsconfig": "workspace:^", @@ -47,17 +54,8 @@ "mocha": "catalog:", "mocha-steps": "catalog:", "node-fetch": "^3.3.2", - "prettier": "catalog:", "ts-node": "catalog:", "typescript": "catalog:", "typescript-eslint": "catalog:" - }, - "dependencies": { - "@hyperlane-xyz/provider-sdk": "workspace:*", - "@hyperlane-xyz/registry": "catalog:", - "@hyperlane-xyz/utils": "workspace:*", - "@hyperlane-xyz/eslint-config": "workspace:*", - "bignumber.js": "catalog:", - "tronweb": "^6.1.1" } } diff --git a/typescript/tsconfig/package.json b/typescript/tsconfig/package.json index 4e32a45f299..a67c26df7e4 100644 --- a/typescript/tsconfig/package.json +++ b/typescript/tsconfig/package.json @@ -1,8 +1,8 @@ { "name": "@hyperlane-xyz/tsconfig", "version": "25.0.0", - "description": "Hyperlane TypeScript config", "private": true, - "type": "module", - "license": "Apache-2.0" + "description": "Hyperlane TypeScript config", + "license": "Apache-2.0", + "type": "module" } diff --git a/typescript/utils/CHANGELOG.md b/typescript/utils/CHANGELOG.md index 32958b6e1b4..3d63862f884 100644 --- a/typescript/utils/CHANGELOG.md +++ b/typescript/utils/CHANGELOG.md @@ -54,7 +54,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility diff --git a/typescript/utils/package.json b/typescript/utils/package.json index fa0ce54eaa8..0cf517962e6 100644 --- a/typescript/utils/package.json +++ b/typescript/utils/package.json @@ -1,7 +1,55 @@ { "name": "@hyperlane-xyz/utils", - "description": "General utilities and types for the Hyperlane network", "version": "25.0.0", + "description": "General utilities and types for the Hyperlane network", + "keywords": [ + "Hyperlane", + "Typescript", + "Utilities" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "sideEffects": false, + "types": "./dist/index.d.ts", + "typesVersions": { + "*": { + "fs": [ + "./dist/fs/index.d.ts" + ], + "eslint-rules": [ + "./dist/eslint-rules/index.d.ts" + ] + } + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./fs": { + "types": "./dist/fs/index.d.ts", + "default": "./dist/fs/index.js" + }, + "./eslint-rules": { + "types": "./dist/eslint-rules/index.d.ts", + "default": "./dist/eslint-rules/index.js" + } + }, + "scripts": { + "dev": "tsc -w", + "build": "tsc --excludeFiles \"**/*.test.ts\"", + "clean": "rm -rf ./dist", + "check": "tsc --noEmit", + "lint": "eslint -c ./eslint.config.mjs", + "format": "oxfmt --write ./src", + "test": "mocha --config .mocharc.json './src/**/*.test.ts'", + "test:ci": "pnpm test" + }, "dependencies": { "@cosmjs/encoding": "catalog:", "@ethersproject/bytes": "*", @@ -15,18 +63,6 @@ "starknet": "catalog:", "yaml": "catalog:" }, - "peerDependencies": { - "@google-cloud/pino-logging-gcp-config": "catalog:", - "pino-pretty": "catalog:" - }, - "peerDependenciesMeta": { - "@google-cloud/pino-logging-gcp-config": { - "optional": true - }, - "pino-pretty": { - "optional": true - } - }, "devDependencies": { "@eslint/js": "catalog:", "@hyperlane-xyz/tsconfig": "workspace:^", @@ -43,59 +79,22 @@ "eslint-plugin-import": "catalog:", "eslint-plugin-yml": "^1.19.1", "mocha": "catalog:", - "prettier": "catalog:", "sinon": "catalog:", "typescript": "catalog:", "yaml-eslint-parser": "^1.3.0" }, - "homepage": "https://www.hyperlane.xyz", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "Hyperlane", - "Utilities", - "Typescript" - ], - "license": "Apache-2.0", - "scripts": { - "dev": "tsc -w", - "build": "tsc --excludeFiles \"**/*.test.ts\"", - "clean": "rm -rf ./dist", - "check": "tsc --noEmit", - "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", - "test": "mocha --config .mocharc.json './src/**/*.test.ts'", - "test:ci": "pnpm test" + "peerDependencies": { + "@google-cloud/pino-logging-gcp-config": "catalog:", + "pino-pretty": "catalog:" }, - "type": "module", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "./fs": { - "types": "./dist/fs/index.d.ts", - "default": "./dist/fs/index.js" + "peerDependenciesMeta": { + "@google-cloud/pino-logging-gcp-config": { + "optional": true }, - "./eslint-rules": { - "types": "./dist/eslint-rules/index.d.ts", - "default": "./dist/eslint-rules/index.js" - } - }, - "types": "./dist/index.d.ts", - "typesVersions": { - "*": { - "fs": [ - "./dist/fs/index.d.ts" - ], - "eslint-rules": [ - "./dist/eslint-rules/index.d.ts" - ] + "pino-pretty": { + "optional": true } }, - "files": [ - "/dist" - ], - "sideEffects": false, "engines": { "node": ">=16" } diff --git a/typescript/utils/src/eslint-rules/sort-yaml-arrays.test.ts b/typescript/utils/src/eslint-rules/sort-yaml-arrays.test.ts index ba9f974ce10..7b49ba67383 100644 --- a/typescript/utils/src/eslint-rules/sort-yaml-arrays.test.ts +++ b/typescript/utils/src/eslint-rules/sort-yaml-arrays.test.ts @@ -189,7 +189,10 @@ describe('sort-yaml-arrays rule', () => { options: { arrays: [ { path: 'company.departments', sortKey: 'id' }, - { path: 'company.departments.*.projects', sortKey: 'priority' }, + { + path: 'company.departments.*.projects', + sortKey: 'priority', + }, ], }, }, @@ -587,7 +590,10 @@ people: priority: 3`, options: { arrays: [ - { path: 'repositories[].branches.*.commits', sortKey: 'priority' }, + { + path: 'repositories[].branches.*.commits', + sortKey: 'priority', + }, ], }, }, diff --git a/typescript/warp-monitor/package.json b/typescript/warp-monitor/package.json index fa1643be974..75b7b1a6037 100644 --- a/typescript/warp-monitor/package.json +++ b/typescript/warp-monitor/package.json @@ -3,6 +3,17 @@ "version": "0.0.6", "private": true, "description": "Hyperlane Warp Route Balance Monitor Service", + "keywords": [ + "balance", + "blockchain", + "hyperlane", + "interchain", + "warp-monitor", + "warp-route" + ], + "license": "Apache-2.0", + "author": "Abacus Works, Inc.", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", "type": "module", "scripts": { "build": "tsc", @@ -10,7 +21,7 @@ "clean": "rm -rf dist cache bundle", "dev": "tsc --watch", "lint": "eslint -c ./eslint.config.mjs ./src", - "prettier": "prettier --write ./src", + "format": "oxfmt --write ./src", "test": "mocha --config .mocharc.json './src/**/*.test.ts' --exit", "test:ci": "pnpm test", "start": "node dist/service.js", @@ -19,10 +30,10 @@ "dependencies": { "@google-cloud/pino-logging-gcp-config": "catalog:", "@hyperlane-xyz/core": "workspace:*", + "@hyperlane-xyz/metrics": "workspace:*", "@hyperlane-xyz/registry": "catalog:", "@hyperlane-xyz/sdk": "workspace:*", "@hyperlane-xyz/utils": "workspace:*", - "@hyperlane-xyz/metrics": "workspace:*", "ethers": "catalog:", "pino": "catalog:", "prom-client": "catalog:" @@ -38,23 +49,12 @@ "chai": "catalog:", "eslint": "catalog:", "mocha": "catalog:", - "prettier": "catalog:", + "oxfmt": "catalog:", "sinon": "catalog:", "tsx": "catalog:", "typescript": "catalog:" }, "engines": { "node": ">=18" - }, - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "keywords": [ - "hyperlane", - "warp-monitor", - "warp-route", - "balance", - "blockchain", - "interchain" - ], - "author": "Abacus Works, Inc.", - "license": "Apache-2.0" + } } diff --git a/typescript/widgets/CHANGELOG.md b/typescript/widgets/CHANGELOG.md index a0a28fd6e17..d673c0c17db 100644 --- a/typescript/widgets/CHANGELOG.md +++ b/typescript/widgets/CHANGELOG.md @@ -122,7 +122,6 @@ ### Minor Changes - 11fa887: Upgrade TypeScript from 5.3.3 to 5.8.3 and compilation target to ES2023 - - Upgraded TypeScript from 5.3.3 to 5.8.3 across all packages - Updated compilation target from ES2022 to ES2023 (Node 16+ fully supported) - Converted internal const enums to 'as const' pattern for better compatibility @@ -1100,7 +1099,6 @@ ### Minor Changes - f438d442a: Update widgets with components from explorer and warp ui - - Add icons: Discord, Docs, Github, History, LinkedIn, Medium, Twitter, Wallet and Web - Add animation component: Fade component - Add components: DatetimeField and SelectField diff --git a/typescript/widgets/package.json b/typescript/widgets/package.json index eab1ee1335d..c8673fe4c6f 100644 --- a/typescript/widgets/package.json +++ b/typescript/widgets/package.json @@ -1,10 +1,35 @@ { "name": "@hyperlane-xyz/widgets", - "description": "Common react components for Hyperlane projects", "version": "25.0.0", - "peerDependencies": { - "react": "^18", - "react-dom": "^18" + "description": "Common react components for Hyperlane projects", + "keywords": [ + "Components", + "Hyperlane", + "React", + "Typescript", + "Widgets" + ], + "homepage": "https://www.hyperlane.xyz", + "license": "Apache-2.0", + "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", + "files": [ + "/dist" + ], + "type": "module", + "types": "./dist/index.d.ts", + "exports": { + ".": "./dist/index.js", + "./styles.css": "./dist/styles.css" + }, + "scripts": { + "build": "pnpm build:ts && pnpm build:css", + "build:ts": "tsc", + "build:css": "tailwindcss -c ./tailwind.config.cjs -i ./src/styles.css -o ./dist/styles.css --minify", + "clean": "rm -rf ./dist ./cache ./storybook-static", + "lint": "eslint -c ./eslint.config.mjs", + "format": "oxfmt --write ./src", + "storybook": "storybook dev -p 6006", + "build-storybook": "storybook build" }, "dependencies": { "@chain-registry/types": "catalog:", @@ -74,7 +99,6 @@ "eslint-plugin-storybook": "^0.11.1", "framer-motion": "^10.16.4", "postcss": "^8.4.21", - "prettier": "catalog:", "react": "^18.2.0", "react-dom": "^18.2.0", "storybook": "^7.6.14", @@ -82,33 +106,8 @@ "typescript": "catalog:", "vite": "^5.1.1" }, - "files": [ - "/dist" - ], - "type": "module", - "exports": { - ".": "./dist/index.js", - "./styles.css": "./dist/styles.css" - }, - "types": "./dist/index.d.ts", - "homepage": "https://www.hyperlane.xyz", - "keywords": [ - "Hyperlane", - "Widgets", - "React", - "Components", - "Typescript" - ], - "license": "Apache-2.0", - "repository": "https://github.com/hyperlane-xyz/hyperlane-monorepo", - "scripts": { - "build": "pnpm build:ts && pnpm build:css", - "build:ts": "tsc", - "build:css": "tailwindcss -c ./tailwind.config.cjs -i ./src/styles.css -o ./dist/styles.css --minify", - "clean": "rm -rf ./dist ./cache ./storybook-static", - "lint": "eslint -c ./eslint.config.mjs", - "prettier": "prettier --write ./src", - "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "peerDependencies": { + "react": "^18", + "react-dom": "^18" } }