can't understand this line code in BLSAccount.sol
sunvim opened this issue · 2 comments
sunvim commented
function _validateSignature(
UserOperation calldata userOp,
bytes32 userOpHash
) internal view override returns (uint256 validationData) {
(userOp, userOpHash);
if (userOp.initCode.length != 0) {
// BLSSignatureAggregator.getUserOpPublicKey() assumes that during account creation, the public key is
// the suffix of the initCode.
// The account MUST validate it
bytes32 pubKeyHash = keccak256(abi.encode(getBlsPublicKey()));
require(
keccak256(userOp.initCode[userOp.initCode.length - 128:]) ==
pubKeyHash,
"wrong pubkey"
);
}
return _packValidationData(ValidationData(aggregator, 0, 0));
}
this line code : (userOp, userOpHash);
what mean ? who can help me that confuse?
leekt commented
I think it is a legacy code that was used to silence the warning for "not used local variable"
sunvim commented
thank you help me, I am happy to get the check from expert!