Transactions
Transactions are cryptographically signed instructions from accounts. An account will initiate a transaction to update the state of the Polygon network. Transactions always originate from an externally owned account (a smart contract can not initiate a transaction).
Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM; after this happens, a validator will execute the transaction and propagate the resulting state change to the rest of the network.
Sample Query
Querying the latest transactions.
Table Columns
The example used is a swap from WETH to USDC on Polygon (Polygonscan).
Column Name | Description | Example |
---|---|---|
hash | Unique identifier of a transaction. | 0x7404daf9b54e6e0bdc0c26732bd6dfc604c03f20453be2066273760a175ebcb2 |
nonce | 2,988 | |
transaction_index | The position of this transaction in the block that it belongs to. The first transaction has index 0. | 52 |
from_address | The address of the sending party of this transaction. | 0xd779f77e5a895f8d2bb690c4ae389d8427ac6985 |
to_address | The address of the receiving party of this transaction (could be a contract address). | 0x0bc82b2e1b7219431f7d25b3aa0d097bdeb84955 |
value | The amount of ether sent in this transaction, in wei. | 0 |
gas | The maximum amount of gas allocated for this transaction in wei. | 3,000,000 |
gas_price | Cost per unit of gas specified by the transaction in wei. The higher the gas price, the higher chance of getting included in a block. | 416,900,000,000 |
input | The data send along with the transaction. | <truncated> 0x39aca1c10000000000000000000000001111111254fb6c44ba00 |
receipt_cumulative_gas_used | The total amount of gas used when this transaction was executed in the block. | 8,716,763 |
receipt_gas_used | Gas consumed by the transaction in wei. | 224,188 |
receipt_contract_address | The contract address created, if the transaction was a contract creation, otherwise null. | |
receipt_root | Transaction stateroot (pre Byzantium) | |
receipt_status | Success status of the transaction. Either 1 (success) or 0 (failure). | 1 |
block_timestamp | The time when the block that contains this transaction was included on the blockchain. | 2023-06-23 15:58:02 |
block_number | The length of the chain, in blocks. | 44,250,049 |
block_hash | Unique identifier of the block that includes this transaction. | 0xd53db0d13bb2df72fad8350a1a04cc53ea83f62b3a42af682ff07cbcce7f1bae |
receipt_effective_gas_price | The sum of the base fee and tip paid per unit of gas. | 416,900,000,000 |
max_fee_per_gas | ||
max_priority_fee_per_gas | ||
transaction_type | The integer of the transaction type, 0 for legacy transactions, 1 for access list types, 2 for dynamic fees. |
Other Advanced Fields
input
The binary data that forms the input to the transaction. For example, contract function call information is recorded here.
transaction_type
receipt_root
Last updated