Skip to content

Commit

Permalink
add info query to pre-propose-base
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-1857 committed Jul 20, 2024
1 parent 93a65f7 commit 8105e01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/dao-pre-propose-base/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ where
match msg {
QueryMsg::ProposalModule {} => to_binary(&self.proposal_module.load(deps.storage)?),
QueryMsg::Dao {} => to_binary(&self.dao.load(deps.storage)?),
QueryMsg::Info {} => to_binary(&dao_interface::proposal::InfoResponse {
info: secret_cw2::get_contract_version(deps.storage)?,
}),
QueryMsg::Config {} => to_binary(&self.config.load(deps.storage)?),
QueryMsg::DepositInfo { proposal_id } => {
let (deposit_info, proposer) =
Expand Down
6 changes: 5 additions & 1 deletion packages/dao-pre-propose-base/src/msg.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use cosmwasm_schema::{schemars::JsonSchema, QueryResponses};
use cw_denom::UncheckedDenom;
use dao_interface::proposal::InfoResponse;

Check warning on line 3 in packages/dao-pre-propose-base/src/msg.rs

View workflow job for this annotation

GitHub Actions / Test Suite

unused import: `dao_interface::proposal::InfoResponse`
use dao_voting::{
deposit::{CheckedDepositInfo, UncheckedDepositInfo},
status::Status,
Expand Down Expand Up @@ -50,7 +51,7 @@ pub enum ExecuteMsg<ProposalMessage, ExecuteExt> {
/// will have insufficent balance to return them. In the case of
/// `cw-proposal-single` this transaction failure will cause the
/// module to remove the pre-propose module from its proposal hook
/// receivers.
/// receivers.
///
/// More likely than not, this should NEVER BE CALLED unless a bug
/// in this contract or the proposal module it is associated with
Expand Down Expand Up @@ -109,6 +110,9 @@ where
/// with. Returns `Addr`.
#[returns(dao_interface::state::AnyContractInfo)]
Dao {},
/// Returns contract version info.
#[returns(InfoResponse)]
Info {},
/// Gets the module's configuration.
#[returns(crate::state::Config)]
Config {},
Expand Down

0 comments on commit 8105e01

Please sign in to comment.