OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
800 stars 322 forks source link

Add EthAccount #853

Closed ericnordelo closed 5 months ago

ericnordelo commented 6 months ago

Fixes #573

PR Checklist

ericnordelo commented 6 months ago

I also have some doubts on the EthAccount dual dispatcher. The v0 eth account pubkey used the felt252 eth address; whereas, this implementation uses the secp256k1point eth pubkey. Backward compatibility will be an issue. Do you agree?

I don't think we need to be BC with the cairo 0 version, but I'm wondering if we should add the camelCase interfaces for this module at all. A reason to keep it is that some contracts and modules can still be using isValidSignature, and this could be compatible by just passing a different signature (secp256k1 compatible). cc @martriay

ericnordelo commented 6 months ago

@andrew-fleming I've pushed the updates regarding error messages, after we confirm we are ok with it, I will update the rest in the other PR. The rules I'm following:

Let me know what you think.

martriay commented 5 months ago

We can fix the conflicts and merge.