Description:
The docs/events.md file documents all events emitted by the ILN contracts, which off-chain indexers and frontends rely on to track protocol state changes. However, the insurance_pool contract emits three events that are completely undocumented:
-
enrolled(lp) — Emitted when an LP enrolls in the insurance program (either via explicit enroll() call or automatically on first deposit_premium()). Topic: (symbol!("enrolled"), lp). Data: ().
-
premium(lp, amount) — Emitted when an LP deposits a premium payment. The amount is the premium paid in stroops. Topic: (symbol!("premium"), lp). Data: amount: i128.
-
claimed(invoice_id, payout) — Emitted when a claim is processed for a defaulted invoice. The payout is the compensation amount credited to the LP. Topic: (symbol!("claimed"), invoice_id). Data: payout: i128.
These events are defined in contracts/insurance_pool/src/lib.rs:131-211 and are critical for the indexer service to track insurance pool activity.
Why it matters: Without documented events, the indexer service cannot correctly parse insurance pool events, and frontend developers cannot build features that display insurance enrollment, premium payments, or claim history.
Acceptance Criteria:
Relevant Files: docs/events.md, contracts/insurance_pool/src/lib.rs:131-211
Description:
The
docs/events.mdfile documents all events emitted by the ILN contracts, which off-chain indexers and frontends rely on to track protocol state changes. However, theinsurance_poolcontract emits three events that are completely undocumented:enrolled(lp)— Emitted when an LP enrolls in the insurance program (either via explicitenroll()call or automatically on firstdeposit_premium()). Topic:(symbol!("enrolled"), lp). Data:().premium(lp, amount)— Emitted when an LP deposits a premium payment. Theamountis the premium paid in stroops. Topic:(symbol!("premium"), lp). Data:amount: i128.claimed(invoice_id, payout)— Emitted when a claim is processed for a defaulted invoice. Thepayoutis the compensation amount credited to the LP. Topic:(symbol!("claimed"), invoice_id). Data:payout: i128.These events are defined in
contracts/insurance_pool/src/lib.rs:131-211and are critical for the indexer service to track insurance pool activity.Why it matters: Without documented events, the indexer service cannot correctly parse insurance pool events, and frontend developers cannot build features that display insurance enrollment, premium payments, or claim history.
Acceptance Criteria:
docs/events.mdRelevant Files:
docs/events.md,contracts/insurance_pool/src/lib.rs:131-211