Description
Some businesses may want to offer invoices exclusively to trusted LPs (e.g. their own treasury, a specific VC). An optional LP whitelist on invoices enables private invoice markets within the public protocol.
Requirements and context
submit_invoice() accepts optional allowed_lps: Option<Vec<Address>>
- If set,
fund_invoice() rejects callers not in the whitelist with Error::LPNotWhitelisted
- Store whitelist on invoice struct (cap at 10 addresses to limit storage)
- Emit whitelist in
InvoiceSubmitted event
- Write tests: public invoice (no whitelist), private invoice (whitelist), non-whitelisted LP rejected
Suggested execution
git checkout -b feat/lp-whitelist
- Add optional whitelist to invoice struct
- Add check in
fund_invoice()
- Write tests
Example commit message
feat: add optional LP whitelist for private invoice markets
Description
Some businesses may want to offer invoices exclusively to trusted LPs (e.g. their own treasury, a specific VC). An optional LP whitelist on invoices enables private invoice markets within the public protocol.
Requirements and context
submit_invoice()accepts optionalallowed_lps: Option<Vec<Address>>fund_invoice()rejects callers not in the whitelist withError::LPNotWhitelistedInvoiceSubmittedeventSuggested execution
fund_invoice()Example commit message
feat: add optional LP whitelist for private invoice markets