aztec-nr - noir_aztec::macros

Function aztec

pub comptime fn aztec(m: Module, args: [AztecConfig]) -> Quoted

Enables aztec-nr features on a contract.

All aztec-nr contracts should have this macro invoked on them, as it is the one that processes all contract functions, notes, storage, generates interfaces for external calls, and creates the message processing boilerplate.

Examples

Most contracts can simply invoke the macro with no parameters, resulting in default aztec-nr behavior:

#[aztec]
contract MyContract { ... }

Advanced contracts can use AztecConfig to customize parts of its behavior, such as message processing.

#[aztec(aztec::macros::AztecConfig::new().custom_message_handler(my_handler))]
contract MyAdvancedContract { ... }