Skip to content

Add a create_recurring_payment_proposal entrypoint mirroring create_proposal (proposer auth, frozen check, description/deadline/category validation, active cap, quorum snapshot) #438

Description

@thegreatfeez

Smart Contract — New Feature

Summary

Owners need an entrypoint to propose a recurring schedule. This adds a create_recurring_payment_proposal function mirroring the existing create_proposal with the same validation gates.

Background

The existing create_proposal entrypoint in contracts/accord/src/lib.rs authorizes the proposer, checks the frozen state, validates description/deadline/category, enforces the active-proposal cap, and snapshots the quorum. A new entrypoint for recurring-payment proposals must do the same but with the schedule-specific parameters.

What Needs to Be Done

  1. Add a create_recurring_payment_proposal entrypoint that accepts the schedule parameters alongside the standard proposal fields (description, deadline, category).
  2. Apply the same gates as create_proposal: proposer authorization, not-frozen check, description/deadline/category validation, active-proposal cap, and quorum snapshot.
  3. Create a Proposal with the CreateRecurringPayment kind and return it.

Acceptance Criteria

  • The entrypoint accepts schedule parameters and creates a proposal.
  • It enforces the same pre-creation checks as create_proposal.
  • The created proposal carries the CreateRecurringPayment kind.
  • The contract compiles.

Files to Look At

  • contracts/accord/src/lib.rs — add the entrypoint near create_proposal

Difficulty: Hard

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions