Label: complexity: high
Points: 200
Description
Other Soroban contracts cannot programmatically create StellarSplit invoices without knowing internal storage details. This issue adds a standardised IInvoiceFactory trait interface with create_invoice_for() — allowing any authorised external contract to create invoices on behalf of users.
Technical Context
Involves lib.rs — new create_invoice_for(env, caller: Address, creator: Address, recipients, amounts, token, deadline) -> u64. Requires caller.require_auth(). Store authorised_factories: Vec<Address> in persistent storage. Assert caller is in the list. Then execute standard create_invoice() logic with creator.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Other Soroban contracts cannot programmatically create StellarSplit invoices without knowing internal storage details. This issue adds a standardised
IInvoiceFactorytrait interface withcreate_invoice_for()— allowing any authorised external contract to create invoices on behalf of users.Technical Context
Involves
lib.rs— newcreate_invoice_for(env, caller: Address, creator: Address, recipients, amounts, token, deadline) -> u64. Requirescaller.require_auth(). Storeauthorised_factories: Vec<Address>in persistent storage. Assertcalleris in the list. Then execute standardcreate_invoice()logic withcreator.Acceptance Criteria
authorise_factory(env, address)requires admin authcreate_invoice_for()requires caller auth and caller must be authorised factory"not authorised factory"creator(not the factory address)cargo clippypasses with zero warnings