Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/metatx/ERC2771Forwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {Errors} from "../utils/Errors.sol";
* * `to`: The address that should be called.
* * `value`: The amount of native token to attach with the requested call.
* * `gas`: The amount of gas limit that will be forwarded with the requested call.
* * `nonce`: A unique transaction ordering identifier to avoid replayability and request invalidation.
* * `nonce` (implicit): Taken from {Nonces} for `from` and included in the signed typed data.
* * `deadline`: A timestamp after which the request is not executable anymore.
* * `data`: Encoded `msg.data` to send with the requested call.
*
Expand Down Expand Up @@ -195,7 +195,7 @@ contract ERC2771Forwarder is EIP712, Nonces {

/**
* @dev Validates if the provided request can be executed at current block timestamp with
* the given `request.signature` on behalf of `request.signer`.
* the given `request.signature` on behalf of `request.from`.
*/
Comment on lines +198 to 199
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.

function _validate(
ForwardRequestData calldata request
Expand Down
Loading