tgrade_community_pool/
msg.rs1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::Coin;
5use tg3::Vote;
6
7use tg_voting_contract::state::VotingRules;
8
9#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
10#[serde(rename_all = "snake_case")]
11pub struct InstantiateMsg {
12 pub rules: VotingRules,
13 pub group_addr: String,
15}
16
17#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
19#[serde(rename_all = "snake_case")]
20pub enum Proposal {
21 SendProposal {
23 to_addr: String,
25 amount: Coin,
27 },
28 Text {},
30}
31
32#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
33#[serde(rename_all = "snake_case")]
34pub enum ExecuteMsg {
35 Propose {
36 title: String,
37 description: String,
38 proposal: Proposal,
39 },
40 Vote {
41 proposal_id: u64,
42 vote: Vote,
43 },
44 Execute {
45 proposal_id: u64,
46 },
47 Close {
48 proposal_id: u64,
49 },
50 WithdrawEngagementRewards {},
54 DistributeRewards {},
57}
58
59#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, Debug)]
61#[serde(rename_all = "snake_case")]
62pub enum QueryMsg {
63 Rules {},
65 Proposal { proposal_id: u64 },
67 ListProposals {
69 start_after: Option<u64>,
70 limit: Option<u32>,
71 },
72 ReverseProposals {
74 start_before: Option<u64>,
75 limit: Option<u32>,
76 },
77 Vote { proposal_id: u64, voter: String },
79 ListVotes {
81 proposal_id: u64,
82 start_after: Option<String>,
83 limit: Option<u32>,
84 },
85 ListVotesByVoter {
87 voter: String,
88 start_after: Option<u64>,
89 limit: Option<u32>,
90 },
91 Voter { address: String },
93 ListVoters {
95 start_after: Option<String>,
96 limit: Option<u32>,
97 },
98 GroupContract {},
100 ListTextProposals {
102 start_after: Option<u64>,
103 limit: Option<u32>,
104 },
105}