Event monitoring
All protocol events are emitted through a single EventEmitter contract. Every event carries an eventName field, so you can monitor any protocol action by filtering on the EventEmitter address plus the eventName value — without needing to track individual logic contract addresses, which may be upgraded over time.
The EventEmitter address for each network is listed on Contract addresses. For the full generated deployment inventory, see the gmx-synthetics docs folder.
Event types
The EventEmitter contract defines three structured event signatures that differ by the number of indexed bytes32 topics:
| Event | Indexed topics | Use case |
|---|---|---|
EventLog | eventNameHash only | General events with no additional indexed lookup |
EventLog1 | eventNameHash, topic1 | Events indexed by one key (for example, an action key) |
EventLog2 | eventNameHash, topic1, topic2 | Events indexed by two keys (for example, market address and account) |
All three variants include msgSender, eventName (as a plain string), eventNameHash (indexed for filtering), and eventData (a structured EventUtils.EventLogData payload containing typed arrays of addresses, uints, ints, bools, bytes32 values, bytes, and strings).
The EventEmitter also exposes raw log functions (emitDataLog1 through emitDataLog4) that emit unstructured logs using assembly. These are used for general-purpose data emission and don't follow the EventLog schema.
Which variant a specific protocol event uses depends on how the emitting contract calls the EventEmitter. Check the relevant contract source to determine the correct variant before setting up a filter.
Example: monitoring Timelock actions with OpenZeppelin Defender
The following steps configure an alert that fires whenever an action is signalled on the TimelockConfig contract. Timelock signal events use EventLog1 with eventName == "SignalPendingAction" and the action key as topic1.
- In OpenZeppelin Defender, select the "Monitor" (Sentinel) option.
- Click "Create Monitor."
- Enter a name for the monitor.
- Select the target network.
- Enter the
EventEmitteraddress for that network in the "Addresses" field. - Under "Contract conditions," select "Events" > "EventLog1."
- In the filter field below "EventLog1," enter
eventName == "SignalPendingAction". - Click "Next" and configure a notification channel.
With this configuration, you receive a notification each time an action is signalled on the Timelock.