Replies: 5 comments 4 replies
-
Great initiative! A few comments:
so what do you think about this?:
|
Beta Was this translation helpful? Give feedback.
-
Implemented in #51 |
Beta Was this translation helpful? Give feedback.
-
Hey @juniset you mention that For example, the Looking at the code implementation of Why is this implemented in this way? As currently this means the Thanks! |
Beta Was this translation helpful? Give feedback.
-
Linking #24 for completeness since it's related. |
Beta Was this translation helpful? Give feedback.
-
As discussed in here, here, and ratified in here, this is the latest agreed standard interface for account contracts: %lang starknet
struct Call {
to: felt,
selector: felt,
calldata_len: felt,
calldata: felt*,
}
// Tmp struct introduced while we wait for Cairo to support passing `[Call]` to __execute__
struct CallArray {
to: felt,
selector: felt,
data_offset: felt,
data_len: felt,
}
@contract_interface
namespace IAccount {
func supportsInterface(interfaceId: felt) -> (success: felt) {
}
func isValidSignature(
hash: felt,
signature_len: felt,
signature: felt*
) -> (isValid: felt) {
}
func __validate__(
call_array_len: felt,
call_array: CallArray*,
calldata_len: felt,
calldata: felt*
) {
}
func __validate_declare__(class_hash: felt) {
}
func __execute__(
call_array_len: felt,
call_array: CallArray*,
calldata_len: felt,
calldata: felt*
) -> (response_len: felt, response: felt*) {
}
}
|
Beta Was this translation helpful? Give feedback.
-
Both OpenZeppelin and Argent are working on a user facing account (or wallet) with the intention to share some common methods to execute transactions, verify off-chain signatures, etc. We should standardize that interface to simplify the development of the Starknet ecosystem. This will also make it simpler to introduce fees, L1 escape, etc.
For example, with a well defined interface we can create an abstraction in the
starknet.js
SDK and facilitate interactions with all user facing accounts.There is already an
IAccount
interface but I think it is not generic enough. For example, theset_public_key
method is only relevant in the context where there is only one keys, but would not work for a multisig.n alternative definition of the interface could be:
Maybe we also need a better name than the "generic" Account?
Beta Was this translation helpful? Give feedback.
All reactions