Smart Contract — New Feature
Summary
To create a recurring schedule through the multisig approval flow, a new proposal kind must carry the full schedule parameters. This adds the ProposalKind::CreateRecurringPayment(...) variant and wires it into the execute dispatch.
Background
The contract's ProposalKind enum in contracts/accord/src/lib.rs currently has transfer, add-owner, remove-owner, change-threshold, and set-spending-limit variants. The execute function dispatches on the kind to perform the corresponding action. A new variant is needed to carry schedule parameters and, when executed, create the persistent schedule.
What Needs to Be Done
- Add a
ProposalKind::CreateRecurringPayment(...) variant that carries the full schedule parameters (recipient, token, amount, interval, start, optional end, optional cliff, optional cap, kind).
- Add a dispatch arm in the
execute function for this variant.
- The execution logic should validate the schedule parameters, allocate a new recurring id, persist the schedule, and increment the active-recurring counter.
Acceptance Criteria
Files to Look At
contracts/accord/src/lib.rs — the ProposalKind enum and the execute function
Difficulty: Hard
Smart Contract — New Feature
Summary
To create a recurring schedule through the multisig approval flow, a new proposal kind must carry the full schedule parameters. This adds the
ProposalKind::CreateRecurringPayment(...)variant and wires it into the execute dispatch.Background
The contract's
ProposalKindenum incontracts/accord/src/lib.rscurrently has transfer, add-owner, remove-owner, change-threshold, and set-spending-limit variants. Theexecutefunction dispatches on the kind to perform the corresponding action. A new variant is needed to carry schedule parameters and, when executed, create the persistent schedule.What Needs to Be Done
ProposalKind::CreateRecurringPayment(...)variant that carries the full schedule parameters (recipient, token, amount, interval, start, optional end, optional cliff, optional cap, kind).executefunction for this variant.Acceptance Criteria
ProposalKindhas aCreateRecurringPaymentvariant with the schedule parameters.executefunction dispatches on it.Files to Look At
contracts/accord/src/lib.rs— theProposalKindenum and theexecutefunctionDifficulty: Hard