Skip to content

Commit

Permalink
docs: add detailed explanation about default events (#1083)
Browse files Browse the repository at this point in the history
* docs: add detailed explanation about default events

* Update CHANGELOG.md

* improve redundant sentences
  • Loading branch information
ryu1-sakai committed Sep 20, 2023
1 parent 69f7ed6 commit 8ae897c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Build, CI

### Document Updates
* (docs) [\#1083](https://github.com/Finschia/finschia-sdk/pull/1083) Add detailed explanation about default events
6 changes: 6 additions & 0 deletions docs/docs/core/08-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ There are a few events that are automatically emitted for all messages, directly
* `message.sender`: The address of the message signer.
* `message.module`: The name of the module that emitted the message.

:::tip
`baseapp` emits exactly one `message` event for each message before any other events emitted by the message.
The `message` event contains at least 2 attributes, exactly one `action` and exactly one `sender`.
The position of the event may change in the next major version.
:::

:::tip
The module name is assumed by `baseapp` to be the second element of the message route: `"cosmos.bank.v1beta1.MsgSend" -> "bank"`.
In case a module does not follow the standard message path, (e.g. IBC), it is advised to keep emitting the module name event.
Expand Down

0 comments on commit 8ae897c

Please sign in to comment.