eth-712-account support privacy - #26
Conversation
adf8669 to
00c2c0a
Compare
00c2c0a to
b44fe1e
Compare
ItayRosenberg
left a comment
There was a problem hiding this comment.
@ItayRosenberg reviewed 4 files and made 5 comments.
Reviewable status: 4 of 8 files reviewed, 5 unresolved discussions.
account_factory/src/account_factory.cairo line 117 at r2 (raw file):
} fn get_account(self: @ContractState, eth_address: EthAddress) -> ContractAddress {
it is confusing that one is get_account and the other get..._address
Code quote:
fn get_account(self: @ContractState, eth_address: EthAddress) -> ContractAddreaccount_factory/src/account_factory.cairo line 118 at r2 (raw file):
fn get_account(self: @ContractState, eth_address: EthAddress) -> ContractAddress { let account_address = eth_address_to_account(:eth_address);
why not use get\_expected\_account\_address?
Code quote:
eth_address_to_account(:eth_address);eth_712_account/scripts/eip712.py line 206 at r2 (raw file):
def hash_call_set(calls: list[dict]) -> int: """Hash CallSet struct matching call_set_hash_struct in eth_712_utils.cairo.""" return keccak_ints(CALL_SET_TYPE_HASH, hash_call_array(calls))
Suggestion:
:calls)eth_712_account/src/eth_712_account.cairo line 120 at r2 (raw file):
self: @ContractState, calls: Span<Call>, signature: Span<felt252>, ) -> felt252 { let (signature, evm_chain_id) = extract_signature(signature);
Suggestion:
(:signature);eth_712_account/src/interface.cairo line 18 at r2 (raw file):
/// Returns `VALIDATED` for a valid 6-felt signature and `0` for an invalid one /// Reverts on a malformed signature. /// signature (wrong length or out-of-range components) reverts.
/// Returns `VALIDATED` for a valid 6-felt signature and 0 for an invalid one.
/// Reverts on a malformed signature.
Code quote:
/// Returns `VALIDATED` for a valid 6-felt signature and `0` for an invalid one
/// Reverts on a malformed signature.
/// signature (wrong length or out-of-range components) reverts.
remollemo
left a comment
There was a problem hiding this comment.
@remollemo made 2 comments and resolved 5 discussions.
Reviewable status: 4 of 8 files reviewed, all discussions resolved.
eth_712_account/scripts/eip712.py line 206 at r2 (raw file):
def hash_call_set(calls: list[dict]) -> int: """Hash CallSet struct matching call_set_hash_struct in eth_712_utils.cairo.""" return keccak_ints(CALL_SET_TYPE_HASH, hash_call_array(calls))
- the added value of named variables in a single arg is arguable.
- it's python, not cairo.
eth_712_account/src/eth_712_account.cairo line 120 at r2 (raw file):
self: @ContractState, calls: Span<Call>, signature: Span<felt252>, ) -> felt252 { let (signature, evm_chain_id) = extract_signature(signature);
- the added value of named variables in a single arg is arguable.
- we have a few cases, 1 with
:signatureand a few without.
This change is