Skip to content

Commit cb17627

Browse files
committed
Some bug fixes to DAO contract. Removed quadratic voting, added timelock.
1 parent 65db845 commit cb17627

File tree

12 files changed

+660
-396
lines changed

12 files changed

+660
-396
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ docs/
1414

1515
# Dotenv file
1616
.env
17+
18+
.DS_Store

script/Deploy.s.sol

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {SmartnodesCoordinator} from "../src/SmartnodesCoordinator.sol";
88
import {SmartnodesDAO} from "../src/SmartnodesDAO.sol";
99

1010
uint256 constant DAO_VOTING_PERIOD = 7 days;
11+
uint256 constant DEPLOYMENT_MULTIPLIER = 1;
12+
uint256 constant INTERVAL_SECONDS = 1 hours;
1113

1214
contract Deploy is Script {
1315
address[] genesis;
@@ -19,24 +21,27 @@ contract Deploy is Script {
1921

2022
vm.startBroadcast();
2123

22-
SmartnodesToken token = new SmartnodesToken(genesis);
24+
SmartnodesToken token = new SmartnodesToken(
25+
DEPLOYMENT_MULTIPLIER,
26+
genesis
27+
);
2328
SmartnodesDAO dao = new SmartnodesDAO(
2429
address(token),
25-
DAO_VOTING_PERIOD
30+
DAO_VOTING_PERIOD,
31+
1000
2632
);
2733
SmartnodesCore core = new SmartnodesCore(address(token));
28-
29-
token.setDAO(address(dao));
30-
3134
SmartnodesCoordinator coordinator = new SmartnodesCoordinator(
32-
3600,
35+
uint128(INTERVAL_SECONDS * DEPLOYMENT_MULTIPLIER),
3336
66,
3437
address(core),
3538
address(token),
3639
initialActiveNodes
3740
);
3841

3942
token.setSmartnodes(address(core), address(coordinator));
43+
44+
token.setDAO(address(dao));
4045
core.setCoordinator(address(coordinator));
4146

4247
bytes32 publicKeyHash = vm.envBytes32("PUBLIC_KEY_HASH");

0 commit comments

Comments
 (0)