GraphQlEvent
data class GraphQlEvent(var packageId: ObjectId?, var module: String?, var sender: Address?, var moveType: String, var contents: ByteArray, var timestamp: String?, var data: String, var json: String) : Disposable
An event as returned by the GraphQL events query.
This is a faithful view of the GraphQL response, distinct from the chain crate::types::events::Event. Three fields are optional, for two different reasons:
package_id,moduleandsenderare absent for events emitted by the system or at genesis (e.g. the genesis validator0x3::validator::StakingRequestEvents): on chain their sender is the zero address and their emitting module can't be resolved, both of which the GraphQL server reports asnull.timestampis 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.
Constructors
| GraphQlEvent | constructor(packageId: ObjectId?, module: String?, sender: Address?, moveType: String, contents: ByteArray, timestamp: String?, data: String, json: String) |
Properties
| Name | Summary |
|---|---|
| contents | var contents: ByteArray BCS serialized bytes of the event |
| data | var data: String Structured contents of a Move value |
| json | var json: String Representation of a Move value in JSON |
| module | var module: String? Module name of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events. |
| moveType | var moveType: String The type of the event emitted |
| packageId | var packageId: ObjectId? Package id of the top-level function invoked by a MoveCall command which triggered this event to be emitted. None for system events. |
| sender | var sender: Address? Address of the account that sent the transaction where this event was emitted. None for system events. |
| timestamp | var timestamp: String? UTC timestamp in milliseconds since epoch (1/1/1970) |
Functions
| Name | Summary |
|---|---|
| destroy | open override fun destroy() |