Skip to content

Commit

Permalink
Updating conventions as used in fee-mechanism.adoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
stoobie committed May 2, 2024
1 parent 35bad58 commit a8d9a8f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[id="events"]
= Events
:stem: latexmath

A contract may emit events throughout its execution. Each event contains the following fields:

Expand All @@ -27,7 +26,7 @@ Transfer(12345, 12345, 1)
----


The emit function emits an event with a single key, which is an identifier of the event, given by stem:[$\text{sn_keccak(event_name)}$], where stem:[$\text{event_name}$] is the ASCII encoding of the event's name and stem:[$\text{sn_keccak}$] is defined xref:../Cryptography/hash-functions.adoc#starknet_keccak[here].
The emit function emits an event with a single key, which is an identifier of the event, given by stem:[$\text{sn_keccak}(event_name)$], where stem:[$\text{event_name}$] is the ASCII encoding of the event's name and stem:[$\text{sn_keccak}$] is defined xref:../Cryptography/hash-functions.adoc#starknet_keccak[here].

To emit custom keys, one should use the low level `emit_event` system call:

Expand Down

0 comments on commit a8d9a8f

Please sign in to comment.