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 eth sig failure #295

Merged
merged 6 commits into from
Aug 23, 2022
Merged

Fix eth sig failure #295

merged 6 commits into from
Aug 23, 2022

Conversation

pscott
Copy link
Contributor

@pscott pscott commented Aug 23, 2022

After investigation, I found that calling .address in starknet.js would actually left pad the address with some zeroes.
In the cairo code however, I was right-padding with zeroes (as specified in EIP-712....).

This PR removes the right-padding done on the space address in the cairo code.
The proposer_address / voter_address are not padded because they are 20 bytes long and effectively right padded when constructing the EIP-712 hash in js... :)

Closes #292

@pscott pscott requested a review from Orland0x August 23, 2022 13:07
@pscott
Copy link
Contributor Author

pscott commented Aug 23, 2022

This PR also brings back the tweak to hash_array that was removed in a previous PR :p

@Orland0x Orland0x merged commit bf91695 into develop Aug 23, 2022
@Orland0x
Copy link
Contributor

LGTM

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.

fix eth signature issue
2 participants