Skip to content

feat: add EIP-7702 gasless operations documentation - #249

Merged
isaackps merged 3 commits into
masterfrom
feat/eip7702-gasless-docs
Jul 9, 2026
Merged

feat: add EIP-7702 gasless operations documentation#249
isaackps merged 3 commits into
masterfrom
feat/eip7702-gasless-docs

Conversation

@RishabhS7

@RishabhS7 RishabhS7 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

Summary by CodeRabbit

  • Documentation
    • Added an EIP-7702 documentation set covering gasless operations, including an overview of the workflow and a one-time setup walkthrough.
    • Included practical usage examples for deployment, minting, escrow transfers/returns, and guidance on parsing related events and transaction hashes.
    • Documented required prerequisites, configuration (environment variables), and supported network addresses.
  • Chores
    • Updated the documentation sidebar to add the new “Gasless (EIP-7702)” section with the added pages.

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
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@RishabhS7, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: da809572-e583-437c-a5a7-2e17e1a525f8

📥 Commits

Reviewing files that changed from the base of the PR and between 3a88d4f and 5b83b4f.

📒 Files selected for processing (1)
  • docs/eip7702/overview.md
📝 Walkthrough

Walkthrough

This PR adds documentation for EIP-7702 gasless operations, including an overview page, a setup guide, a usage guide, and sidebar navigation for the new pages.

Changes

EIP-7702 Documentation

Layer / File(s) Summary
Overview page introducing gasless architecture
docs/eip7702/overview.md
Adds the EIP-7702 overview page with architecture, execution flow, deployed addresses, SDK install/import guidance, and prerequisites.
Setup page: paymaster deployment, staking, whitelisting, smart account client
docs/eip7702/setup.md
Adds setup instructions for Pimlico access, PlatformPaymaster deployment, EntryPoint staking, user whitelisting, smart account client construction, and required environment variables.
Gasless operations usage: registry, minting, title escrow, return-to-issuer
docs/eip7702/gasless-operations.md
Adds gasless operation examples for registry deployment, minting, TitleEscrow transfers, return-to-issuer flows, and a function summary table.
Sidebar navigation wiring
sidebars.json
Adds the new Gasless (EIP-7702) sidebar section under Migration / Upgrading.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: new EIP-7702 gasless operations documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/eip7702-gasless-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/eip7702/setup.md (1)

149-223: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Define the runtime values used in the smart-account example.

The snippet uses chainId, RPC_URL, and PIMLICO_API_KEY as bare identifiers, so it doesn’t compile as written. Derive them from the already-documented Sepolia env vars/constants or add the missing env vars to the prerequisites table.

♻️ Proposed fix
+const chainId = sepolia.id;
+const RPC_URL = process.env.SEPOLIA_RPC_URL as string;
+const PIMLICO_API_KEY = process.env.PIMLICO_API_KEY as string;
🤖 Prompt for 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.

In `@docs/eip7702/setup.md` around lines 149 - 223, The smart-account example uses
unresolved runtime values, so update the snippet in buildSmartAccountClient to
define or derive chainId, RPC_URL, and PIMLICO_API_KEY from the documented
Sepolia environment variables before constructing PIMLICO_URL. If these values
are meant to be user-provided, add them to the Required environment variables
table; otherwise reference the existing Sepolia constants/env names consistently
throughout the example.
🤖 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/eip7702/overview.md`:
- Around line 27-48: The fenced diagram block in overview.md is missing a
language tag, which triggers markdownlint. Update the opening fence for the
EIP-7702 overview diagram to use a text-like tag such as text so the block
remains a diagram while linting cleanly; locate the unlabeled fenced section
around the overview diagram content.

In `@docs/eip7702/setup.md`:
- Around line 55-61: The CREATE2 salt documentation is showing an unprefixed hex
string even though the `salt` field expects a `bytes32` value. Update the `salt`
entry in the options table to state that
`crypto.randomBytes(32).toString('hex')` should be prefixed with `0x`, and make
sure the wording around `salt` clearly reflects the expected `0x`-prefixed
format.
- Around line 67-96: The staking example is missing required symbols, so update
the setup snippet to declare or import everything it uses. In the EIP-7702 setup
example, add the missing parseEther import alongside the existing viem imports,
and replace the undeclared deployerAccount in the walletClient.writeContract
call with the existing deployer account symbol (or define a real deployerAccount
before use). Ensure both depositTo and addStake examples reference only symbols
that are actually declared in the snippet.

---

Outside diff comments:
In `@docs/eip7702/setup.md`:
- Around line 149-223: The smart-account example uses unresolved runtime values,
so update the snippet in buildSmartAccountClient to define or derive chainId,
RPC_URL, and PIMLICO_API_KEY from the documented Sepolia environment variables
before constructing PIMLICO_URL. If these values are meant to be user-provided,
add them to the Required environment variables table; otherwise reference the
existing Sepolia constants/env names consistently throughout the example.
🪄 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

Run ID: 1f405511-7b67-455f-9d96-45cb4294fec3

📥 Commits

Reviewing files that changed from the base of the PR and between f04f6e8 and 1004d32.

📒 Files selected for processing (4)
  • docs/eip7702/gasless-operations.md
  • docs/eip7702/overview.md
  • docs/eip7702/setup.md
  • sidebars.json

Comment thread docs/eip7702/overview.md
Comment on lines +27 to +48
```
User (EOA, no ETH)
│ 1. Sign EIP-7702 authorization → EOA delegates to EIP7702Implementation
│ 2. Submit UserOperation via Pimlico bundler
Bundler (Pimlico)
│ 3. Calls EntryPoint → validates against PlatformPaymaster
PlatformPaymaster
├── Path A — Title escrow / registry calls
│ Checks: caller ∈ authorizedCallers, target ∈ authorizedRegistries or authorizedTitleEscrows
│ Enforces: dailyLimit per user
└── Path B — deployRegistry / mintDocument on the paymaster itself
deployRegistry: userWhitelist[sender] > 0 (platform whitelists users)
mintDocument: caller has MINTER_ROLE on the registry
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language tag to the diagram fence.

The unlabeled fenced block at Line 27 triggers the markdownlint warning. Mark it as text (or similar) so the docs lint cleanly.

♻️ Proposed fix
-```
+```text
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
User (EOA, no ETH)
│ 1. Sign EIP-7702 authorization → EOA delegates to EIP7702Implementation
│ 2. Submit UserOperation via Pimlico bundler
Bundler (Pimlico)
│ 3. Calls EntryPoint → validates against PlatformPaymaster
PlatformPaymaster
├── Path A — Title escrow / registry calls
│ Checks: caller ∈ authorizedCallers, target ∈ authorizedRegistries or authorizedTitleEscrows
│ Enforces: dailyLimit per user
└── Path B — deployRegistry / mintDocument on the paymaster itself
deployRegistry: userWhitelist[sender] > 0 (platform whitelists users)
mintDocument: caller has MINTER_ROLE on the registry
```
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 27-27: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for 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.

In `@docs/eip7702/overview.md` around lines 27 - 48, The fenced diagram block in
overview.md is missing a language tag, which triggers markdownlint. Update the
opening fence for the EIP-7702 overview diagram to use a text-like tag such as
text so the block remains a diagram while linting cleanly; locate the unlabeled
fenced section around the overview diagram content.

Source: Linters/SAST tools

Comment thread docs/eip7702/setup.md
Comment on lines +55 to +61
| Option | Required | Description |
|---|---|---|
| `salt` | Yes | `bytes32` CREATE2 salt. Use `crypto.randomBytes(32).toString('hex')` for a random one. |
| `platformAddress` | No | Paymaster owner. Defaults to the signer's address. |
| `dailyLimit` | No | Per-user daily gas spend cap in wei. `0n` = unlimited. |
| `factoryAddress` | No | Override factory address. Defaults to Sepolia's deployed factory. |
| `chainId` | No | Used to auto-resolve `factoryAddress`. Defaults to Sepolia. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prefix the random CREATE2 salt with 0x.

crypto.randomBytes(32).toString('hex') returns bare hex, but the example and bytes32 input shape both expect a 0x-prefixed value.

♻️ Proposed fix
-Use `crypto.randomBytes(32).toString('hex')` for a random one.
+Use `0x${crypto.randomBytes(32).toString('hex')}` for a random one.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Option | Required | Description |
|---|---|---|
| `salt` | Yes | `bytes32` CREATE2 salt. Use `crypto.randomBytes(32).toString('hex')` for a random one. |
| `platformAddress` | No | Paymaster owner. Defaults to the signer's address. |
| `dailyLimit` | No | Per-user daily gas spend cap in wei. `0n` = unlimited. |
| `factoryAddress` | No | Override factory address. Defaults to Sepolia's deployed factory. |
| `chainId` | No | Used to auto-resolve `factoryAddress`. Defaults to Sepolia. |
| Option | Required | Description |
|---|---|---|
| `salt` | Yes | `bytes32` CREATE2 salt. Use `0x${crypto.randomBytes(32).toString('hex')}` for a random one. |
| `platformAddress` | No | Paymaster owner. Defaults to the signer's address. |
| `dailyLimit` | No | Per-user daily gas spend cap in wei. `0n` = unlimited. |
| `factoryAddress` | No | Override factory address. Defaults to Sepolia's deployed factory. |
| `chainId` | No | Used to auto-resolve `factoryAddress`. Defaults to Sepolia. |
🤖 Prompt for 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.

In `@docs/eip7702/setup.md` around lines 55 - 61, The CREATE2 salt documentation
is showing an unprefixed hex string even though the `salt` field expects a
`bytes32` value. Update the `salt` entry in the options table to state that
`crypto.randomBytes(32).toString('hex')` should be prefixed with `0x`, and make
sure the wording around `salt` clearly reflects the expected `0x`-prefixed
format.

Comment thread docs/eip7702/setup.md
Comment on lines +67 to +96
```ts
import { parseAbi, createWalletClient, http } from 'viem';
import { sepolia } from 'viem/chains';

const entryPointAbi = parseAbi([
'function depositTo(address account) external payable',
'function addStake(uint32 unstakeDelaySec) external payable',
]);

const ENTRY_POINT = '0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108';

// Deposit ETH to cover gas sponsorship
await walletClient.writeContract({
address: ENTRY_POINT,
abi: entryPointAbi,
functionName: 'depositTo',
args: [paymasterAddress],
value: parseEther('0.1'), // adjust as needed
});

// Stake for ERC-4337 compliance
await walletClient.writeContract({
address: ENTRY_POINT,
abi: entryPointAbi,
functionName: 'addStake',
args: [86400], // 1-day unstake delay
value: parseEther('0.001'),
account: deployerAccount,
chain: sepolia,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the staking example’s missing symbols.

This block references parseEther and deployerAccount without declaring either, so it won’t run as written. Import parseEther and reuse the existing deployer account (or define a real deployerAccount) before the writeContract call.

♻️ Proposed fix
-import { parseAbi, createWalletClient, http } from 'viem';
+import { parseAbi, createWalletClient, http, parseEther } from 'viem';
@@
-  account: deployerAccount,
+  account: deployer,
🤖 Prompt for 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.

In `@docs/eip7702/setup.md` around lines 67 - 96, The staking example is missing
required symbols, so update the setup snippet to declare or import everything it
uses. In the EIP-7702 setup example, add the missing parseEther import alongside
the existing viem imports, and replace the undeclared deployerAccount in the
walletClient.writeContract call with the existing deployer account symbol (or
define a real deployerAccount before use). Ensure both depositTo and addStake
examples reference only symbols that are actually declared in the snippet.

Comment thread docs/eip7702/overview.md
Comment thread docs/eip7702/setup.md
@isaackps
isaackps merged commit 9938d5d into master Jul 9, 2026
7 checks passed
@isaackps
isaackps deleted the feat/eip7702-gasless-docs branch July 9, 2026 08:06
@coderabbitai coderabbitai Bot mentioned this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants