Skip to content

Commit

Permalink
Added cw_orch fn_name for proposal executes
Browse files Browse the repository at this point in the history
follows the same naming as `dao_proposal_sudo` execute
  • Loading branch information
ismellike committed Sep 10, 2024
1 parent 685211d commit 85654cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ dao-pre-propose-single-v241 = { package = "dao-pre-propose-single", version = "=
dao-proposal-multiple-v241 = { package = "dao-proposal-multiple", version = "=2.4.1" }
dao-proposal-single-v241 = { package = "dao-proposal-single", version = "=2.4.1" }
dao-voting-cw4-v241 = { package = "dao-voting-cw4", version = "=2.4.1" }
dao-voting-v241 = { package = "dao-voting", version = "=2.4.1" }
dao-voting-v241 = { package = "dao-voting", version = "=2.4.1" }
18 changes: 14 additions & 4 deletions contracts/proposal/dao-proposal-condorcet/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ pub struct Choice {
#[cw_serde]
#[derive(cw_orch::ExecuteFns)]
pub enum ExecuteMsg {
Propose { choices: Vec<Choice> },
Vote { proposal_id: u32, vote: Vec<u32> },
Execute { proposal_id: u32 },
Close { proposal_id: u32 },
Propose {
choices: Vec<Choice>,
},
Vote {
proposal_id: u32,
vote: Vec<u32>,
},
#[cw_orch(fn_name("proposal_execute"))]
Execute {
proposal_id: u32,
},
Close {
proposal_id: u32,
},
SetConfig(UncheckedConfig),
}

Expand Down
1 change: 1 addition & 0 deletions contracts/proposal/dao-proposal-multiple/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub enum ExecuteMsg {
},
/// Causes the messages associated with a passed proposal to be
/// executed by the DAO.
#[cw_orch(fn_name("proposal_execute"))]
Execute {
/// The ID of the proposal to execute.
proposal_id: u64,
Expand Down
1 change: 1 addition & 0 deletions contracts/proposal/dao-proposal-single/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub enum ExecuteMsg {
},
/// Causes the messages associated with a passed proposal to be
/// executed by the DAO.
#[cw_orch(fn_name("proposal_execute"))]
Execute {
/// The ID of the proposal to execute.
proposal_id: u64,
Expand Down

0 comments on commit 85654cf

Please sign in to comment.