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

refactor(sig-utils): simplify contract #111

Merged
merged 2 commits into from
Sep 25, 2023
Merged

refactor(sig-utils): simplify contract #111

merged 2 commits into from
Sep 25, 2023

Conversation

Rubilmax
Copy link
Contributor

@Rubilmax Rubilmax marked this pull request as ready for review September 25, 2023 11:45
// computes the hash of the fully encoded EIP-712 message for the domain, which can be used to recover the signer
function getTypedDataHash(Permit memory _permit) public view returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, getStructHash(_permit)));
function toTypedDataHash(Permit memory permit) public view returns (bytes32) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really want the same name? it's not returning the name result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does return the same result, but it doesn't take the same input parameters
I think it's fine, given that Solidity will infer the function based on input parameters

@MerlinEgalite MerlinEgalite merged commit d3ead8c into main Sep 25, 2023
6 checks passed
@MerlinEgalite MerlinEgalite deleted the refactor/ecdsa branch September 25, 2023 14:55
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.

OpenZeppelin already expose ECDSA.toTypedDataHash
3 participants