Skip to content

Commit

Permalink
Add an optional proposal deposit to cw3-flex-multisig.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xekez authored and uint committed Nov 1, 2022
1 parent 44c06c9 commit 1558f79
Show file tree
Hide file tree
Showing 16 changed files with 1,401 additions and 614 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions contracts/cw3-fixed-multisig/src/contract.rs
Expand Up @@ -9,15 +9,15 @@ use cosmwasm_std::{

use cw2::set_contract_version;
use cw3::{
ProposalListResponse, ProposalResponse, Status, Vote, VoteInfo, VoteListResponse, VoteResponse,
VoterDetail, VoterListResponse, VoterResponse,
Ballot, Proposal, ProposalListResponse, ProposalResponse, Status, Vote, VoteInfo,
VoteListResponse, VoteResponse, VoterDetail, VoterListResponse, VoterResponse, Votes,
};
use cw_storage_plus::Bound;
use cw_utils::{Expiration, ThresholdResponse};

use crate::error::ContractError;
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::state::{next_id, Ballot, Config, Proposal, Votes, BALLOTS, CONFIG, PROPOSALS, VOTERS};
use crate::state::{next_id, Config, BALLOTS, CONFIG, PROPOSALS, VOTERS};

// version info for migration info
const CONTRACT_NAME: &str = "crates.io:cw3-fixed-multisig";
Expand Down Expand Up @@ -112,6 +112,8 @@ pub fn execute_propose(
votes: Votes::yes(vote_power),
threshold: cfg.threshold,
total_weight: cfg.total_weight,
proposer: info.sender.clone(),
deposit: None,
};
prop.update_status(&env.block);
let id = next_id(deps.storage)?;
Expand Down Expand Up @@ -276,6 +278,8 @@ fn query_proposal(deps: Deps, env: Env, id: u64) -> StdResult<ProposalResponse>
msgs: prop.msgs,
status,
expires: prop.expires,
deposit: prop.deposit,
proposer: prop.proposer,
threshold,
})
}
Expand Down Expand Up @@ -331,6 +335,8 @@ fn map_proposal(
description: prop.description,
msgs: prop.msgs,
status,
deposit: prop.deposit,
proposer: prop.proposer,
expires: prop.expires,
threshold,
}
Expand Down

0 comments on commit 1558f79

Please sign in to comment.