diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f04c76df3..b53439e98d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/docs/docs/core/08-events.md b/docs/docs/core/08-events.md index 36aad72e06..160f4ddae9 100644 --- a/docs/docs/core/08-events.md +++ b/docs/docs/core/08-events.md @@ -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.