Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
298e9e6 to
7418945
Compare
...ages/no-modal/src/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.ts
Outdated
Show resolved
Hide resolved
...ages/no-modal/src/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.ts
Show resolved
Hide resolved
...ages/no-modal/src/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.ts
Outdated
Show resolved
Hide resolved
...ages/no-modal/src/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.ts
Outdated
Show resolved
Hide resolved
packages/no-modal/src/providers/ethereum-provider/rpc/eip7702Middleware.ts
Outdated
Show resolved
Hide resolved
...ages/no-modal/src/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.ts
Outdated
Show resolved
Hide resolved
.../providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.ts
Show resolved
Hide resolved
| @@ -1,3 +1,4 @@ | |||
| export * from "./eip5792Middleware"; | |||
There was a problem hiding this comment.
Missing barrel export for eip7702Middleware module
Medium Severity
The rpc/index.ts barrel file re-exports eip5792Middleware but not eip7702Middleware. In EthereumSigningProvider.ts, createEip5792Middleware is imported through the barrel (from "../../../ethereum-provider"), while createEip7702Middleware requires a direct file path import (from "../../../ethereum-provider/rpc/eip7702Middleware"). This inconsistency means other providers that need EIP-7702 middleware can't discover it through the standard barrel export.
| }); | ||
| return (code || "0x") as `0x${string}`; | ||
| }; | ||
| } |
There was a problem hiding this comment.
createGetEthCode ignores chainId causing cross-chain misqueries
Medium Severity
createGetEthCode silently ignores the _chainId parameter, always querying eth_getCode against the currently connected chain. In eip7702Middleware, getAccountUpgradeStatus passes a user-specified chainId to getIsEip7702UpgradeSupported and getDelegationAddress, which forward it to getEthCode — but the chain ID is discarded. If the requested chain differs from the connected chain, the upgrade status and delegation address will be incorrect.
Additional Locations (1)
| r: zeroAddress(), | ||
| s: zeroAddress(), | ||
| yParity: 0, | ||
| }); |
There was a problem hiding this comment.
Dummy signature uses 20-byte address instead of 32-byte value
High Severity
Signature.from({ r: zeroAddress(), s: zeroAddress(), yParity: 0 }) will throw at runtime because zeroAddress() returns a 20-byte hex string (0x0000…0000, 40 hex chars), but ethers.js v6 Signature constructor validates that r and s are exactly 32 bytes and rejects shorter values with an "invalid r" assertion error. This makes wallet_upgradeAccount always fail before the transaction is even built. A 32-byte zero value (e.g., "0x" + "00".repeat(32)) is needed instead.


Motivation and Context
Jira Link:
Description
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Note
Medium Risk
Touches transaction formatting/signing and provider initialization behavior; mistakes could lead to invalid tx serialization or new runtime throws for previously-null provider/chain states.
Overview
Adds EIP-7702 and EIP-5792 JSON-RPC support to
@web3auth/no-modalby introducing new middlewares (eip7702Middleware,eip5792Middleware) and wiring them intoEthereumSigningProvider’s RPC engine.Transaction handling is extended to support EIP-7702 setCode (type
0x4) by preserving tx type inTransactionFormatter, signingauthorizationListentries during MPC signing, and adding a sharedcreateGetEthCodehelper for controller-driven validation. Provider getters now throwproviderErrorswhen uninitialized/missing chain instead of returningnull, and@toruslabs/ethereum-controllersis bumped to^8.17.0with corresponding lockfile updates.Written by Cursor Bugbot for commit f92091b. This will update automatically on new commits. Configure here.