Skip to main content

Table Description

The near.actions table contains comprehensive data related to transactions on the NEAR blockchain, including transaction metadata like block_date and tx_hash, execution statuses, receipts, and detailed action information when applicable. In NEAR, a transaction can consist of one or more actions, signed by the sender’s account and executed by the network. These actions may involve token transfers, smart contract invocations, staking, and more. NEAR employs a unique transaction lifecycle where transactions are validated on the sender’s shard, converted into receipts, and processed on the receiver’s shard. This approach ensures efficient handling of cross-shard communication and data flow. To gain a clearer understanding of how NEAR data flows, watch our NEAR Data Flow video tutorial or visit the NEAR Data Flow documentation.

Column Descriptions

Table Sample

Data Manipulation Tips

The actions data in NEAR can be complicated and nested, causing it hard to analyze sometimes. So here we give two examples on how to work array and json data to make it easier to analyze.

Explode array of rows into separate rows with defined fields

When the action type is “DELEGATE_ACTION”, the action_delegate_delegate_action_actions becomes an array of size n with rows of fields. We can utilize CROSS JOIN UNNEST to first explode the array, then use . directly to access the fields in the row. Reference query can be found here.

Extract fields from JSON string

When the action type is “FUNCTION_CALL”, the action_function_call_args_parsed becomes a JSON string. We can utilize json_extract with $.<field_name> syntax to extract the fields from the JSON string. Reference query can be found here.