> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function aztec

Module: `noir_aztec::macros`

```rust
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:

```rust
#[aztec]
contract MyContract { ... }
```

Advanced contracts can use [`AztecConfig`](/aztec-nr-api/v6.0.0/noir_aztec/macros/struct.AztecConfig.md) to customize parts of its behavior, such as message processing.

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