Smart Contract — New Feature
Summary
The number of active recurring schedules must be capped to control storage costs. This adds an ACTIVE_RECUR instance counter and a MAX_ACTIVE_RECURRING constant, mirroring the existing active-proposal cap.
Background
The contract caps active proposals at MAX_ACTIVE_PROPOSALS via a persisted ACTCNT counter, checked at creation and execute time in contracts/accord/src/lib.rs. Recurring schedules need the same guard: an active-schedule counter and a maximum constant, bounded to prevent unbounded storage growth.
What Needs to Be Done
- Define a
MAX_ACTIVE_RECURRING constant beside the existing MAX_ACTIVE_PROPOSALS.
- Add an
ACTIVE_RECUR instance storage key and read_active_recurring_count/write_active_recurring_count helpers mirroring the active-proposal helpers.
- The counter should count both Active and Paused schedules.
Acceptance Criteria
Files to Look At
contracts/accord/src/lib.rs — add the constant and helpers near the active-proposal equivalents
Difficulty: Medium
Smart Contract — New Feature
Summary
The number of active recurring schedules must be capped to control storage costs. This adds an
ACTIVE_RECURinstance counter and aMAX_ACTIVE_RECURRINGconstant, mirroring the existing active-proposal cap.Background
The contract caps active proposals at
MAX_ACTIVE_PROPOSALSvia a persistedACTCNTcounter, checked at creation and execute time incontracts/accord/src/lib.rs. Recurring schedules need the same guard: an active-schedule counter and a maximum constant, bounded to prevent unbounded storage growth.What Needs to Be Done
MAX_ACTIVE_RECURRINGconstant beside the existingMAX_ACTIVE_PROPOSALS.ACTIVE_RECURinstance storage key andread_active_recurring_count/write_active_recurring_counthelpers mirroring the active-proposal helpers.Acceptance Criteria
MAX_ACTIVE_RECURRINGconstant.Files to Look At
contracts/accord/src/lib.rs— add the constant and helpers near the active-proposal equivalentsDifficulty: Medium