Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions corelib/src/starknet.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ pub mod event;
pub use event::Event;

pub mod account;
#[feature("deprecated-starknet-account-trait")]
#[deprecated(
feature: "deprecated-starknet-account-trait",
note: "This trait is deprecated in favor of the standardized Starknet Account Abstraction (AA)
interface, formalized in SNIP-6. Users should migrate to defining a contract interface
trait (e.g., #[starknet::interface] trait IAccount) that includes the mandatory SNIP-6
entry points: `__validate__`, `__execute__`, `__validate_declare__`, and
`__validate_deploy__`. The community-standard trait implementing this interface is
typically named `ISRC6`. For canonical examples, consult the OpenZeppelin Contracts for
Cairo repository.",
since: "2.15.0",
)]
pub use account::AccountContract;

pub mod storage;
Expand Down
11 changes: 11 additions & 0 deletions corelib/src/starknet/account.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ pub struct Call {
/// This is the network standard following SNIP6.
/// It is not enforced by Starknet, but deviating from the standard interface may lead to
/// incompatibility with standard tooling.
#[deprecated(
feature: "deprecated-starknet-account-trait",
note: "This trait is deprecated in favor of the standardized Starknet Account Abstraction (AA)
interface, formalized in SNIP-6. Users should migrate to defining a contract interface
trait (e.g., #[starknet::interface] trait IAccount) that includes the mandatory SNIP-6
entry points: `__validate__`, `__execute__`, `__validate_declare__`, and
`__validate_deploy__`. The community-standard trait implementing this interface is
typically named `ISRC6`. For canonical examples, consult the OpenZeppelin Contracts for
Cairo repository.",
since: "2.15.0",
)]
#[starknet::interface]
pub trait AccountContract<TContractState> {
/// An entry point that is called to check if the account is willing to pay for the declaration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ mod account {
self.validate_transaction()
}

#[feature("deprecated-starknet-account-trait")]
#[abi(embed_v0)]
impl AccountContractImpl of starknet::account::AccountContract<ContractState> {
fn __validate_declare__(self: @ContractState, class_hash: felt252) -> felt252 {
Expand Down