Label: complexity: high
Points: 200
Description
Open invoice creation allows any address to create invoices, which may not be appropriate for private platforms. This issue adds admin-controlled whitelist_creator() and remove_creator() functions — when the whitelist is non-empty, create_invoice() rejects any creator not on the list.
Technical Context
Involves lib.rs. Store whitelist as persistent key "creator_wl" holding Vec<Address>. Add whitelist_creator(env, address) and remove_creator(env, address) requiring admin auth. In create_invoice(), if whitelist is non-empty, assert creator is in the list.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Open invoice creation allows any address to create invoices, which may not be appropriate for private platforms. This issue adds admin-controlled
whitelist_creator()andremove_creator()functions — when the whitelist is non-empty,create_invoice()rejects any creator not on the list.Technical Context
Involves
lib.rs. Store whitelist as persistent key"creator_wl"holdingVec<Address>. Addwhitelist_creator(env, address)andremove_creator(env, address)requiring admin auth. Increate_invoice(), if whitelist is non-empty, assertcreatoris in the list.Acceptance Criteria
whitelist_creator()requires admin authcreate_invoice()with non-whitelisted creator panics with"creator not whitelisted"remove_creator()removes address from whitelistcargo clippypasses with zero warnings