Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 701 Bytes

03_events.md

File metadata and controls

36 lines (26 loc) · 701 Bytes

Events

The epochs module emits Cosmos SDK TypedEvents in the form of proto messages to provide state updates for applications like block explorers.

The epochs module emits the following events:

EventBeginEpoch

Emitted when an epoch begins.

message EventBeginEpoch {
  int64 current_epoch = 1;
  google.protobuf.Timestamp start_time = 2 [
    (gogoproto.stdtime) = true,
    (gogoproto.nullable) = false,
    (gogoproto.moretags) = "yaml:\"start_time\""
  ];
}

EventEndEpoch

Emitted when an epoch ends.

message EventEndEpoch {
  int64 current_epoch = 1;
}

These two events in tandem can be used to calculate epoch running time.