cw3_fixed_multisig_secdao/
msg.rs1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::{CosmosMsg, Empty};
5use cw3::Vote;
6use cw_utils::{Duration, Expiration, Threshold};
7
8#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
9pub struct InstantiateMsg {
10 pub voters: Vec<Voter>,
11 pub threshold: Threshold,
12 pub max_voting_period: Duration,
13}
14
15#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
16pub struct Voter {
17 pub addr: String,
18 pub weight: u64,
19}
20
21#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
23#[serde(rename_all = "snake_case")]
24pub enum ExecuteMsg {
25 Propose {
26 title: String,
27 description: String,
28 msgs: Vec<CosmosMsg<Empty>>,
29 latest: Option<Expiration>,
31 },
32 Vote {
33 proposal_id: u64,
34 vote: Vote,
35 },
36 Execute {
37 proposal_id: u64,
38 },
39 Close {
40 proposal_id: u64,
41 },
42}
43
44#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
46#[serde(rename_all = "snake_case")]
47pub enum QueryMsg {
48 Threshold {},
50 Proposal { proposal_id: u64 },
52 ListProposals {
54 start_after: Option<u64>,
55 limit: Option<u32>,
56 },
57 ReverseProposals {
59 start_before: Option<u64>,
60 limit: Option<u32>,
61 },
62 Vote { proposal_id: u64, voter: String },
64 ListVotes {
66 proposal_id: u64,
67 start_after: Option<String>,
68 limit: Option<u32>,
69 },
70 Voter { address: String },
72 ListVoters {
74 start_after: Option<String>,
75 limit: Option<u32>,
76 },
77}