Skip to content

Conversation

radik878
Copy link
Contributor

Replace “request.signer” with “request.from” in validate NatSpec to match the actual struct field and validation logic.
Clarify that the request nonce is implicit (sourced from Nonces for from and included in the typed data) rather than being a field in ForwardRequestData.

@radik878 radik878 requested a review from a team as a code owner September 18, 2025 08:21
Copy link

changeset-bot bot commented Sep 18, 2025

⚠️ No Changeset found

Latest commit: db79177

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Updated comments in contracts/metatx/ERC2771Forwarder.sol. Clarified that the nonce is implicit, taken from Nonces for the from address and included in the signed data, rather than being a separate explicit field. Adjusted validation commentary to state that the signature is on behalf of request.from instead of request.signer. No executable logic, types, or public API were modified.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately summarizes the primary change: documentation fixes to ERC2771Forwarder, specifically correcting the validate NatSpec signer reference and clarifying implicit nonce handling. It is concise, focused, and directly related to the changes described in the PR. The phrasing is clear and appropriate for a commit/PR history entry.
Description Check ✅ Passed The PR description clearly states the documentation edits being made: replacing request.signer with request.from in the validate NatSpec and clarifying that the nonce is implicit and sourced from Nonces for the from address. This matches the raw_summary and PR objectives and is directly related to the changes in ERC2771Forwarder.sol. For a documentation-only change the level of detail is sufficient for reviewers to understand intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
contracts/metatx/ERC2771Forwarder.sol (1)

22-22: LGTM: implicit nonce doc fix is accurate.

Matches implementation: nonce is injected from Nonces during hashing (nonces(request.from)) and consumed via _useNonce(signer) before the call.

Optional: Append “consumed via {_useNonce} prior to execution” to make nonce consumption explicit.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2e9908 and db79177.

📒 Files selected for processing (1)
  • contracts/metatx/ERC2771Forwarder.sol (2 hunks)
⏰ 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). (6)
  • GitHub Check: slither
  • GitHub Check: coverage
  • GitHub Check: tests
  • GitHub Check: tests-foundry
  • GitHub Check: tests-upgradeable
  • GitHub Check: halmos

Comment on lines +198 to 199
* the given `request.signature` on behalf of `request.from`.
*/
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

🧩 Analysis chain

LGTM: validation wording correctly ties signature to request.from.

Consistent with _validate and _recoverForwardRequestSigner.

Run to ensure no lingering references to request.signer in docs/comments:


🏁 Script executed:

#!/bin/bash
rg -nP -C2 '\brequest\.signer\b|request signer' --type Solidity --type md --iglob '!**/node_modules/**'

Length of output: 32


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Re-run search without relying on rg's Solidity filetype
rg -nP -C2 '\brequest\.signer\b|request signer' --glob '**/*.sol' --glob '**/*.md' -g '!**/node_modules/**' || true

Length of output: 2245


LGTM: validation wording correctly ties signature to request.from. Fix remaining 'request signer' mentions in docs/comments.

Consistent with _validate and _recoverForwardRequestSigner.

  • contracts/metatx/ERC2771Forwarder.sol:18 — "* from: An address to operate on behalf of. It is required to be equal to the request signer."
  • CHANGELOG.md:376–377, 566–567 — references to "request signer address"

Replace "request signer" with request.from or reword to "signature must be from request.from".

🤖 Prompt for AI Agents
In contracts/metatx/ERC2771Forwarder.sol (around lines 18 and 198–199) and
CHANGELOG.md (lines ~376–377 and ~566–567), there are outdated references to
"request signer" — update the text to reference `request.from` or rephrase to
"signature must be from request.from" so the docs/comments consistently tie the
signature to request.from; edit the specific lines to replace "request signer"
with the literal `request.from` or the suggested rewording, preserving
surrounding punctuation and formatting.

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.

1 participant