#proposal #dao #approval #contract #automatic #module #approver

dao-pre-propose-approver

A DAO DAO pre-propose module for automatically making approval proposals for dao-pre-propose-approval-single

7 stable releases

2.6.0 Nov 8, 2024
2.5.0 Oct 31, 2024
2.4.2 Jul 22, 2024
2.3.0 Oct 18, 2023
2.2.0 Jul 9, 2023

#928 in Magic Beans

Download history 80/week @ 2024-07-27 29/week @ 2024-09-21 14/week @ 2024-09-28 126/week @ 2024-10-26 127/week @ 2024-11-02 29/week @ 2024-11-09

282 downloads per month

BSD-3-Clause

275KB
6.5K SLoC

Proposal Approver Contract

dao-pre-propose-approver on crates.io docs.rs

This contract works in conjuction with cwd-pre-propose-approval-single and allows for automatically creating approval proposals when a proposal is submitted for approval.

Approver Logic

On instantiation, this contract registers a hook with the approval contract to automatically create proposals in the approver DAO.

When this contract recieves a proposal as hook from cwd-pre-propose-approval-single, it makes an approval propose in the approval DAO. If approved, the approval proposal calls the approve message on this contract when executed. If the proposal is rejected and closed it fires off reject call.

┌──────────┐         Approver DAO Registers Prop Submission Hook
│          │       ┌──────────────────────────────────────────────┐
│  Account │       │                                              │
│          │       │                                              │
└─────┬────┘       │    Prop Submission Hook creates              │
      │            │    new prop in Approver DAO                  │
      │ Makes prop │   ┌───────────────────────────┐              │
      ▼            ▼   │                           ▼              │
┌──────────────────────┴─┐             ┌────────────────────────┐ │
│                        │             │                        │ │
│  Pre-propose Approval  │             │  Pre-propose Approver  │ │
│                        │◄──┐         │                        │ │
└───────────┬────────────┘   │         └───────────┬────────────┘ │
            │                │                     │              │
            │ Creates prop   │                     │ Creates      │
            │ on approval    │                     │ prop         │
            ▼                │                     ▼              │
┌────────────────────────┐   │         ┌────────────────────────┐ │
│                        │   │         │                        │ │
│     Proposal Single    │   │         │     Proposal Single    │ │
│                        │   │         │                        │ │
└───────────┬────────────┘   │         └───────────┬────────────┘ │
            │                │ Approver            │              │
            │ Normal voting  │ Approves            │ Voting       │
            │                │ or                  │              │
            ▼                │ Rejects             ▼              │
┌────────────────────────┐   │         ┌────────────────────────┐ │
│                        │   │         │                        │ │
│       Main DAO         │   └─────────┤     Approver DAO       ├─┘
│                        │             │                        │
└────────────────────────┘             └────────────────────────┘

Deposits

This contract does not handle deposits. It works in conjunction with the cwd-pre-propose-approval-single contract, which handles the proposal deposits.

Resources

More about the pre-propose design.

More about pre-propose modules.

Dependencies

~11MB
~231K SLoC