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

Add Ethereum Signature Verification #203

Merged
merged 33 commits into from
Jul 27, 2022
Merged

Add Ethereum Signature Verification #203

merged 33 commits into from
Jul 27, 2022

Conversation

pscott
Copy link
Contributor

@pscott pscott commented Jun 24, 2022

This PR:

  • Adds the EthSig.cairo authenticator which verifies a classic Ethereum signature (r, s, v) over an EIP-712 hash (hashes types are in tests/starknet/helper/types.ts).
  • Modifies felt_to_uint256 to use split_felt from the common library

Note: metadataURI is NOT added to the Propose type because strings are a little bit hash in Cairo. This should come in a later update :) (tracking issue: #202)

Closes #30 !! 🥳

@pscott pscott requested a review from Orland0x June 24, 2022 15:35
@pscott
Copy link
Contributor Author

pscott commented Jun 25, 2022

@Orland0x wtf test is failing in the StorageProof side of things? Any idea of what's going on here? I guess it has to do with a cairo version maybe?

https://github.com/snapshot-labs/sx-core/runs/7044640255?check_suite_focus=true

@Orland0x
Copy link
Contributor

Orland0x commented Jun 26, 2022

Hmmm 0x3ae0... is the selector for get_latest_l1_block in Fossil so I think its to do with the an old version of Fossil (that didnt have that method) getting deployed.
try adding git submodule update --remote to the GA

README.md Show resolved Hide resolved
test/shared/setup.ts Outdated Show resolved Hide resolved
test/shared/setup.ts Outdated Show resolved Hide resolved
@Orland0x Orland0x merged commit e522e87 into develop Jul 27, 2022
@Orland0x Orland0x deleted the add_eth_auth branch August 1, 2022 10: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.

Try to verify an Ethereum signature match EIP712 hash on StarkNet
2 participants