Account Contract
A smart contract must follow the Standard Account Interface specification defined in the SNIP-6. In practice, this means that the contract must implement theSRC6 and SRC5 interfaces to be considered an account contract.
SNIP-6: SRC6 + SRC5
Call struct is used to represent a call to a function (selector) in a target contract (to) with parameters (calldata). It is available under the starknet::account module.
Array<Call> to other contracts, with atleast one call.
-
__execute__: Executes a transaction after the validation phase. Returns an array of the serialized return of value (Span<felt252>) of each call. -
__validate__: Validates a transaction by verifying some predefined rules, such as the signature of the transaction. Returns theVALIDshort string (as a felt252) if the transaction is valid. -
is_valid_signature: Verify that a given signature is valid. This is mainly used by applications for authentication purposes.
__execute__ and __validate__ functions are exclusively called by the Starknet protocol.
SRC5 and SRC6 must be published with supports_interface.