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.
Extended information about the current transaction.
Signature
#[derive(Copy, Drop, Debug, Serde)]
pub struct TxInfo {
pub version: felt252,
pub account_contract_address: ContractAddress,
pub max_fee: u128,
pub signature: Span,
pub transaction_hash: felt252,
pub chain_id: felt252,
pub nonce: felt252,
pub resource_bounds: Span,
pub tip: u128,
pub paymaster_data: Span,
pub nonce_data_availability_mode: u32,
pub fee_data_availability_mode: u32,
pub account_deployment_data: Span,
}
Members
version
The version of the transaction. It is fixed (currently, 1) 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).
Signature
account_contract_address
The account contract from which this transaction originates.
Signature
pub account_contract_address: ContractAddress
max_fee
The max_fee field of the transaction.
Signature
signature
The signature of the transaction.
Signature
transaction_hash
The hash of the transaction.
Signature
pub transaction_hash: felt252
chain_id
The identifier of the chain.
This field can be used to prevent replay of testnet transactions on mainnet.
Signature
nonce
The transaction’s nonce.
Signature
resource_bounds
A span of ResourceBounds structs used for V3 transactions.
Signature
pub resource_bounds: Span
tip
The tip of the transaction.
Signature
paymaster_data
If specified, the paymaster should pay for the execution of the transaction.
The data includes the address of the paymaster sponsoring the transaction, followed by
extra data to send to the paymaster.
Used for V3 transactions.
Signature
nonce_data_availability_mode
The data availability mode for the nonce.
Used for V3 transactions.
Signature
pub nonce_data_availability_mode: u32
fee_data_availability_mode
The data availability mode for the account balance from which fee will be taken.
Used for V3 transactions.
Signature
pub fee_data_availability_mode: u32
account_deployment_data
If nonempty, will contain the required data for deploying and initializing an account
contract: its class hash, address salt and constructor calldata.
Used for V3 transactions.
Signature
pub account_deployment_data: Span