Skip to content

Commit

Permalink
Simplify deployment slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
protinam committed Dec 12, 2017
1 parent 7174ecf commit 7ab8c13
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions contracts/TestDAO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ contract TestDAO is DelegatedShareholderAssociation {
uint public constant TOKEN_DECIMALS = 18;
uint public constant REQUIRED_SHARES_TO_BE_BOARD_MEMBER = 2000 * (10 ** 18); // set to ~ 0.1% of supply

function TestDAO (ERC20 sharesAddress, uint minimumSharesToPassAVote, uint minutesForDebate) public {
function TestDAO (ERC20 sharesAddress) public {
sharesTokenAddress = sharesAddress;
requiredSharesToBeBoardMember = REQUIRED_SHARES_TO_BE_BOARD_MEMBER;
minimumQuorum = minimumSharesToPassAVote;
debatingPeriodInMinutes = minutesForDebate;
minimumQuorum = 1000 * (10 ** TOKEN_DECIMALS);
debatingPeriodInMinutes = 0;
}

}
10 changes: 6 additions & 4 deletions contracts/WyvernDAO.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ contract WyvernDAO is DelegatedShareholderAssociation {
string public constant name = "Project Wyvern DAO";

uint public constant TOKEN_DECIMALS = 18;
uint public constant REQUIRED_SHARES_TO_BE_BOARD_MEMBER = 2000 * (10 ** 18); // set to ~ 0.1% of supply
uint public constant REQUIRED_SHARES_TO_BE_BOARD_MEMBER = 2000 * (10 ** TOKEN_DECIMALS); // set to ~ 0.1% of supply
uint public constant MINIMUM_QUORUM = 2000000 * (10 ** TOKEN_DECIMALS); // set to 10% of supply
uint public constant DEBATE_PERIOD_MINUTES = 60 * 24 * 3; // set to 3 days initially

function WyvernDAO (ERC20 sharesAddress, uint minimumSharesToPassAVote, uint minutesForDebate) public {
function WyvernDAO (ERC20 sharesAddress) public {
sharesTokenAddress = sharesAddress;
requiredSharesToBeBoardMember = REQUIRED_SHARES_TO_BE_BOARD_MEMBER;
minimumQuorum = minimumSharesToPassAVote;
debatingPeriodInMinutes = minutesForDebate;
minimumQuorum = MINIMUM_QUORUM;
debatingPeriodInMinutes = DEBATE_PERIOD_MINUTES;
}

}
2 changes: 1 addition & 1 deletion migrations/2_deploy_test_token_and_dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (deployer, network) => {
if (network === 'development' || network === 'kovan') {
deployer.deploy(TestToken)
.then(() => {
return deployer.deploy(TestDAO, TestToken.address, Math.pow(10, 18) * 1000, 0)
return deployer.deploy(TestDAO, TestToken.address)
})
}
}
2 changes: 1 addition & 1 deletion migrations/3_deploy_token_and_dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = (deployer, network) => {
deployer.link(MerkleProof, WyvernToken)
deployer.deploy(WyvernToken, utxoMerkleRoot, utxoAmount)
.then(() => {
return deployer.deploy(WyvernDAO, WyvernToken.address, Math.pow(10, 18) * 1000000, 60 * 24 * 7)
return deployer.deploy(WyvernDAO, WyvernToken.address)
})
deployer.then(() => {
WyvernToken.deployed()
Expand Down

0 comments on commit 7ab8c13

Please sign in to comment.