Description:
The NFT module in contracts/invoice_liquidity/src/nft.rs emits three events that represent the lifecycle of invoice NFTs. These events are not documented in docs/events.md:
-
invoice_nft_minted — Emitted when an NFT is created for a new invoice. Contains invoice_id, owner, amount, due_date.
-
invoice_nft_transferred — Emitted when an NFT is transferred between addresses (e.g., freelancer to LP when invoice is funded). Contains invoice_id, from, to.
-
invoice_nft_burned — Emitted when an NFT is destroyed (e.g., when invoice is marked as paid). Contains invoice_id, owner.
These events are emitted using env.events().publish_event() at lines 101-107, 152-157, and 195-199 of nft.rs. Note: the current implementation uses the deprecated publish_event method — see Issue #26 for the migration.
Why it matters: NFT events enable indexers to track invoice ownership changes and build NFT marketplace features. Without documentation, developers cannot subscribe to or parse these events.
Acceptance Criteria:
Relevant Files: docs/events.md, contracts/invoice_liquidity/src/nft.rs:100-200
Description:
The NFT module in
contracts/invoice_liquidity/src/nft.rsemits three events that represent the lifecycle of invoice NFTs. These events are not documented indocs/events.md:invoice_nft_minted— Emitted when an NFT is created for a new invoice. Contains invoice_id, owner, amount, due_date.invoice_nft_transferred— Emitted when an NFT is transferred between addresses (e.g., freelancer to LP when invoice is funded). Contains invoice_id, from, to.invoice_nft_burned— Emitted when an NFT is destroyed (e.g., when invoice is marked as paid). Contains invoice_id, owner.These events are emitted using
env.events().publish_event()at lines 101-107, 152-157, and 195-199 ofnft.rs. Note: the current implementation uses the deprecatedpublish_eventmethod — see Issue #26 for the migration.Why it matters: NFT events enable indexers to track invoice ownership changes and build NFT marketplace features. Without documentation, developers cannot subscribe to or parse these events.
Acceptance Criteria:
publish_eventand link to Issue Design and implementReputationScorestruct and storage #26Relevant Files:
docs/events.md,contracts/invoice_liquidity/src/nft.rs:100-200