fix: gasless page - #252
Conversation
Adds a new "Gasless (EIP-7702)" section to the sidebar with three pages: - overview: architecture, deployed addresses for Sepolia and Polygon Amoy, SDK install - setup: deployPlatformPaymaster, staking, user whitelisting, building smartAccountClient - gasless-operations: code examples for all 12 SDK functions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… settings page Renames the EIP-7702 gasless feature to "Pay on Behalf" across titles and prose (SDK function names keep their Gasless suffix since those are real exports), and relocates the section from a top-level sidebar entry into a How Tos category. Adds an admin-vs-user flow diagram, explicit Token Registry v5 requirement, and a neutral disclaimer noting Pimlico is used as an example provider rather than an endorsed dependency. Also documents the new Pay on Behalf tab in TT-web's Settings panel, including the whitelist eligibility check flow.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds four Pay on Behalf documentation pages covering EIP-7702 architecture, setup, gasless operations, TT-web settings, and sidebar navigation. The documentation applies to Token Registry v5 and describes PlatformPaymaster-based ERC-4337 flows. ChangesPay on Behalf documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/how-tos/pay-on-behalf/operations.md`:
- Line 39: Update the UserOperation workflow before parsing RegistryDeployed and
TitleEscrowLinked events to call the bundler/permissionless
getUserOperationReceipt method with the returned UserOp hash; clarify that this
UserOperation receipt, rather than a normal transaction receipt lookup, is used
for event parsing.
In `@docs/how-tos/pay-on-behalf/overview.md`:
- Around line 149-158: Align the EIP-7702 delegation documentation with the
SDK’s actual canonical flow, choosing either separate type-4 delegation or
automatic delegation in the first UserOperation and applying it consistently.
Update the prerequisites and surrounding guidance in
docs/how-tos/pay-on-behalf/overview.md lines 149-158, then revise the
corresponding note in docs/how-tos/pay-on-behalf/setup.md lines 250-252; ensure
both pages describe the same delegation behavior.
In `@docs/how-tos/pay-on-behalf/setup.md`:
- Around line 188-200: Define the smart-account example’s configuration before
buildSmartAccountClient, sourcing the RPC endpoint from the documented
SEPOLIA_RPC_URL environment value and explicitly injecting the Pimlico API key.
Derive chainId from sepolia.id rather than leaving it undeclared, and use the
resulting configuration consistently in PIMLICO_URL, publicClient, and
walletClient setup.
- Around line 107-135: Update the staking snippet to import parseEther from viem
and replace the undefined deployerAccount in the addStake call with the
previously defined deployer symbol. Leave the existing deposit and staking
behavior unchanged.
- Around line 189-210: Update the to7702SimpleSmartAccount call in
buildSmartAccountClient to pass TrustVC’s Sepolia implementation via
accountLogicAddress set to 0xa46EC3920Ac5fc54F4bA33185A91ae250aDF59B8, instead
of relying on the Permissionless default.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8dc288c8-bb67-42a9-ba82-42ba38b9f72e
📒 Files selected for processing (5)
docs/how-tos/pay-on-behalf/operations.mddocs/how-tos/pay-on-behalf/overview.mddocs/how-tos/pay-on-behalf/setup.mddocs/how-tos/pay-on-behalf/tt-web-settings.mdsidebars.json
Replaces the Admin/User Mermaid diagrams in the Overview page with actual product screenshots, and walks through the full TT-web eligibility-check flow (delegation detection, pasting the PlatformPaymaster address, whitelist check, and the signature prompt) with corresponding screenshots.
- Clarify returned value is a UserOperation hash and document the waitForUserOperationReceipt lookup before parsing paymaster events. - Fix the EIP-7702 delegation flow: it's a separate one-time type-4 transaction (user-owned wallet: user signs, platform submits; or platform-managed wallet: platform does both), not bundled into the first UserOperation. - Add missing parseEther import and fix undefined deployerAccount ref in the staking snippet. - Define chainId/PIMLICO_API_KEY/RPC_URL explicitly in the smart account client example instead of referencing undeclared values. - Pass accountLogicAddress so to7702SimpleSmartAccount points at TrustVC's EIP7702Implementation instead of permissionless's default. - Move the Pimlico disclaimer to the top of the Setup page.
change ‘Gasless’ to ‘Pay on Behalf’
Move the entire ‘Pay on behalf’ documentation into How Tos
in Overview, add a flow diagram for users, to describe the flow of the pay on behalf (try to highlight portion done by an Admin and portion experienced by the user of the wallet)
add new page call pay on behalf functionality on TT-web, as the 4th tab. this covers the “settings” frontend and it’s usage.
Add disclaimer
state clearly that this features works on TR v5 only
Summary by CodeRabbit