Skip to content

Commit

Permalink
Clean up code comments (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt authored Apr 22, 2024
1 parent c70866e commit be9fc4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
3 changes: 0 additions & 3 deletions contracts/atom_wars/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// MAIN TODOS:
// - Query methods! We want a very complete set so that it is easy for third party tribute contracts
// - Tests!
// - Add real covenant logic
// - Make it work for separate tranches
// - Question: How to handle the case where a proposal is executed but the covenant fails?
// - Covenant Question: How to deal with someone using MEV to skew the pool ratio right before the liquidity is pulled? Streaming the liquidity pull? You'd have to set up a cron job for that.
// - Covenant Question: Can people sandwich this whole thing - covenant system has price limits - but we should allow people to retry executing the prop during the round
Expand Down
26 changes: 4 additions & 22 deletions contracts/atom_wars/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ pub const LOCK_ID: Item<u64> = Item::new("lock_id");

pub const PROP_ID: Item<u64> = Item::new("prop_id");

// LOCKS_MAP: key(sender_address, lock_id) -> LockEntry {
// funds: Coin,
// lock_start: Timestamp,
// lock_end: Timestamp
// }
// LOCKS_MAP: key(sender_address, lock_id) -> LockEntry
pub const LOCKS_MAP: Map<(Addr, u64), LockEntry> = Map::new("locks_map");
#[cw_serde]
pub struct LockEntry {
Expand All @@ -29,14 +25,7 @@ pub struct LockEntry {
pub lock_end: Timestamp,
}

// PROP_MAP: key(round_id, tranche_id, prop_id) -> Proposal {
// round_id: u64,
// tranche_id: u64,
// proposal_id: u64,
// covenant_params: String,
// executed: bool,
// power: Uint128
// }
// PROPOSAL_MAP: key(round_id, tranche_id, prop_id) -> Proposal
pub const PROPOSAL_MAP: Map<(u64, u64, u64), Proposal> = Map::new("prop_map");
#[cw_serde]
pub struct Proposal {
Expand All @@ -61,11 +50,7 @@ pub struct CovenantParams {
pub funding_destination_name: String,
}

// VOTE_MAP: key(round_id, tranche_id, sender_addr) -> Vote {
// prop_id: u64,
// power: Uint128,
// tribute_claimed: bool
// }
// VOTE_MAP: key(round_id, tranche_id, sender_addr) -> Vote
pub const VOTE_MAP: Map<(u64, u64, Addr), Vote> = Map::new("vote_map");
#[cw_serde]
pub struct Vote {
Expand All @@ -79,10 +64,7 @@ pub const PROPS_BY_SCORE: Map<((u64, u64), u128, u64), u64> = Map::new("props_by
// TOTAL_POWER_VOTING: key(round_id, tranche_id) -> Uint128
pub const TOTAL_POWER_VOTING: Map<(u64, u64), Uint128> = Map::new("total_power_voting");

// TRANCHE_MAP: key(tranche_id) -> Tranche {
// tranche_id: u64,
// metadata: String
// }
// TRANCHE_MAP: key(tranche_id) -> Tranche
pub const TRANCHE_MAP: Map<u64, Tranche> = Map::new("tranche_map");
#[cw_serde]
pub struct Tranche {
Expand Down

0 comments on commit be9fc4b

Please sign in to comment.