Skip to content

Build invoice contract factory #178

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

Deploying a new SplitContract for each project is operationally complex. This issue adds a SplitFactory contract that deploys new SplitContract instances with shared configuration (treasury, fees, whitelist) and maintains a registry of all deployed contract addresses.

Technical Context

Involves a new src/factory.rs. Define SplitFactory with deploy(env, admin, config: FactoryConfig) -> Address that calls env.deployer().upload_contract_wasm() and env.deployer().deploy_contract(). Store deployed addresses in persistent key "deployments" as Vec<Address>. Add get_deployments(env) -> Vec<Address>.

Acceptance Criteria

  • deploy() requires factory admin auth
  • New SplitContract deployed with provided configuration
  • Deployed contract address stored in registry
  • get_deployments() returns all deployed contract addresses
  • Test deploys 2 contracts via factory and verifies both in registry
  • All existing cargo tests pass
  • cargo clippy passes with zero warnings

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 pts

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions