-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
ContractSmart contract workSmart contract workHighHigh complexityHigh complexitySorobanSoroban-specific workSoroban-specific workStellar WaveStellar Wave initiativeStellar Wave initiative
Description
Objective
Implement Treasury Allocation Contract
Where to Implement
- Primary contract:
contracts/treasury-allocation/src/lib.rs - Cargo manifest:
contracts/treasury-allocation/Cargo.toml - Contract docs:
contracts/treasury-allocation/README.md - Shared types/helpers (if needed):
contracts/shared/src/lib.rs - Tests:
contracts/treasury-allocation/src/lib.rs(#[cfg(test)]) orcontracts/treasury-allocation/tests/
Responsibilities
- Implement deterministic Soroban contract logic for the specified domain.
- Define storage model, events, and method-level authorization guards.
- Enforce safe state transitions and invariant checks.
- Keep interfaces composable with existing contracts and backend services.
Required Public Interface / Deliverables
init(admin, treasury_contract)\n-create_budget(bucket_id, limit, period)\n-request_allocation(bucket_id, amount, reason)\n-approve_allocation(request_id)\n-budget_state(bucket_id)
Security and Validation
- Enforce role-based auth on privileged methods.
- Validate all input bounds and identifier uniqueness constraints.
- Prevent replay/duplicate processing where applicable.
- Use safe arithmetic and explicit error handling.
Testing Requirements
- Unit tests for happy-path behavior.
- Failure-path tests for unauthorized calls and invalid states.
- Event emission validation for key transitions.
- Integration tests for dependent contract interactions when applicable.
Acceptance Criteria
- Contract compiles and tests pass with
cargo test. - README documents methods, events, storage, and invariants.
- Integration assumptions and dependency contracts are documented.
Flow / Dependencies
Depends on treasury contract and governance/access controls for approvals.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ContractSmart contract workSmart contract workHighHigh complexityHigh complexitySorobanSoroban-specific workSoroban-specific workStellar WaveStellar Wave initiativeStellar Wave initiative