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

chore: migrate GPv2Signing domain separator tests to Foundry #202

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

fedgiac
Copy link
Contributor

@fedgiac fedgiac commented Aug 9, 2024

Description

Starts migrating the GPv2Signing tests.
Some unused helper functions have been removed.

Test Plan

CI.

Related Issues

#120

@fedgiac fedgiac requested a review from a team as a code owner August 9, 2024 08:03
test/libraries/Eip712.sol Show resolved Hide resolved
Comment on lines +133 to +134
keccak256(bytes(domain.name)),
keccak256(bytes(domain.version)),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is there any explicit need for bytes wrapping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was also surprised but the wrapping is indeed needed:

Error (7556): Invalid type for argument in function call. Invalid implicit conversion from string memory to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding.

By the way, the compiler's suggestion is quite off the mark here, even if I see where it's coming from.

@fedgiac fedgiac merged commit 6067703 into main Aug 12, 2024
9 checks passed
@fedgiac fedgiac deleted the migrate-test-signing-domain-separator branch August 12, 2024 15:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants