Skip to content

Commit

Permalink
[L-02] Fix Misleading Comments in Contract Code
Browse files Browse the repository at this point in the history
  • Loading branch information
nlordell committed Jan 26, 2024
1 parent abfafdc commit cd14438
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/4337/contracts/Safe4337Module.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract Safe4337Module is IAccount, HandlerContext, CompatibilityFallbackHandle
}

/**
* @notice The EIP-712 type-hash for the domain separator used for verifying Safe operation signatures.
* @notice The address of the EntryPoint contract supported by this module.
*/
address public immutable SUPPORTED_ENTRYPOINT;

Expand All @@ -96,9 +96,9 @@ contract Safe4337Module is IAccount, HandlerContext, CompatibilityFallbackHandle
uint256 missingAccountFunds
) external onlySupportedEntryPoint returns (uint256 validationData) {
address payable safeAddress = payable(userOp.sender);
// The entry point address is appended to the calldata in `HandlerContext` contract
// Because of this, the relayer may manipulate the entry point address, therefore we have to verify that
// the sender is the Safe specified in the userOperation
// The entry point address is appended to the calldata by the Safe in the `FallbackManager` contract,
// following ERC-2771. Because of this, the relayer may manipulate the entry point address, therefore
// we have to verify that the sender is the Safe specified in the userOperation.
require(safeAddress == msg.sender, "Invalid caller");

// We check the execution function signature to make sure the entry point can't call any other function
Expand Down

0 comments on commit cd14438

Please sign in to comment.