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

(cherry picked from commit 8ae897c)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
ryu1-sakai authored and zemyblue committed Oct 17, 2023
1 parent 4f45da3 commit 36c1a15
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 @@ -59,3 +59,4 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Document Updates
* (docs) [\#1059](https://github.com/Finschia/finschia-sdk/pull/1059) create ERRORS.md for x/module
* (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 36c1a15

Please sign in to comment.