feat!: pnpm migration#7410
Conversation
|
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts (1)
34-39: pnpm CLI invocation looks good; consider reusing shared helper for consistencyAye, this swap to
pnpm --filter @hyperlane-xyz/cli run hyperlane core checkfits the new toolchain just fine for this “missing --chain” error path, and the.nothrow()usage still makes sense for the assertion that follows.Only thing I’d watch is keeping this in step with the rest of the swamp: if other CLI tests now go through a shared helper (like
localTestRunCmdPrefixor similar), it might be worth routing this one through the same path so future changes to the pnpm invocation don’t drift here unnoticed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
typescript/cli/src/tests/cosmosnative/core/core-check.e2e-test.ts(1 hunks)typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- typescript/cli/src/tests/cosmosnative/core/core-check.e2e-test.ts
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: solidity/foundry.toml:8-8
Timestamp: 2025-11-25T17:10:33.369Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, when using pnpm (instead of Yarn), Foundry's `allow_paths` in solidity/foundry.toml should be set to `["./node_modules"]` rather than `["../node_modules"]` because pnpm's default node_modules structure places dependencies locally in the workspace subdirectory, not requiring access to the parent directory's node_modules.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/mainnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T17:19:38.362Z
Learning: Apply `yarn prettier` for code formatting across all workspaces
📚 Learning: 2025-11-24T17:19:38.362Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T17:19:38.362Z
Learning: Run all tests using `yarn test` for unified testing; use workspace-specific commands for targeted testing (Hardhat, Forge for Solidity; Unit tests for TypeScript; Cargo for Rust)
Applied to files:
typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts
📚 Learning: 2025-11-25T17:10:33.369Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: solidity/foundry.toml:8-8
Timestamp: 2025-11-25T17:10:33.369Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, when using pnpm (instead of Yarn), Foundry's `allow_paths` in solidity/foundry.toml should be set to `["./node_modules"]` rather than `["../node_modules"]` because pnpm's default node_modules structure places dependencies locally in the workspace subdirectory, not requiring access to the parent directory's node_modules.
Applied to files:
typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts
📚 Learning: 2025-08-26T13:45:52.227Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.
Applied to files:
typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts
📚 Learning: 2025-08-26T13:46:37.695Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.
Applied to files:
typescript/cli/src/tests/ethereum/core/core-check.e2e-test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (72)
- GitHub Check: coverage-run
- GitHub Check: cli-evm-e2e-matrix (warp-check-3)
- GitHub Check: cli-evm-e2e-matrix (warp-check-4)
- GitHub Check: cli-evm-e2e-matrix (warp-init)
- GitHub Check: cli-evm-e2e-matrix (core-check)
- GitHub Check: cli-evm-e2e-matrix (warp-check-2)
- GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
- GitHub Check: cli-evm-e2e-matrix (core-read)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
- GitHub Check: cli-evm-e2e-matrix (warp-check-1)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
- GitHub Check: cli-evm-e2e-matrix (warp-read)
- GitHub Check: cli-evm-e2e-matrix (warp-send)
- GitHub Check: cli-evm-e2e-matrix (warp-check-5)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
- GitHub Check: cli-evm-e2e-matrix (relay)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
- GitHub Check: cli-evm-e2e-matrix (core-deploy)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
- GitHub Check: cli-evm-e2e-matrix (core-apply)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
- GitHub Check: cli-evm-e2e-matrix (core-init)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
- GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
- GitHub Check: env-test-matrix (testnet4, sepolia, core)
- GitHub Check: env-test-matrix (mainnet3, optimism, igp)
- GitHub Check: env-test-matrix (mainnet3, optimism, core)
- GitHub Check: env-test-matrix (mainnet3, ethereum, core)
- GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
- GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
- GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
- GitHub Check: cli-radix-e2e-matrix (warp-deploy)
- GitHub Check: cli-radix-e2e-matrix (core-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (warp-read)
- GitHub Check: cli-radix-e2e-matrix (core-apply)
- GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
- GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
- GitHub Check: aleo-sdk-e2e-run
- GitHub Check: cli-cosmos-e2e-matrix (core-apply)
- GitHub Check: cli-cosmos-e2e-matrix (core-read)
- GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (core-check)
- GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
- GitHub Check: cosmos-sdk-e2e-run
- GitHub Check: cli-install-test-run
- GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
- GitHub Check: pnpm-test-run
- GitHub Check: infra-test
- GitHub Check: e2e-matrix (starknet)
- GitHub Check: e2e-matrix (sealevel)
- GitHub Check: e2e-matrix (cosmwasm)
- GitHub Check: pnpm-install
- GitHub Check: e2e-matrix (evm)
- GitHub Check: e2e-matrix (radix)
- GitHub Check: e2e-matrix (cosmosnative)
- GitHub Check: agent-configs (mainnet3)
- GitHub Check: agent-configs (testnet4)
- GitHub Check: lint-prettier
- GitHub Check: build-and-push-to-gcr
- GitHub Check: fork-tests
- GitHub Check: slither
- GitHub Check: diff-check
- GitHub Check: test-rs
- GitHub Check: lander-coverage
- GitHub Check: lint-rs
- GitHub Check: diff-check
…upport The previous fix moved the requiresKey check too early, before AltVM providers were set up. This broke non-sign commands (like 'core read') that still need AltVM providers but don't need signers. The check now correctly returns early AFTER setting up AltVM providers but BEFORE signer setup, matching the original behavior.
The test iterates over ~133 warp IDs, each making a network request to the GitHub registry. The default 2000ms timeout was insufficient, causing consistent CI failures.
|
this diff is probably easier to review for the last 6 commits fixing CI |
…te-pnpm-package-manager-migration-2193
96a5f05 to
12f6846
Compare
antigremlin
left a comment
There was a problem hiding this comment.
It's getting better all the time
The build:zk script exists in solidity/package.json but was being called from root in npm-beta-release.yml workflow. With pnpm, root scripts don't automatically find workspace scripts. - Add build:zk to turbo.json tasks (depends on build) - Add build:zk script to root package.json delegating to turbo 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🐳 Monorepo Docker Image Built SuccessfullyImage Tags: |
🦀 Rust Agent Docker Image Built SuccessfullyImage Tags: |
## Summary Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x, following the patterns established in the monorepo migration ([hyperlane-monorepo#7410](hyperlane-xyz/hyperlane-monorepo#7410)). **Changes:** - Update `packageManager` to pnpm@10.25.0 - Convert `resolutions` to `pnpm.overrides` - Convert yarn patches to `pnpm.patchedDependencies` format - Pin dependency versions to match yarn.lock (pnpm re-resolves `^` ranges to latest): - `@cosmos-kit/react`: 2.18.0 - `@solana/wallet-adapter-wallets`: 0.19.16 - `@rainbow-me/rainbowkit`: 2.2.0 - Add phantom dependencies required by pnpm strict dependency isolation - Update CI workflows to use pnpm (pnpm/action-setup@v4, pnpm store caching) - Update GitHub Actions to latest versions (checkout@v6, setup-node@v6) - Update vercel.json to use pnpm@10.25.0 - Update README with pnpm commands - Remove yarn files (.yarn/, .yarnrc.yml, yarn.lock) - Add pnpm-lock.yaml ## Test plan - [x] `pnpm install` succeeds - [x] `pnpm typecheck` passes - [x] `pnpm build` succeeds - [x] `pnpm lint` passes - [x] CI workflows pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for Solana wallet integrations, Sentry error monitoring, and additional Chakra UI packages. * **Chores** * Migrated project tooling, package manager metadata, and CI workflows from Yarn to pnpm; updated GitHub Actions and dev tooling versions. * Upgraded and added multiple dependencies and devDependencies; replaced resolution/patch approach with pnpm-compatible overrides. * **Documentation** * Updated CLI/README commands and ignore lists to reflect pnpm usage. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x, following the patterns established in the monorepo migration ([hyperlane-monorepo#7410](hyperlane-xyz/hyperlane-monorepo#7410)). **Changes:** - Update `packageManager` to pnpm@10.25.0 - Convert `resolutions` to `pnpm.overrides` - Convert yarn patches to `pnpm.patchedDependencies` format - Pin dependency versions to match yarn.lock (pnpm re-resolves `^` ranges to latest): - `@cosmos-kit/react`: 2.18.0 - `@solana/wallet-adapter-wallets`: 0.19.16 - `@rainbow-me/rainbowkit`: 2.2.0 - Add phantom dependencies required by pnpm strict dependency isolation - Update CI workflows to use pnpm (pnpm/action-setup@v4, pnpm store caching) - Update GitHub Actions to latest versions (checkout@v6, setup-node@v6) - Update vercel.json to use pnpm@10.25.0 - Update README with pnpm commands - Remove yarn files (.yarn/, .yarnrc.yml, yarn.lock) - Add pnpm-lock.yaml - Fix unit testing - Update husky - [x] `pnpm install` succeeds - [x] `pnpm typecheck` passes - [x] `pnpm build` succeeds - [x] `pnpm lint` passes - [x] CI workflows pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Added support for Solana wallet integrations, Sentry error monitoring, and additional Chakra UI packages. * **Chores** * Migrated project tooling, package manager metadata, and CI workflows from Yarn to pnpm; updated GitHub Actions and dev tooling versions. * Upgraded and added multiple dependencies and devDependencies; replaced resolution/patch approach with pnpm-compatible overrides. * **Documentation** * Updated CLI/README commands and ignore lists to reflect pnpm usage. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…dependency) (#163) * chore: bump hyperlane version * fix: isSmartContract check for EIP-7702 addresses to not show banner (hyperlane-xyz#850) With the inclusion of Smart Accounts ([EIP-7702](https://eip7702.io/)) the UI was incorrectly showing the recipient banner check for address that are smart accounts and not smart contracts - This PR introduces check if the contract code starts with the EIP-7702 selector to decide if the UI should show the warning banner or not - Refactors contract address check into its own util function <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Bug Fixes** * Improved contract address detection to accurately distinguish between smart accounts and regular contracts. * Enhanced error reporting with clearer contextual messages during address validation. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> * c feat: add preview fee estimate before bridge * feat: estimate gas preview * feat!: pnpm migration (hyperlane-xyz#840) Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x, following the patterns established in the monorepo migration ([hyperlane-monorepo#7410](hyperlane-xyz/hyperlane-monorepo#7410)). **Changes:** - Update `packageManager` to pnpm@10.25.0 - Convert `resolutions` to `pnpm.overrides` - Convert yarn patches to `pnpm.patchedDependencies` format - Pin dependency versions to match yarn.lock (pnpm re-resolves `^` ranges to latest): - `@cosmos-kit/react`: 2.18.0 - `@solana/wallet-adapter-wallets`: 0.19.16 - `@rainbow-me/rainbowkit`: 2.2.0 - Add phantom dependencies required by pnpm strict dependency isolation - Update CI workflows to use pnpm (pnpm/action-setup@v4, pnpm store caching) - Update GitHub Actions to latest versions (checkout@v6, setup-node@v6) - Update vercel.json to use pnpm@10.25.0 - Update README with pnpm commands - Remove yarn files (.yarn/, .yarnrc.yml, yarn.lock) - Add pnpm-lock.yaml - Fix unit testing - Update husky - [x] `pnpm install` succeeds - [x] `pnpm typecheck` passes - [x] `pnpm build` succeeds - [x] `pnpm lint` passes - [x] CI workflows pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Added support for Solana wallet integrations, Sentry error monitoring, and additional Chakra UI packages. * **Chores** * Migrated project tooling, package manager metadata, and CI workflows from Yarn to pnpm; updated GitHub Actions and dev tooling versions. * Upgraded and added multiple dependencies and devDependencies; replaced resolution/patch approach with pnpm-compatible overrides. * **Documentation** * Updated CLI/README commands and ignore lists to reflect pnpm usage. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore: delete yarn related, update the way fetch in react-query * fix: max button not calculated from balances, dynamic estimated fee * chore: bump depedency hyperlane 20.1.0 * Fix/metamask mobile walletconnect chain switch (#160) * fix: ensure wallet is on origin chain before EVM transactions WalletConnect with MetaMask mobile can take several seconds after a chain switch before the wagmi store reflects the new chain. The hardcoded 2-second sleep in @hyperlane-xyz/widgets is often not enough, causing the chain-ID assertion to fail with ChainMismatchError. Add waitForChainSwitch to poll getAccount().chainId every 500 ms (up to 30 s) and ensureWalletOnChain to call switchChain then wait. Call ensureWalletOnChain in executeTransfer before every EVM transaction so the wallet is confirmed on the correct chain before the widgets layer runs its own check. * test: add unit tests for waitForChainSwitch and ensureWalletOnChain Cover all branches of the two new rpcUtils helpers with fake-timer tests: immediate resolution, polling until chain updates, timeout with descriptive error, switchChain rejection swallowing, and the full 30 s default timeout path. Add EVM-specific tests to useTokenTransfer to verify ensureWalletOnChain is called with the correct wagmiConfig and chainId, that a ChainMismatchError surfaces the right toast, and that preEstimateGasForEvmTxs is invoked after the chain guard succeeds. * feat: Safe wallet support via event-based tx confirmation (#157) * feat: add resilient tx confirmation with RPC polling fallback Race wallet confirm() against direct blockchain polling with Fibonacci backoff to handle WalletConnect wallets that fail to resolve the confirmation callback. Uses 5s initial delay, Fibonacci intervals (1s, 1s, 2s, 3s... capped at 30s), and 1-hour max poll duration. * feat: add event-based tx confirmation for Safe wallet support Safe wallets return a safeTxHash (internal meta-transaction hash) from sendTransaction instead of an on-chain txHash. Both the wallet confirm callback and RPC polling use the public client to look up this hash, but it never exists on-chain — causing transfers to hang indefinitely. Add a third racing leg to resilientConfirm that watches for contract events on-chain via eth_getLogs. When the Safe executes the transaction, the target contract emits events (ERC20 Transfer, Approval, etc.) where the Safe address appears as an indexed topic. The event watcher detects this and extracts the real on-chain txHash from the log entry. This approach is completely chain-agnostic — works on any EVM chain with any Safe deployment without needing to know Safe infrastructure URLs. Key changes: - Add pollForContractEvent with Fibonacci backoff event polling - Extend resilientConfirm to support 3-leg race (wallet + RPC + events) - Pass contract address and sender from useTokenTransfer for event filtering - Extract real on-chain txHash from receipt for explorer links - Capture block number before initial delay with 10-block safety buffer * prettier * fix: estimate gas per-tx instead of all upfront Gas pre-estimation for all transactions was running before any were sent. For multi-tx flows (approval + transferRemote), the transferRemote gas estimation would fail because the token allowance wasn't set yet — the simulation reverts without the approval in place. With no gasLimit set, wagmi falls back to estimating gas through the WalletConnect connector's rpcMap during sendTransaction, which can be CORS-blocked or time out, causing the transferRemote request to never reach the Safe wallet. Fix by estimating gas for each transaction immediately before sending it, so by the time transferRemote is estimated, all prior approvals are confirmed on-chain and the simulation uses the correct allowance state. * fix: detect Safe transferRemote via ExecutionSuccess event The event-based polling only watched the target contract for logs where the sender is an indexed topic. This works for ERC20 Approval (owner is indexed) but fails for transferRemote: the warp router emits SentTransferRemote(destination, recipient, amount) with no sender topic, so the Safe tx was never detected. Fix: each polling cycle now also queries the sender address (the Safe contract itself) for logs where the wallet-returned hash appears as a topic. Safe emits ExecutionSuccess(bytes32 indexed txHash, payment) when any tx executes — txHash equals the safeTxHash from sendTransaction. This is fully chain-agnostic; no Safe infrastructure URLs required. * use raw data on top of topic log * add test * refactor: remove redundant RPC polling leg from resilientConfirm confirm() in @hyperlane-xyz/widgets calls wagmi's waitForTransactionReceipt via the public client (raceTransport), not through the WalletConnect relay. The RPC polling leg was therefore a duplicate of what confirm() already does internally. Remove it. What stays: - Event-based polling (pollForContractEvent): the only mechanism that can detect Safe wallet transactions. Safe returns a safeTxHash that waitForTransactionReceipt cannot resolve, so confirm() hangs indefinitely for Safe wallets. Event polling detects the actual on-chain tx via logs. - Revert detection: wallet leg now explicitly checks receipt.status === 'reverted' since waitForTransactionReceipt returns success even for reverted transactions. - ensureWalletOnChain / waitForChainSwitch: added from staging to ensure wallet chain state is correct before submitting EVM transactions. * refactor: extract Safe wallet confirmation into safeWalletUtils Move fibonacciDelays, abortableSleep, pollForContractEvent, ResilientConfirmOptions, and resilientConfirm out of rpcUtils.ts into a dedicated safeWalletUtils.ts. rpcUtils.ts now only contains RPC transport (raceTransport, raceViemProviderBuilder, withWcRpcFirst), gas estimation (preEstimateGasForEvmTxs), and chain switching (waitForChainSwitch, ensureWalletOnChain). Corresponding tests moved to safeWalletUtils.test.ts. useTokenTransfer.ts imports resilientConfirm from the new module. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: deleted patch 18 unused * chore: upgrate ci/cd with v4, fix ut approval not covered the test * chore: update ci/cd due error when install the package * fix ut when ci/cd trigged --------- Co-authored-by: Jason Guo <33064781+Xaroz@users.noreply.github.com> Co-authored-by: Paul Balaji <10051819+paulbalaji@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: derryld3 <derryl@d3labs.io>
…dependency) (#163) * chore: bump hyperlane version * fix: isSmartContract check for EIP-7702 addresses to not show banner (hyperlane-xyz#850) With the inclusion of Smart Accounts ([EIP-7702](https://eip7702.io/)) the UI was incorrectly showing the recipient banner check for address that are smart accounts and not smart contracts - This PR introduces check if the contract code starts with the EIP-7702 selector to decide if the UI should show the warning banner or not - Refactors contract address check into its own util function <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Bug Fixes** * Improved contract address detection to accurately distinguish between smart accounts and regular contracts. * Enhanced error reporting with clearer contextual messages during address validation. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> * c feat: add preview fee estimate before bridge * feat: estimate gas preview * feat!: pnpm migration (hyperlane-xyz#840) Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x, following the patterns established in the monorepo migration ([hyperlane-monorepo#7410](hyperlane-xyz/hyperlane-monorepo#7410)). **Changes:** - Update `packageManager` to pnpm@10.25.0 - Convert `resolutions` to `pnpm.overrides` - Convert yarn patches to `pnpm.patchedDependencies` format - Pin dependency versions to match yarn.lock (pnpm re-resolves `^` ranges to latest): - `@cosmos-kit/react`: 2.18.0 - `@solana/wallet-adapter-wallets`: 0.19.16 - `@rainbow-me/rainbowkit`: 2.2.0 - Add phantom dependencies required by pnpm strict dependency isolation - Update CI workflows to use pnpm (pnpm/action-setup@v4, pnpm store caching) - Update GitHub Actions to latest versions (checkout@v6, setup-node@v6) - Update vercel.json to use pnpm@10.25.0 - Update README with pnpm commands - Remove yarn files (.yarn/, .yarnrc.yml, yarn.lock) - Add pnpm-lock.yaml - Fix unit testing - Update husky - [x] `pnpm install` succeeds - [x] `pnpm typecheck` passes - [x] `pnpm build` succeeds - [x] `pnpm lint` passes - [x] CI workflows pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Added support for Solana wallet integrations, Sentry error monitoring, and additional Chakra UI packages. * **Chores** * Migrated project tooling, package manager metadata, and CI workflows from Yarn to pnpm; updated GitHub Actions and dev tooling versions. * Upgraded and added multiple dependencies and devDependencies; replaced resolution/patch approach with pnpm-compatible overrides. * **Documentation** * Updated CLI/README commands and ignore lists to reflect pnpm usage. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore: delete yarn related, update the way fetch in react-query * fix: max button not calculated from balances, dynamic estimated fee * chore: bump depedency hyperlane 20.1.0 * Fix/metamask mobile walletconnect chain switch (#160) * fix: ensure wallet is on origin chain before EVM transactions WalletConnect with MetaMask mobile can take several seconds after a chain switch before the wagmi store reflects the new chain. The hardcoded 2-second sleep in @hyperlane-xyz/widgets is often not enough, causing the chain-ID assertion to fail with ChainMismatchError. Add waitForChainSwitch to poll getAccount().chainId every 500 ms (up to 30 s) and ensureWalletOnChain to call switchChain then wait. Call ensureWalletOnChain in executeTransfer before every EVM transaction so the wallet is confirmed on the correct chain before the widgets layer runs its own check. * test: add unit tests for waitForChainSwitch and ensureWalletOnChain Cover all branches of the two new rpcUtils helpers with fake-timer tests: immediate resolution, polling until chain updates, timeout with descriptive error, switchChain rejection swallowing, and the full 30 s default timeout path. Add EVM-specific tests to useTokenTransfer to verify ensureWalletOnChain is called with the correct wagmiConfig and chainId, that a ChainMismatchError surfaces the right toast, and that preEstimateGasForEvmTxs is invoked after the chain guard succeeds. * feat: Safe wallet support via event-based tx confirmation (#157) * feat: add resilient tx confirmation with RPC polling fallback Race wallet confirm() against direct blockchain polling with Fibonacci backoff to handle WalletConnect wallets that fail to resolve the confirmation callback. Uses 5s initial delay, Fibonacci intervals (1s, 1s, 2s, 3s... capped at 30s), and 1-hour max poll duration. * feat: add event-based tx confirmation for Safe wallet support Safe wallets return a safeTxHash (internal meta-transaction hash) from sendTransaction instead of an on-chain txHash. Both the wallet confirm callback and RPC polling use the public client to look up this hash, but it never exists on-chain — causing transfers to hang indefinitely. Add a third racing leg to resilientConfirm that watches for contract events on-chain via eth_getLogs. When the Safe executes the transaction, the target contract emits events (ERC20 Transfer, Approval, etc.) where the Safe address appears as an indexed topic. The event watcher detects this and extracts the real on-chain txHash from the log entry. This approach is completely chain-agnostic — works on any EVM chain with any Safe deployment without needing to know Safe infrastructure URLs. Key changes: - Add pollForContractEvent with Fibonacci backoff event polling - Extend resilientConfirm to support 3-leg race (wallet + RPC + events) - Pass contract address and sender from useTokenTransfer for event filtering - Extract real on-chain txHash from receipt for explorer links - Capture block number before initial delay with 10-block safety buffer * prettier * fix: estimate gas per-tx instead of all upfront Gas pre-estimation for all transactions was running before any were sent. For multi-tx flows (approval + transferRemote), the transferRemote gas estimation would fail because the token allowance wasn't set yet — the simulation reverts without the approval in place. With no gasLimit set, wagmi falls back to estimating gas through the WalletConnect connector's rpcMap during sendTransaction, which can be CORS-blocked or time out, causing the transferRemote request to never reach the Safe wallet. Fix by estimating gas for each transaction immediately before sending it, so by the time transferRemote is estimated, all prior approvals are confirmed on-chain and the simulation uses the correct allowance state. * fix: detect Safe transferRemote via ExecutionSuccess event The event-based polling only watched the target contract for logs where the sender is an indexed topic. This works for ERC20 Approval (owner is indexed) but fails for transferRemote: the warp router emits SentTransferRemote(destination, recipient, amount) with no sender topic, so the Safe tx was never detected. Fix: each polling cycle now also queries the sender address (the Safe contract itself) for logs where the wallet-returned hash appears as a topic. Safe emits ExecutionSuccess(bytes32 indexed txHash, payment) when any tx executes — txHash equals the safeTxHash from sendTransaction. This is fully chain-agnostic; no Safe infrastructure URLs required. * use raw data on top of topic log * add test * refactor: remove redundant RPC polling leg from resilientConfirm confirm() in @hyperlane-xyz/widgets calls wagmi's waitForTransactionReceipt via the public client (raceTransport), not through the WalletConnect relay. The RPC polling leg was therefore a duplicate of what confirm() already does internally. Remove it. What stays: - Event-based polling (pollForContractEvent): the only mechanism that can detect Safe wallet transactions. Safe returns a safeTxHash that waitForTransactionReceipt cannot resolve, so confirm() hangs indefinitely for Safe wallets. Event polling detects the actual on-chain tx via logs. - Revert detection: wallet leg now explicitly checks receipt.status === 'reverted' since waitForTransactionReceipt returns success even for reverted transactions. - ensureWalletOnChain / waitForChainSwitch: added from staging to ensure wallet chain state is correct before submitting EVM transactions. * refactor: extract Safe wallet confirmation into safeWalletUtils Move fibonacciDelays, abortableSleep, pollForContractEvent, ResilientConfirmOptions, and resilientConfirm out of rpcUtils.ts into a dedicated safeWalletUtils.ts. rpcUtils.ts now only contains RPC transport (raceTransport, raceViemProviderBuilder, withWcRpcFirst), gas estimation (preEstimateGasForEvmTxs), and chain switching (waitForChainSwitch, ensureWalletOnChain). Corresponding tests moved to safeWalletUtils.test.ts. useTokenTransfer.ts imports resilientConfirm from the new module. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: deleted patch 18 unused * chore: upgrate ci/cd with v4, fix ut approval not covered the test * chore: update ci/cd due error when install the package * fix ut when ci/cd trigged --------- Co-authored-by: Jason Guo <33064781+Xaroz@users.noreply.github.com> Co-authored-by: Paul Balaji <10051819+paulbalaji@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: derryld3 <derryl@d3labs.io>
…dependency) (#163) (#168) * chore: bump hyperlane version * fix: isSmartContract check for EIP-7702 addresses to not show banner (hyperlane-xyz#850) With the inclusion of Smart Accounts ([EIP-7702](https://eip7702.io/)) the UI was incorrectly showing the recipient banner check for address that are smart accounts and not smart contracts - This PR introduces check if the contract code starts with the EIP-7702 selector to decide if the UI should show the warning banner or not - Refactors contract address check into its own util function <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Bug Fixes** * Improved contract address detection to accurately distinguish between smart accounts and regular contracts. * Enhanced error reporting with clearer contextual messages during address validation. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> * c feat: add preview fee estimate before bridge * feat: estimate gas preview * feat!: pnpm migration (hyperlane-xyz#840) Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x, following the patterns established in the monorepo migration ([hyperlane-monorepo#7410](hyperlane-xyz/hyperlane-monorepo#7410)). **Changes:** - Update `packageManager` to pnpm@10.25.0 - Convert `resolutions` to `pnpm.overrides` - Convert yarn patches to `pnpm.patchedDependencies` format - Pin dependency versions to match yarn.lock (pnpm re-resolves `^` ranges to latest): - `@cosmos-kit/react`: 2.18.0 - `@solana/wallet-adapter-wallets`: 0.19.16 - `@rainbow-me/rainbowkit`: 2.2.0 - Add phantom dependencies required by pnpm strict dependency isolation - Update CI workflows to use pnpm (pnpm/action-setup@v4, pnpm store caching) - Update GitHub Actions to latest versions (checkout@v6, setup-node@v6) - Update vercel.json to use pnpm@10.25.0 - Update README with pnpm commands - Remove yarn files (.yarn/, .yarnrc.yml, yarn.lock) - Add pnpm-lock.yaml - Fix unit testing - Update husky - [x] `pnpm install` succeeds - [x] `pnpm typecheck` passes - [x] `pnpm build` succeeds - [x] `pnpm lint` passes - [x] CI workflows pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **New Features** * Added support for Solana wallet integrations, Sentry error monitoring, and additional Chakra UI packages. * **Chores** * Migrated project tooling, package manager metadata, and CI workflows from Yarn to pnpm; updated GitHub Actions and dev tooling versions. * Upgraded and added multiple dependencies and devDependencies; replaced resolution/patch approach with pnpm-compatible overrides. * **Documentation** * Updated CLI/README commands and ignore lists to reflect pnpm usage. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- * chore: delete yarn related, update the way fetch in react-query * fix: max button not calculated from balances, dynamic estimated fee * chore: bump depedency hyperlane 20.1.0 * Fix/metamask mobile walletconnect chain switch (#160) * fix: ensure wallet is on origin chain before EVM transactions WalletConnect with MetaMask mobile can take several seconds after a chain switch before the wagmi store reflects the new chain. The hardcoded 2-second sleep in @hyperlane-xyz/widgets is often not enough, causing the chain-ID assertion to fail with ChainMismatchError. Add waitForChainSwitch to poll getAccount().chainId every 500 ms (up to 30 s) and ensureWalletOnChain to call switchChain then wait. Call ensureWalletOnChain in executeTransfer before every EVM transaction so the wallet is confirmed on the correct chain before the widgets layer runs its own check. * test: add unit tests for waitForChainSwitch and ensureWalletOnChain Cover all branches of the two new rpcUtils helpers with fake-timer tests: immediate resolution, polling until chain updates, timeout with descriptive error, switchChain rejection swallowing, and the full 30 s default timeout path. Add EVM-specific tests to useTokenTransfer to verify ensureWalletOnChain is called with the correct wagmiConfig and chainId, that a ChainMismatchError surfaces the right toast, and that preEstimateGasForEvmTxs is invoked after the chain guard succeeds. * feat: Safe wallet support via event-based tx confirmation (#157) * feat: add resilient tx confirmation with RPC polling fallback Race wallet confirm() against direct blockchain polling with Fibonacci backoff to handle WalletConnect wallets that fail to resolve the confirmation callback. Uses 5s initial delay, Fibonacci intervals (1s, 1s, 2s, 3s... capped at 30s), and 1-hour max poll duration. * feat: add event-based tx confirmation for Safe wallet support Safe wallets return a safeTxHash (internal meta-transaction hash) from sendTransaction instead of an on-chain txHash. Both the wallet confirm callback and RPC polling use the public client to look up this hash, but it never exists on-chain — causing transfers to hang indefinitely. Add a third racing leg to resilientConfirm that watches for contract events on-chain via eth_getLogs. When the Safe executes the transaction, the target contract emits events (ERC20 Transfer, Approval, etc.) where the Safe address appears as an indexed topic. The event watcher detects this and extracts the real on-chain txHash from the log entry. This approach is completely chain-agnostic — works on any EVM chain with any Safe deployment without needing to know Safe infrastructure URLs. Key changes: - Add pollForContractEvent with Fibonacci backoff event polling - Extend resilientConfirm to support 3-leg race (wallet + RPC + events) - Pass contract address and sender from useTokenTransfer for event filtering - Extract real on-chain txHash from receipt for explorer links - Capture block number before initial delay with 10-block safety buffer * prettier * fix: estimate gas per-tx instead of all upfront Gas pre-estimation for all transactions was running before any were sent. For multi-tx flows (approval + transferRemote), the transferRemote gas estimation would fail because the token allowance wasn't set yet — the simulation reverts without the approval in place. With no gasLimit set, wagmi falls back to estimating gas through the WalletConnect connector's rpcMap during sendTransaction, which can be CORS-blocked or time out, causing the transferRemote request to never reach the Safe wallet. Fix by estimating gas for each transaction immediately before sending it, so by the time transferRemote is estimated, all prior approvals are confirmed on-chain and the simulation uses the correct allowance state. * fix: detect Safe transferRemote via ExecutionSuccess event The event-based polling only watched the target contract for logs where the sender is an indexed topic. This works for ERC20 Approval (owner is indexed) but fails for transferRemote: the warp router emits SentTransferRemote(destination, recipient, amount) with no sender topic, so the Safe tx was never detected. Fix: each polling cycle now also queries the sender address (the Safe contract itself) for logs where the wallet-returned hash appears as a topic. Safe emits ExecutionSuccess(bytes32 indexed txHash, payment) when any tx executes — txHash equals the safeTxHash from sendTransaction. This is fully chain-agnostic; no Safe infrastructure URLs required. * use raw data on top of topic log * add test * refactor: remove redundant RPC polling leg from resilientConfirm confirm() in @hyperlane-xyz/widgets calls wagmi's waitForTransactionReceipt via the public client (raceTransport), not through the WalletConnect relay. The RPC polling leg was therefore a duplicate of what confirm() already does internally. Remove it. What stays: - Event-based polling (pollForContractEvent): the only mechanism that can detect Safe wallet transactions. Safe returns a safeTxHash that waitForTransactionReceipt cannot resolve, so confirm() hangs indefinitely for Safe wallets. Event polling detects the actual on-chain tx via logs. - Revert detection: wallet leg now explicitly checks receipt.status === 'reverted' since waitForTransactionReceipt returns success even for reverted transactions. - ensureWalletOnChain / waitForChainSwitch: added from staging to ensure wallet chain state is correct before submitting EVM transactions. * refactor: extract Safe wallet confirmation into safeWalletUtils Move fibonacciDelays, abortableSleep, pollForContractEvent, ResilientConfirmOptions, and resilientConfirm out of rpcUtils.ts into a dedicated safeWalletUtils.ts. rpcUtils.ts now only contains RPC transport (raceTransport, raceViemProviderBuilder, withWcRpcFirst), gas estimation (preEstimateGasForEvmTxs), and chain switching (waitForChainSwitch, ensureWalletOnChain). Corresponding tests moved to safeWalletUtils.test.ts. useTokenTransfer.ts imports resilientConfirm from the new module. --------- * chore: deleted patch 18 unused * chore: upgrate ci/cd with v4, fix ut approval not covered the test * chore: update ci/cd due error when install the package * fix ut when ci/cd trigged --------- Co-authored-by: Jason Guo <33064781+Xaroz@users.noreply.github.com> Co-authored-by: Paul Balaji <10051819+paulbalaji@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: derryld3 <derryl@d3labs.io>
Description
Migrate package manager from Yarn 4.x (Berry) to pnpm 10.x.
Design docs:
Changes:
packageManagerto pnpm@10.25.0pnpm-workspace.yamlfor workspace configurationresolutionstopnpm.overridespnpm.patchedDependenciesformat.github/actions/pnpm-cacheaction for CI cachingDrive-by changes
Related issues
Backward compatibility
Yes - no runtime changes, only build tooling migration.
Testing
pnpm installsucceedspnpm buildsucceedspnpm testpassespnpm lintpassesSummary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.