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
Label: complexity: high
Points: 200
Description
Deploying a new SplitContract for each project is operationally complex. This issue adds a
SplitFactorycontract that deploys newSplitContractinstances with shared configuration (treasury, fees, whitelist) and maintains a registry of all deployed contract addresses.Technical Context
Involves a new
src/factory.rs. DefineSplitFactorywithdeploy(env, admin, config: FactoryConfig) -> Addressthat callsenv.deployer().upload_contract_wasm()andenv.deployer().deploy_contract(). Store deployed addresses in persistent key"deployments"asVec<Address>. Addget_deployments(env) -> Vec<Address>.Acceptance Criteria
deploy()requires factory admin authSplitContractdeployed with provided configurationget_deployments()returns all deployed contract addressescargo clippypasses with zero warnings