Skip to content

Commit

Permalink
SME comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stoobie committed Mar 25, 2024
1 parent af1611a commit 0e3b14e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ The functions in the table xref:#starknet_account_interface_functions[] are part
| `+__validate__+` | Always required
| `+__execute__+` | Always required
| `+__validate_declare__+` | Required for a contract to be able to send a `DECLARE` transaction.
| `+__validate_deploy__+` | Required when deploying an instance of an account contract with a `DEPLOY_ACCOUNT` _transaction_.
| `+__validate_deploy__+` a| Required when deploying an instance of an account contract with a `DEPLOY_ACCOUNT` _transaction_.

[NOTE]
====
You can only use the `+__validate_deploy__+` function in an account contract to validate the `DEPLOY_ACCOUNT` transaction for that same contract.
====
| `+__constructor__+` | If an account does not define a `+__constructor__+` function, the sequencer uses a default `+__constructor__+` function, which is empty.
|===

Expand Down Expand Up @@ -64,7 +69,9 @@ So the fees you need to pay to invalidate transactions in the mempool are direct
* The maximum number of computational steps, measured in Cairo steps, for a validation function is 1,000,000.
* A builtin can be applied a limited number of times. For specific limits for each builtin, see xref:tools:limits_and_triggers.adoc[].
* Access is restricted to `sequencer_address` in the `get_execution_info` syscall. The syscall returns zero values for `sequencer_address`.
* The values of `block_number` and `block_timestamp` in the `get_execution_info` syscall are modified.
* The values of `block_number` and `block_timestamp` in the `get_execution_info` syscall are modified as follows:
** `block_timestamp` returns the hour, rounded down.
** `block_number` returns the block number, rounded down to the nearest multiple of 100.
* The following syscalls cannot be called:
** `get_block_hash`
** `get_sequencer_address` `get_sequencer_address` is only supported for Cairo 0 contracts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The mempool performs a preliminary validation on the transaction. It lists for e

. *Sequencer validation:* The sequencer performs preliminary validation on the transaction before executing it to ensure that the transaction is still valid. If the transaction is invalid, it does not proceed.
+
Validation in this context is analogous to Ethereum's signature checking, including running the account's `+__validate__+` function, ensuring that the current account balance exceeds the value of `max_fee` (prior to v3 transactions), and more.
Validation in this context is analogous to Ethereum's signature checking, including running the account's `+__validate__+`, `+__validate_deploy__+`, or `+__validate_declare__+` function, depending on the type of transaction, ensuring that the current account balance exceeds the value of `max_fee` (prior to v3 transactions), and more.
+
include::partial$snippet_v3_max_price_sidebar.adoc[]

Expand Down

0 comments on commit 0e3b14e

Please sign in to comment.