Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event limits section #390

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/build/smart-contract/basic-concepts/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ In Massa's smart contracts, events provide a way to emit runtime messages that c
In Massa, events are not stored in the blockchain ledger, meaning they are ephemeral. Therefore, events should not be used as a source of persistent data. Instead, they are suitable for temporary tasks such as monitoring, logging, or providing real-time feedback.
For use cases that require persistent data, storage should be used.

## Limits

In order to prevent high RAM usage and flooding, some limits are applied regarding to events:
* Maximum number of events in a smart contract: 25
* Message maximum size (in bytes): 512

## Emitting a custom event
To emit a custom event in a smart contract, you can use the generateEvent function (assuming this utility is available in your environment):

Expand Down
Loading