nuthatch data model SpendShield (0x0E9578a05BEc3D8BB21f0f4F8C00FF54eB3D7B2D) on Aevum testnet (chain 44005), from block 3581556: every owner policy change (SessionGranted/Revoked, MerchantSet, FrozenSet), deposit and withdrawal, agent payment (AgentPaid) and owner approval request (ApprovalRequested/RequestSettled). Amounts are tUSD8 with 6 decimals: divide by 1e6. Views: payments_by_day, policy_changes, approval_requests. Over-limit direct payments revert on chain and emit nothing, so they are not in the logs. COVERAGE sealed_through = 3837644 (rows at or below this block are sealed Parquet); tip = 3837708 - the `sql` tool reads both the sealed rows and the live tip above them. first_indexed = 3581556 - no block before it is in this nest. TABLES (one per contract event; query via the `sql` tool) spend_shield__agent_paid - `AgentPaid(address,address,address,bytes32,uint256,uint256)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per AgentPaid(address,address,address,bytes32,uint256,uint256) event columns: owner (address), agent (address), merchant (address), ref (bytes32), amount (uint256), spentInPeriod (uint256) ⚠ big-int columns (exact text; SUM/AVG of `_dec` is the values that fit, and WHERE NOT _overflow is that same sum): amount → amount_dec, spentInPeriod → spentInPeriod_dec ⚠ wide columns (>128-bit) whose `_dec` is NULL above 38 digits. A sum of `_dec` is the values that fit; WHERE NOT _overflow is that same sum. Ids, nonces and hashes stay on the raw column: amount, spentInPeriod spend_shield__approval_requested - `ApprovalRequested(uint256,address,address,address,uint256,bytes32)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per ApprovalRequested(uint256,address,address,address,uint256,bytes32) event columns: id (uint256), owner (address), agent (address), merchant (address), amount (uint256), ref (bytes32) ⚠ big-int columns (exact text; SUM/AVG of `_dec` is the values that fit, and WHERE NOT _overflow is that same sum): id → id_dec, amount → amount_dec ⚠ wide columns (>128-bit) whose `_dec` is NULL above 38 digits. A sum of `_dec` is the values that fit; WHERE NOT _overflow is that same sum. Ids, nonces and hashes stay on the raw column: id, amount spend_shield__deposited - `Deposited(address,address,uint256)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per Deposited(address,address,uint256) event columns: owner (address), from (address), amount (uint256) ⚠ reserved-word columns - double-quote them: "from" ⚠ big-int columns (exact text; SUM/AVG of `_dec` is the values that fit, and WHERE NOT _overflow is that same sum): amount → amount_dec ⚠ wide columns (>128-bit) whose `_dec` is NULL above 38 digits. A sum of `_dec` is the values that fit; WHERE NOT _overflow is that same sum. Ids, nonces and hashes stay on the raw column: amount spend_shield__e_i_p712_domain_changed - `EIP712DomainChanged()` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per EIP712DomainChanged() event columns: spend_shield__frozen_set - `FrozenSet(address,bool)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per FrozenSet(address,bool) event columns: owner (address), frozen (bool) spend_shield__merchant_set - `MerchantSet(address,address,address,bool)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per MerchantSet(address,address,address,bool) event columns: owner (address), agent (address), merchant (address), allowed (bool) spend_shield__request_settled - `RequestSettled(uint256,address,bool)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per RequestSettled(uint256,address,bool) event columns: id (uint256), owner (address), approved (bool) ⚠ big-int columns (exact text; SUM/AVG of `_dec` is the values that fit, and WHERE NOT _overflow is that same sum): id → id_dec ⚠ wide columns (>128-bit) whose `_dec` is NULL above 38 digits. A sum of `_dec` is the values that fit; WHERE NOT _overflow is that same sum. Ids, nonces and hashes stay on the raw column: id spend_shield__session_granted - `SessionGranted(address,address,uint32,(uint128,uint128,uint32,uint64,bool))` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per SessionGranted(address,address,uint32,(uint128,uint128,uint32,uint64,bool)) event columns: owner (address), agent (address), epoch (uint32), policy (tuple) spend_shield__session_revoked - `SessionRevoked(address,address,uint32)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per SessionRevoked(address,address,uint32) event columns: owner (address), agent (address), epoch (uint32) spend_shield__withdrawn - `Withdrawn(address,address,uint256)` events emitted by the `spend_shield` contract. (seeded from the ABI - edit semantic.toml to improve this) grain: one row per Withdrawn(address,address,uint256) event columns: owner (address), to (address), amount (uint256) ⚠ reserved-word columns - double-quote them: "to" ⚠ big-int columns (exact text; SUM/AVG of `_dec` is the values that fit, and WHERE NOT _overflow is that same sum): amount → amount_dec ⚠ wide columns (>128-bit) whose `_dec` is NULL above 38 digits. A sum of `_dec` is the values that fit; WHERE NOT _overflow is that same sum. Ids, nonces and hashes stay on the raw column: amount FACTORIES (RFC-0009; only in a nest with templates/factories) Children of a template share tables (`pool__swap`, …), distinguished by the `address` column. Each template has a `{template}__children` view: which children were discovered, when, by which parent.