Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 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`.
*/
function _validate(
ForwardRequestData calldata request
Expand Down Expand Up @@ -232,7 +232,7 @@ contract ERC2771Forwarder is EIP712, Nonces {
keccak256(request.data)
)
)
).tryRecover(request.signature);
).tryRecoverCalldata(request.signature);

return (err == ECDSA.RecoverError.NoError, recovered);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/cryptography/signers/SignerECDSA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ abstract contract SignerECDSA is AbstractSigner {
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
(address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);
(address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature);
return signer() == recovered && err == ECDSA.RecoverError.NoError;
}
}
2 changes: 1 addition & 1 deletion contracts/utils/cryptography/signers/SignerEIP7702.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract contract SignerEIP7702 is AbstractSigner {
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
(address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);
(address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature);
return address(this) == recovered && err == ECDSA.RecoverError.NoError;
}
}
Loading