From 8ee4dc8eb752d3d2de5cd53fbd79f0260f495afb Mon Sep 17 00:00:00 2001 From: shiv Date: Thu, 7 Sep 2023 13:52:23 +0530 Subject: [PATCH] bit shift for xtra alidator check flag / title nit --- src/Keep.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Keep.sol b/src/Keep.sol index 601f7bf4..360e5201 100644 --- a/src/Keep.sol +++ b/src/Keep.sol @@ -5,7 +5,8 @@ import {ERC1155TokenReceiver, KeepToken} from "./KeepToken.sol"; import {Multicallable} from "./utils/Multicallable.sol"; /// @title Keep -/// @notice Tokenized multisig wallet. +/// @notice Multitoken signature auth system. +/// @dev Optimized for multisig operations. /// @author z0r0z.eth /// @custom:coauthor @ControlCplusControlV /// @custom:coauthor boredretard.eth @@ -507,8 +508,8 @@ contract Keep is ERC1155TokenReceiver, KeepToken, Multicallable { // Check signature `quorum` is met and validate auth. validationData = _validate(userOpHash, userOp.signature, id); - // If permissioned ID key (4337-10000), send `userOp` for `validator` check. - if (id > 4336 && id < 10001) + // Extract 'validator flag' in 33rd bit. If set, `validator` check `userOp` with `id`. + if (userOp.nonce & (1 << 32) != 0) validationData = validator.validateUserOp(userOp, userOpHash, id); // Send any missing funds to `entrypoint()` (msg.sender).