Skip to content

Commit

Permalink
Merge pull request #30 from VitaDAO/correctDeployValues
Browse files Browse the repository at this point in the history
Corrected deployment parameters to match agreed values.
  • Loading branch information
audieleon authored Jul 7, 2021
2 parents 4bd8927 + 1de1ab2 commit 2adacae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions contracts/Raphael.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ contract Raphael is ERC721Holder, Ownable, ReentrancyGuard {

bool private shutdown = false;

uint256 public CREATE_TO_VOTE_PROPOSAL_DELAY = 18500; // ~3 days
uint256 public VOTING_DURATION = 30850; // ~5 days
uint256 public CREATE_TO_VOTE_PROPOSAL_DELAY = 13091; // ~2 days
uint256 public VOTING_DURATION = 91636; // ~14 days

// comment out for testing
// uint256 public constant MIN_DURATION = 18500;
// remove testing value for production
uint256 public constant MIN_DURATION = 5; // testing value
uint256 public constant MAX_DURATION = 190000; // ~1 month
uint256 public constant MIN_DURATION = 5; // ~ 1 minute
uint256 public constant MAX_DURATION = 200000; // ~1 month

event VotingDelayChanged(uint256 newDuration);
event VotingDurationChanged(uint256 newDuration);
Expand Down Expand Up @@ -101,7 +98,7 @@ contract Raphael is ERC721Holder, Ownable, ReentrancyGuard {

constructor() Ownable() {
proposalCount = 0; //starts with 0 proposals
minVotesNeeded = 9644832 * 1e17; // 5% of initial distribution
minVotesNeeded = 965390 * 1e18; // 5% of initial distribution
}

function getDidVote(uint256 proposalIndex) public view returns (bool) {
Expand Down
6 changes: 3 additions & 3 deletions test/Raphael/raphael.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PROPOSAL_STATUS = {
QUORUM_FAILED: 5,
}

const MIN_QUORUM = ethers.utils.parseUnits("964483.2");
const MIN_QUORUM = ethers.utils.parseUnits("965390");

describe("Raphael DAO contract", () => {
let accounts: Signer[];
Expand Down Expand Up @@ -1277,12 +1277,12 @@ describe("Raphael DAO contract", () => {
});

it("delay to voting cannot be more than maximum duration length", async () => {
await expect(raphael.connect(admin).setVotingDelayDuration(BigNumber.from("190001")))
await expect(raphael.connect(admin).setVotingDelayDuration(BigNumber.from("200001")))
.to.be.revertedWith("duration must be >5 <190000");
});

it("voting duration cannot be more than maximum duration length", async () => {
await expect(raphael.connect(admin).setVotingDuration(BigNumber.from("190001")))
await expect(raphael.connect(admin).setVotingDuration(BigNumber.from("200001")))
.to.be.revertedWith("duration must be >5 <190000");
});
});
Expand Down

0 comments on commit 2adacae

Please sign in to comment.