Execution information
For the most up-to-date information, see the info.cairo
contract.
The struct ExecutionInfo
contains the following information about the currently executing block and the transactions in the block.
The ExecutionInfo
struct
block_info: Box<BlockInfo>
|
Contains information about a block. For details, see The |
tx_info: Box<TxInfo>
|
Contains information about a transaction. For details, see Transaction information: The |
caller_address : ContractAddress
|
The address of the contract that invokes the |
contract_address : ContractAddress
|
The address of the contract in which the |
entry_point_selector : felt252
|
The function that includes the |
The BlockInfo
struct
block_number: u64
|
The number of the block that is currently being executed. When called from an account contract’s `__validate__`, `__validate_deploy__`, or `__validate_declare__` function, this value is rounded down to the nearest multiple of 100. |
block_timestamp: u64
|
The timestamp showing the creation time of the block, in seconds since the Unix epoch, based on UTC time, rounded down to the nearest second. When called from an account contract’s `__validate__`, `__validate_deploy__`, or `__validate_declare__` function, this value is rounded down to the nearest hour. |
sequencer_address: ContractAddress
|
The address of the Starknet sequencer contract. |
Transaction information: The TxInfo
struct
version: felt252
|
The version of the transaction. It is fixed (currently, 3) in the OS, and should be signed by the account contract. This field allows invalidating old transactions, whenever the meaning of the other transaction fields is changed (in the OS). |
account_contract_address: ContractAddress
|
The account contract from which this transaction originates. |
max_fee: u128
|
The max_fee field of the transaction. |
signature: Span<felt252>
|
The signature of the transaction. |
transaction_hash: felt252
|
The hash of the transaction. |
chain_id: felt252
|
The identifier of the chain. This field can be used to prevent replay of testnet transactions on mainnet. |
nonce: felt252
|
The transaction’s nonce. |
resource_bounds: Span<ResourceBounds>
|
A span of |
tip: u128
|
The tip. |
paymaster_data: Span<felt252>
|
If specified, the paymaster should pay for the execution of the tx. The data includes the address of the paymaster sponsoring the transaction, followed by extra data to send to the paymaster. |
nonce_data_availability_mode: u32
|
The data availability mode for the nonce. |
fee_data_availability_mode: u32
|
The data availability mode for the account balance from which fee will be taken. |
account_deployment_data: Span<felt252>
|
If nonempty, will contain the required data for deploying and initializing an account contract: its class hash, address salt and constructor calldata. |