Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Performance History

Latest Results

Add support for events and indexed fields. This adds two new attributes: `#[event]` and `#[indexed]`. The `#[event]` attribute marks a struct or enum as an event that can be emitted by a contract. The `#[indexed]` attribute can be applied to fields within structs that are attributed with `#[event]`. This is particularly useful for event structs, allowing for efficient filtering and searching of emitted events based on the values of these fields. When using this attribute, the indexed fields must be applied sequentially to the initial set of fields in a struct. This attribute can only be applied to fields whose type is an exact size ABI type. The exact size ABI types include: - `bool` - `u8`, `u16`, `u32`, `u64`, `u256` - `numeric` - `b256` - `str[N]` - Tuples containing only exact size types - Structs containing only exact size types - Arrays of exact size types with a literal length - Type aliases to exact size types Additionally it causes the event types to be included in the JSON ABI representation for the contract. ```sway struct MyEventStruct { #[indexed] id: u64, sender: Identity, } enum MyEventEnum { A: (), B: (), } ``` Additionally this updates the JSON ABI to emit an `offset` for indexed fields.
tritao:indexed-events
8 hours ago
clippy and fmt issues
xunilrj/const-generics-cei
2 days ago
allow CEI analysis with const generics
xunilrj/const-generics-cei
2 days ago
Merge branch 'master' into improve-trait-coherence-checks
tritao:improve-trait-coherence-checks
2 days ago

Active Branches

Add event support via `#[event]` and `#[indexed]` attributes
last run
8 hours ago
#7158
CodSpeed Performance Gauge
0%
#7385
CodSpeed Performance Gauge
0%
last run
2 days ago
#7391
CodSpeed Performance Gauge
0%
© 2025 CodSpeed Technology
Home Terms Privacy Docs