Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions STORAGE_KEY_REGISTRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,28 @@ Run tests with:
```sh
cargo test --lib storage_keys
```

## Usage Analytics Storage (Issue #1034)

Defined privately in `contracts/split/src/analytics.rs` as `symbol_short!` keys. The `an_` prefix is used by no other module.

| Key | Tier | Value | Purpose |
|-----|------|-------|---------|
| `an_on` | instance | `bool` | Recording on/off (absent = on) |
| `an_tot` | instance | `UsageTotals` | Lifetime usage counters |
| `(an_day, u64)` | persistent | `DailyUsage` | Usage for one UTC day (`timestamp / 86_400`) |
| `(an_crt, Address)` | persistent | `bool` | Address has created an invoice (unique-creator count) |
| `(an_pyr, Address)` | persistent | `bool` | Address has paid an invoice (unique-payer count) |

## Monitoring Storage (Issue #1033)

Defined privately in `contracts/split/src/monitoring.rs` as `symbol_short!` keys. The `mon_` prefix is used by no other module.

| Key | Tier | Value | Purpose |
|-----|------|-------|---------|
| `mon_rul` | instance | `Vec<AlertRule>` | Registered alert rules (≤ `MAX_ALERT_RULES` = 20) |
| `mon_rid` | instance | `u32` | Next rule id |
| `mon_aid` | instance | `u64` | Next alert id |
| `mon_st` | instance | `MonitoringStats` | Monitor counters |
| `mon_rcv` | instance | `Address` | Optional alert receiver contract |
| `(mon_al, u64)` | persistent | `Alert` | Alert record; only the newest `MAX_ALERT_HISTORY` (50) are kept |
Loading
Loading