Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [spearbit-88] move SIG_VALIDATION_X to a global var #73

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

howydev
Copy link
Collaborator

@howydev howydev commented Jan 17, 2024

Motivation

consolidate all usages of ERC4337 SIG_VALIDATION_PASSED, SIG_VALIDATION_FAILED into a global consts file

https://github.com/spearbit-audits/alchemy-nov-review/issues/88

@howydev howydev changed the title refactor: move SIG_VALIDATION_X to global fix: [spearbit-88] move SIG_VALIDATION_X to a global var Jan 17, 2024
@rholterhus
Copy link
Collaborator

There's also this code in SessionKeyPermissionsPlugin that could be worth updating with SIG_VALIDATION_PASSED/SIG_VALIDATION_FAILED:

return uint160(!validationSuccess ? 1 : 0) | (uint256(sessionKeyData.validUntil) << 160)
            | (uint256(currentValidAfter) << (208));

@howydev
Copy link
Collaborator Author

howydev commented Jan 18, 2024

sounds good! will make fixes after we merge @adam-alchemy's session key PR

Copy link
Collaborator

@jaypaik jaypaik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pending session key merge and suggested update above.

src/libraries/Constants.sol Show resolved Hide resolved
@jaypaik jaypaik merged commit 65547fc into audit-2023-11-20 Jan 23, 2024
3 checks passed
@jaypaik jaypaik deleted the howy/fix-88 branch January 23, 2024 04:27
@@ -24,7 +24,9 @@ import {
AssociatedLinkedListSet, AssociatedLinkedListSetLib
} from "../../libraries/AssociatedLinkedListSetLib.sol";
import {CastLib} from "../../libraries/CastLib.sol";
import {SetValue, SENTINEL_VALUE} from "../../libraries/LinkedListSetUtils.sol";
import {
SetValue, SENTINEL_VALUE, SIG_VALIDATION_PASSED, SIG_VALIDATION_FAILED
Copy link
Collaborator

@0xrubes 0xrubes Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import of SIG_VALIDATION_PASSED, else lgtm

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! addressing this in: #113

jaypaik added a commit that referenced this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants