An event in Flipside's data model represents the distillation of all interactions that occur within a transaction. An event could range from a simple transfer between two parties to more complex smart contract calls.
UDM Event Model
The event model is represented for each chain as a single table. For example ""ethereum.udm_events". The event model can conceptually be broken down into 2 core components, parent context data corresponding to the event and the event data itself.
Parent Context Data
Depending on the chain, a single transaction may consist of several "child" events.
To consistently represent the 1-to-many relationship, you will see 1 row that represents each transaction (including the fee for issuing the transaction) and then 1 or more rows representing all other events that are generated by this transaction.
All of these rows are grouped by their parent transaction metadata:
The following block-level metadata allows for block-level grouping of events.
UTC timestamp when the block was confirmed.
The block height.
A unique identifier of the transaction, typically a transaction hash.
Transaction type is used to distinguish the top-level transaction type, e.g. reward distribution, delegation, validator creation, or any smart contract function call on a chain like Ethereum.
The address that initiated the transaction.
The address of the transaction recipient.
The decimal adjusted fee associated with the transaction.
The USD equivalent value of fee at transaction time.
When you are looking at more complicated behaviors, you may want to filter by particular tx_type first, then look at the "child" events for all transactions in this subset.
Note: On Ethereum, the tx data is broken out into its own separate table. All other chains follow a 1 table rule for the Events data model. Check-out the specific Ethereum documentation for more details there.
The initiator of the event.
The recipient of the event.
The type of event, specific to each blockchain, for example, "transfer", "reward", "stake", "mint", etc.
If applicable, the on-chain asset involved in the event.
If applicable, the decimal adjusted amount involved in the event (this is typically present when the event_type is a "transfer")
If applicable, the USD equivalent value sent at transaction time (this is typically present when a market exists for the event_currency involved)