Skip to content

Commit

Permalink
Update specs for events.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Witkowski committed Nov 8, 2023
1 parent 7e52731 commit 3bfe815
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions x/trigger/spec/05_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,41 @@ The trigger module emits the following events:
<!-- TOC -->
- [Trigger Created](#trigger-created)
- [Trigger Destroyed](#trigger-destroyed)

- [Trigger Detected](#trigger-detected)
- [Trigger Executed](#trigger-executed)

---
## Trigger Created

Fires when a trigger is created with the CreateTriggerMsg.

| Type | Attribute Key | Attribute Value |
| -------------- | ------------- | --------------- |
| TriggerCreated | trigger_id | {ID string} |
| Type | Attribute Key | Attribute Value |
| -------------- | ------------- | ----------------------------- |
| TriggerCreated | trigger_id | The ID of the created trigger |

---
## Trigger Destroyed

Fires when a trigger is destroyed with the DestroyTriggerMsg.

| Type | Attribute Key | Attribute Value |
| ---------------- | ------------- | --------------- |
| TriggerDestroyed | trigger_id | {ID string} |
| Type | Attribute Key | Attribute Value |
| ---------------- | ------------- | ------------------------------------- |
| TriggerDestroyed | trigger_id | The ID of the trigger being destroyed |
---
## Trigger Detected

Fires when a trigger's event is detected in the EndBlocker.

| Type | Attribute Key | Attribute Value |
| --------------- | ------------- | ------------------------------------ |
| TriggerDetected | trigger_id | The ID of the trigger being detected |
---
## Trigger Executed

Fires when a trigger's actions are executed in the BeginBlocker.

| Type | Attribute Key | Attribute Value |
| --------------- | ------------- | ------------------------------------------------------------------------ |
| TriggerExecuted | trigger_id | The ID of the trigger being executed |
| TriggerExecuted | owner | The sdk.Address of the trigger's owner |
| TriggerExecuted | error | The error message received when failing to execute the trigger's actions |

0 comments on commit 3bfe815

Please sign in to comment.