Overview
PaymentIndexRecorderHook indexes payments by payer and receiver and stores the fullPaymentInfo struct keyed by paymentInfoHash. Wire it into AUTHORIZE_POST_ACTION_HOOK on a HookCombinator (or directly when authorize is the only hook slot you use) so each new authorization registers itself for on-chain lookups.
When to use
- You need on-chain payment lookups without a subgraph
- Other contracts need to read the full
PaymentInfofor a hash, or page through every payment by payer / receiver - You want a single chain-singleton index that aggregates across every operator routing through
HookCombinator
State
Methods
amount, caller, and data are unused; they exist to satisfy IHook.run.
Querying
Gas
Cost: ~175k gas per authorization (payer index + receiver index + fullPaymentInfo SSTORE).
Next Steps
HookCombinator
Combine with other hooks in a single slot.
Hooks Overview
Compare recording strategies.
