-
Notifications
You must be signed in to change notification settings - Fork 358
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
Eth account support #361
Eth account support #361
Conversation
I see that you kept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking very good, I'm happy to see a better API for the Account library to support the multiple use cases people want to build.
I left some comments and requested changes
tests/mocks/eth_account.cairo
Outdated
pedersen_ptr : HashBuiltin*, | ||
range_check_ptr | ||
}(eth_address: felt): | ||
Account.initializer(eth_address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we sanitize somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good, @JulissaDantes! I left a couple of comments and piggybacked on @martriay's comments and questions a bit
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JulissaDantes these improvements look excellent! I left a few questions and suggestions, but I think we're super close!
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JulissaDantes I left some super minor suggestions. Otherwise, this looks good to me! Great work :)
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Left very few comments, we're almost there :D
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Fixes #161
Including secp256k1(the curve use by ethereum to generate their key pair and address) signature verification methods and eth_execute.
Adds a Ethereum signer in the test
signers.py
, calledTestEthSigner
, and instead of storing public and private key, stores private key and address(the last 20 bytes of the public key).The ethereum account preset contract stores the ethereum address instead of public key, as its internal public key, because a secp256k1 curve key pair public key is bigger than a felt, and also because the starkness verification method uses the Ethereum address instead of the public key so there was no point in changing the account library storages to include it, and never use it.
PR Checklist