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
Outdated
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
Outdated
Show resolved
Hide resolved
packages/no-modal/src/providers/ethereum-provider/rpc/ethRpcMiddlewares.ts
Outdated
Show resolved
Hide resolved
packages/no-modal/src/providers/ethereum-provider/rpc/eip7702Middleware.ts
Outdated
Show resolved
Hide resolved
| "@toruslabs/http-helpers": "^8.1.1", | ||
| "@web3auth/auth": "^10.8.0", | ||
| "@web3auth/no-modal": "^10.14.1", | ||
| "@web3auth/no-modal": "file:../no-modal", |
There was a problem hiding this comment.
TODO: update this to published version.
There was a problem hiding this comment.
No.. this is linked via lerna
There was a problem hiding this comment.
okie. But originally, it uses the npm version.
| const guardedProviderMap = new WeakMap<object, IProvider>(); | ||
| const guardedProviders = new WeakSet<object>(); // We're using Set here to avoid duplicate guarded providers. | ||
|
|
||
| export function createGuardedRawProvider(provider: IProvider): IProvider { |
There was a problem hiding this comment.
this is a good approach but this breaks some chain event emits from our provider strategy.
Pls keep this guarding at connector level.
Also, the best way to check is via making wallet_getCapabilities
and checking for -32602 or 4100 error
There was a problem hiding this comment.
the best way to check is via making wallet_getCapabilities
Yes, but I think it would add an extra request if the connector supports it.
|
Superseded by #2383 |
Motivation and Context
Summary
Adds EIP-7702 (Account Delegation) and EIP-5792 (Wallet Call API) support to the Web3Auth SDK, enabling dapps to make batch transactions and smart account capabilities through wagmi hooks.
Key Changes
Guarded provider for graceful error handling: Introduced
createGuardedRawProvider, a Proxy-based provider wrapper that intercepts RPC requests and translates "method not found" errors (-32601) from EIP-7702/5792 methods into clear, developer-friendlyrpcErrors.methodNotFoundmessages (e.g., "Connected wallet does not support wallet_sendCalls"). This prevents cryptic errors from propagating to dapps when a connected wallet doesn't support these methods.Applied guarded provider across all integration points:
BaseProvider.request()now checks responses and errors for 7702/5792 method-not-found conditions.Web3AuthNoModalwraps the provider in a guarded proxy before emitting theCONNECTEDevent.@web3auth/no-modaland@web3auth/modalwagmi providers use the guarded provider when setting up connectors.Dependency bump: Upgraded
@toruslabs/ethereum-controllersfrom^8.15.0to^8.17.0to pull inEIP_5792_METHODSandEIP_7702_METHODSconstants.Updated wagmi demo app: Added an EIP-5792 playground section with buttons for
useCapabilities,useSendCalls, anduseCallsStatuswagmi hooks, demonstrating batch call workflows end-to-end.Important Note
Currently, only MetaMask and Web3Auth embedded Wallet Services support EIP-5792 methods from the dapp side. Other connected wallets will receive a clear "method not supported" error when attempting to use these methods.
Jira Link: https://consensyssoftware.atlassian.net/browse/W3APD-5325?atlOrigin=eyJpIjoiZTNmNmNkMjc4ODJmNGQ5YTgzYWJiYjhjZWM3MTUyNDUiLCJwIjoiaiJ9
Description
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Note
Medium Risk
Touches wallet transaction flows and introduces new provider RPC method usage (
wallet_*EIP-7702/5792), which can affect signing/sending behavior in demos; core logic changes appear limited and mostly additive.Overview
Adds an EIP-7702/EIP-5792 playground to the Next.js SSR demo
Main.tsx, including buttons to callwallet_getAccountUpgradeStatus,wallet_upgradeAccount,wallet_getCapabilities,wallet_sendCalls, andwallet_getCallsStatus, and a simplewagmi“send zero transaction” action with displayed tx hash/errors.Updates the demo Web3Auth provider config to set
defaultChainIdand enablewalletServicesConfigmodal confirmations/login mode. Also refreshes demo lockfiles to@web3auth/modal/@web3auth/no-modal10.14.1and related dependency bumps, and fixes a missing newline indemo/react-app-no-modal/src/web3RPC.ts.Written by Cursor Bugbot for commit 19a9ab9. This will update automatically on new commits. Configure here.