Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 924 Bytes

event.md

File metadata and controls

21 lines (14 loc) · 924 Bytes

event index

Kathmandu Tezos protocol upgrade has introduced contract events, a new way to interact with smart contracts. This index allows indexing events using strictly typed payloads. From the developer's perspective, it's similar to the big_map index with a few differences.

An example below is artificial since no known contracts in mainnet are currently using events.

{{ #include ../../demos/demo-events/dipdup.yml:23:32 }}

Unlike big maps, contracts may introduce new event tags and payloads at any time, so the index must be updated accordingly.

{{ #include ../../demos/demo-events/src/demo_events/handlers/on_move_event.py:7: }}

Each contract can have a fallback handler called for all unknown events so you can process untyped data.

{{ #include ../../demos/demo-events/src/demo_events/handlers/on_other_event.py:6: }}