From 85654cf0d5cf2d1b4c5f37d8b4e99608ee1e28a0 Mon Sep 17 00:00:00 2001 From: ismellike Date: Tue, 10 Sep 2024 05:37:43 -0500 Subject: [PATCH] Added cw_orch fn_name for proposal executes follows the same naming as `dao_proposal_sudo` execute --- Cargo.toml | 2 +- .../proposal/dao-proposal-condorcet/src/msg.rs | 18 ++++++++++++++---- .../proposal/dao-proposal-multiple/src/msg.rs | 1 + .../proposal/dao-proposal-single/src/msg.rs | 1 + 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7f629b199..759112fd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } \ No newline at end of file +dao-voting-v241 = { package = "dao-voting", version = "=2.4.1" } diff --git a/contracts/proposal/dao-proposal-condorcet/src/msg.rs b/contracts/proposal/dao-proposal-condorcet/src/msg.rs index 684108444..078f85711 100644 --- a/contracts/proposal/dao-proposal-condorcet/src/msg.rs +++ b/contracts/proposal/dao-proposal-condorcet/src/msg.rs @@ -15,10 +15,20 @@ pub struct Choice { #[cw_serde] #[derive(cw_orch::ExecuteFns)] pub enum ExecuteMsg { - Propose { choices: Vec }, - Vote { proposal_id: u32, vote: Vec }, - Execute { proposal_id: u32 }, - Close { proposal_id: u32 }, + Propose { + choices: Vec, + }, + Vote { + proposal_id: u32, + vote: Vec, + }, + #[cw_orch(fn_name("proposal_execute"))] + Execute { + proposal_id: u32, + }, + Close { + proposal_id: u32, + }, SetConfig(UncheckedConfig), } diff --git a/contracts/proposal/dao-proposal-multiple/src/msg.rs b/contracts/proposal/dao-proposal-multiple/src/msg.rs index 071e8d802..6fcdfb80a 100644 --- a/contracts/proposal/dao-proposal-multiple/src/msg.rs +++ b/contracts/proposal/dao-proposal-multiple/src/msg.rs @@ -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, diff --git a/contracts/proposal/dao-proposal-single/src/msg.rs b/contracts/proposal/dao-proposal-single/src/msg.rs index 82e75f22f..dd500f1eb 100644 --- a/contracts/proposal/dao-proposal-single/src/msg.rs +++ b/contracts/proposal/dao-proposal-single/src/msg.rs @@ -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,