diff --git a/README.md b/README.md index d13b071..6fdd6ba 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,11 @@ If you are interested in contributing to Go Stark Me, please follow these steps: 2. Comment on the issue you want to participate in, detailing how you plan to address it and how long you expect it to take. 3. Wait to be assigned to the issue. +Official Discord Channel: +- [Web3Wagers](https://discord.gg/sEpnC6JB2U) + You can also contact us on Telegram: - [@adrian_vrj](https://t.me/adrian_vrj) - [@EmmanuelDevCr](https://t.me/EmmanuelDevCr) + diff --git a/contracts/src/constants/funds.cairo b/contracts/src/constants/funds.cairo index 3c57400..a0adbf1 100644 --- a/contracts/src/constants/funds.cairo +++ b/contracts/src/constants/funds.cairo @@ -1 +1,2 @@ pub mod state_constants; +pub mod fund_constants; diff --git a/contracts/src/constants/funds/fund_constants.cairo b/contracts/src/constants/funds/fund_constants.cairo new file mode 100644 index 0000000..eb993f3 --- /dev/null +++ b/contracts/src/constants/funds/fund_constants.cairo @@ -0,0 +1,8 @@ +// ************************************************************************* +// FUND CONSTANTS +// ************************************************************************* +pub mod FundConstants { + pub const UP_VOTES_NEED_IT: u32 = 1; + pub const INITIAL_UP_VOTES: u32 = 0; + pub const INITIAL_GOAL: u64 = 0; +} diff --git a/contracts/src/fund.cairo b/contracts/src/fund.cairo index c87c90e..42fa7a2 100644 --- a/contracts/src/fund.cairo +++ b/contracts/src/fund.cairo @@ -27,6 +27,8 @@ mod Fund { use starknet::ContractAddress; use starknet::get_caller_address; use gostarkme::constants::{funds::{state_constants::FundStates},}; + use gostarkme::constants::{funds::{fund_constants::FundConstants},}; + // ************************************************************************* // STORAGE @@ -60,9 +62,9 @@ mod Fund { self.owner.write(owner); self.name.write(name); self.reason.write(reason); - self.up_votes.write(0); + self.up_votes.write(FundConstants::INITIAL_UP_VOTES); self.goal.write(goal); - self.current_goal_state.write(0); + self.current_goal_state.write(FundConstants::INITIAL_GOAL); self.state.write(FundStates::RECOLLECTING_VOTES); } @@ -100,8 +102,7 @@ mod Fund { ); self.up_votes.write(self.up_votes.read() + 1); self.voters.write(get_caller_address(), self.up_votes.read()); - // TODO: Validate this - if self.up_votes.read() >= 1 { + if self.up_votes.read() >= FundConstants::UP_VOTES_NEED_IT { self.state.write(FundStates::RECOLLECTING_DONATIONS); } }