> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# core::starknet::account::AccountContract

A trait for account contracts that support class declarations (only `__validate__` and
`__execute__` are mandatory for an account).
This trait assumes that the calldata for invoke transactions is `Array`.
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.

## Signature

```rust theme={null}
pub trait AccountContract
```

## Trait functions

### **validate\_declare**

An entry point that is called to check if the account is willing to pay for the declaration
of the class with the given hash.
The entry point should return `starknet::VALIDATED` if the account is willing to pay
for the declaration.

#### Signature

```rust theme={null}
fn __validate_declare__(
    self: @TContractState, class_hash: felt252,
) -> felt252
```

### **validate**

An entry point that is called to check if the account is willing to pay for
executing a given set of calls.
The entry point should return `starknet::VALIDATED` if the account is willing to pay
for the execution, in which case `__execute__` will be called on the same set of calls.

#### Signature

```rust theme={null}
fn __validate__(
    ref self: TContractState, calls: Array,
) -> felt252
```

### **execute**

An entry point that is called to execute a given set of calls.
This entry point should block the deprecated v0 invoke transactions as they do not go
through the `__validate__` entry point.

#### Signature

```rust theme={null}
fn __execute__(
    ref self: TContractState, calls: Array,
) -> Array>
```
