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

feat(v2): use nested eip-712 approach for isValidSignature #36

Merged

Conversation

jaypaik
Copy link
Collaborator

@jaypaik jaypaik commented Mar 12, 2024

For transparent signing of messages (for the 712 case).

Inspired by:

Note that this removes the need for a typehash to be declared on the contract.

@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from 046b0bc to 0c98b9d Compare March 12, 2024 14:32
@jaypaik jaypaik changed the title feat: use nested eip-712 approach for isValidSignature feat(v2): use nested eip-712 approach for isValidSignature Mar 12, 2024
@jaypaik jaypaik force-pushed the 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable branch from 1d1c48d to fa694c6 Compare March 12, 2024 14:44
@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from 0c98b9d to 4e8b9ae Compare March 12, 2024 14:44
@jaypaik jaypaik mentioned this pull request Mar 12, 2024
3 tasks
@jaypaik jaypaik force-pushed the 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable branch from fa694c6 to 9836dde Compare March 12, 2024 22:03
@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from 4e8b9ae to 335cf09 Compare March 12, 2024 22:03
@jaypaik jaypaik force-pushed the 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable branch from 9836dde to 775df0e Compare March 12, 2024 22:04
@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from 335cf09 to 51523a2 Compare March 12, 2024 22:04
@jaypaik jaypaik force-pushed the 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable branch from 775df0e to 4774a7f Compare March 13, 2024 06:08
@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from 51523a2 to d5dda60 Compare March 13, 2024 06:32
Copy link
Contributor

@adam-alchemy adam-alchemy left a comment

Choose a reason for hiding this comment

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

Looks good, will base the specialized signature features off of this branch.

result := iszero(and(eq(chainid(), cachedChainId), eq(address(), cachedThis)))
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

newline for consistency

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The source files don't have it and these are ported untouched - I'll keep it this way but happy to revisit later!

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Contract for EIP-712 typed structured data hashing and signing.
Copy link
Contributor

Choose a reason for hiding this comment

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

Request to add the solady commit hash this was pulled from.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will probably track this in the readme or something upstack.

@jaypaik jaypaik force-pushed the 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable branch from ab666c3 to b4f2a46 Compare March 14, 2024 19:12
Base automatically changed from 03-10-feat_use_solady_s_minimal_ERC-1967_proxy_and_UUPSUpgradeable to develop March 14, 2024 19:15
@jaypaik jaypaik force-pushed the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch from d5dda60 to 04525d9 Compare March 14, 2024 19:16
@jaypaik jaypaik merged commit af7435d into develop Mar 14, 2024
2 checks passed
@jaypaik jaypaik deleted the 03-12-feat_use_nested_eip-712_approach_for_isValidSignature branch March 14, 2024 19:18
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.

2 participants