Skip to content

Commit 7705510

Browse files
committed
Chopped off DAO.
1 parent 1aecba6 commit 7705510

18 files changed

+3497
-2053
lines changed

broadcast/Deploy.s.sol/84532/run-1756332951.json

Lines changed: 219 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-1756337803.json

Lines changed: 177 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-1756338454.json

Lines changed: 177 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-1756338597.json

Lines changed: 484 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-latest.json

Lines changed: 484 additions & 0 deletions
Large diffs are not rendered by default.

script/Deploy.s.sol

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,41 @@ import {SmartnodesToken} from "../src/SmartnodesToken.sol";
77
import {SmartnodesCoordinator} from "../src/SmartnodesCoordinator.sol";
88
import {SmartnodesDAO} from "../src/SmartnodesDAO.sol";
99

10+
uint256 constant DAO_VOTING_PERIOD = 7 days;
11+
1012
contract Deploy is Script {
1113
address[] genesis;
1214
address[] initialActiveNodes;
1315

1416
function run() external {
15-
initialActiveNodes.push(msg.sender);
1617
genesis.push(msg.sender);
1718
genesis.push(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266);
1819

1920
vm.startBroadcast();
2021

2122
SmartnodesToken token = new SmartnodesToken(genesis);
23+
SmartnodesDAO dao = new SmartnodesDAO(
24+
address(token),
25+
DAO_VOTING_PERIOD
26+
);
2227
SmartnodesCore core = new SmartnodesCore(address(token));
2328

24-
bytes32 publicKeyHash = vm.envBytes32("PUBLIC_KEY_HASH");
25-
core.createValidator(publicKeyHash);
29+
token.setSmartnodesCore(address(core));
30+
token.setDAO(address(dao));
2631

2732
SmartnodesCoordinator coordinator = new SmartnodesCoordinator(
2833
3600,
2934
66,
3035
address(core),
3136
initialActiveNodes
3237
);
33-
SmartnodesDAO dao = new SmartnodesDAO(address(token), address(core));
3438

35-
token.setSmartnodesCore(address(core));
3639
core.setCoordinator(address(coordinator));
3740

38-
token.transferOwnership(msg.sender);
39-
dao.transferOwnership(msg.sender);
41+
bytes32 publicKeyHash = vm.envBytes32("PUBLIC_KEY_HASH");
42+
43+
core.createValidator(publicKeyHash);
44+
coordinator.addValidator();
4045

4146
console.log("Token:", address(token));
4247
console.log("Core:", address(core));

0 commit comments

Comments
 (0)