GraphQlEvent
type GraphQlEvent
An event as returned by the GraphQL `events` query.
This is a faithful view of the GraphQL response, distinct from the chain [`Event`](crate::types::events::Event). Three fields are optional, for two different reasons:
- `package_id`, `module` and `sender` are absent for events emitted by the system or at genesis (e.g. the genesis validator `0x3::validator::StakingRequestEvent`s): on chain their sender is the zero address and their emitting module can't be resolved, both of which the GraphQL server reports as `null`. - `timestamp` is absent for events not yet included in a checkpoint (e.g. from a dry run or a just-executed transaction).
`move_type`, `contents`, `data` and `json` are always present (non-null in the GraphQL schema). Unlike the chain `Event`, this type is not BCS/JSON-serializable as a chain event.
type GraphQlEvent struct {
// Package id of the top-level function invoked by a MoveCall command which
// triggered this event to be emitted. `None` for system events.
PackageId **ObjectId
// Module name of the top-level function invoked by a MoveCall command
// which triggered this event to be emitted. `None` for system events.
Module *string
// Address of the account that sent the transaction where this event was
// emitted. `None` for system events.
Sender **Address
// The type of the event emitted
MoveType string
// BCS serialized bytes of the event
Contents []byte
// UTC timestamp in milliseconds since epoch (1/1/1970)
Timestamp *string
// Structured contents of a Move value
Data string
// Representation of a Move value in JSON
Json string
}
func (*GraphQlEvent) Destroy
func (r *GraphQlEvent) Destroy()