Expand description
Procedural macros for the TruthLinked SDK.
This crate provides derive macros and attribute macros for smart contract development:
#[derive(Event)]- Generates event emission code#[derive(BytesCodec)]- Generates variable-length encoding/decoding#[derive(Codec32)]- Generates 32-byte encoding/decoding#[derive(Manifest)]- Generates storage access manifests#[error_code]- Defines error code constants#[require]- Assertion macro with custom error codes
Attribute Macros§
- error_
code - Attribute macro for defining error code enums.
- require
- Attribute macro for adding precondition checks to functions.
Derive Macros§
- Bytes
Codec - Derives the
BytesCodectrait for variable-length encoding. - Codec32
- Derives the
Codec32trait for 32-byte fixed-size encoding. - Event
- Derives the
Eventtrait for structured logging. - Manifest
- Derives the
Manifesttrait for storage access declarations.