Skip to content

Commit

Permalink
Final cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicca42 committed Oct 10, 2021
1 parent e6ecc3b commit b638d95
Show file tree
Hide file tree
Showing 127 changed files with 74,319 additions and 61,399 deletions.
Binary file added .DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
skipFiles: [
'openZeppelin/Token.sol',
'openZeppelin/IERC20.sol',
'Factory.sol',
'test/Testable.sol',
'test/Timer.sol',
'test/TestExecutable.sol',
'interfaces/IBooth.sol',
'interfaces/ICoord.sol',
'interfaces/ICore.sol',
'interfaces/IExe.sol',
'interfaces/IProp.sol',
'interfaces/IWeight.sol',
'votingTypes/IVoteType.sol',
]
};
67 changes: 67 additions & 0 deletions Factory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

// import "./test/Timer.sol";
// import "./openZeppelin/Token.sol";
import "./Core.sol";
import "./Coordinator.sol";
import "./Executables.sol";
import "./Proposals.sol";
import "./VotingBooth.sol";
import "./VoteWeight.sol";
import "./votingTypes/SimpleMajority.sol";

contract Factory {

struct Dao {
address core;
address coord;
address exe;
address prop;
address booth;
address weight;
address simpleMaj;
}

Dao public dao;

function deployBasicDao(address _timer) external {
// address timer = address(new Timer());
// dao.govToken = address(new Token("Gov", "GOV"));
// dao.repToken = address(new Token("Rep", "REP"));
dao.core = address(new Core());
dao.coord = address(new Coordinator(dao.core, _timer));
dao.exe = address(new Executables(dao.core, _timer));
dao.prop = address(new Proposals(dao.core, _timer));
dao.booth = address(new VotingBooth(dao.core, _timer));
dao.weight = address(new VoteWeight(dao.core, _timer));
dao.simpleMaj = address(new SimpleMajority(dao.core, _timer));
}

function initDao(address _gov, address _rep) external {
Core(dao.core).initialise(
dao.coord,
dao.exe,
dao.prop,
dao.weight,
dao.booth
);

VotingBooth(dao.booth).initialise(
dao.simpleMaj,
keccak256("VOTE_TYPE_SIMPLE_MAJORITY"),
"bool"
);

VoteWeight(dao.weight).initialise(
_gov,
_rep
);

Proposals(dao.prop).initialise(
15,
86400,
604800
);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/BaseSystem.sol/BaseSystem.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
39 changes: 0 additions & 39 deletions artifacts/contracts/BaseSystem.sol/BaseSystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0x00e2a1ba",
"type": "bytes32"
}
],
"name": "c_0x00e2a1ba",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0x0da7e8db",
"type": "bytes32"
}
],
"name": "c_0x0da7e8db",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0x35ade16d",
"type": "bytes32"
}
],
"name": "c_0x35ade16d",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "core_",
Expand Down
2 changes: 1 addition & 1 deletion artifacts/contracts/Coordinator.sol/Coordinator.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
56 changes: 2 additions & 54 deletions artifacts/contracts/Coordinator.sol/Coordinator.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/Core.sol/Core.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
30 changes: 2 additions & 28 deletions artifacts/contracts/Core.sol/Core.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/CoreLib.sol/CoreLib.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
17 changes: 2 additions & 15 deletions artifacts/contracts/CoreLib.sol/CoreLib.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,10 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0xeabc4e57",
"type": "bytes32"
}
],
"name": "c_0xeabc4e57",
"outputs": [],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x6102ff610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c80639a39718b116100655780639a39718b146100e6578063a20b69c114610104578063d082009d14610120578063e9b679581461013e57610087565b80630bd8922d1461008c578063296425b5146100aa5780636b6c0774146100c8575b600080fd5b61009461015c565b6040516100a19190610288565b60405180910390f35b6100b2610180565b6040516100bf9190610288565b60405180910390f35b6100d06101a4565b6040516100dd9190610288565b60405180910390f35b6100ee6101c8565b6040516100fb9190610288565b60405180910390f35b61011e6004803603810190610119919061024c565b6101ec565b005b6101286101ef565b6040516101359190610288565b60405180910390f35b610146610213565b6040516101539190610288565b60405180910390f35b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b7fcdd7ba10b36b7349d5c9710e5e447ec8acaa8e3cbba8d20f4393eccf61f185b181565b7f907208bc2088fa777f18b43edd8b766e7243504cf8497f7ed936c65c7a446bbc81565b7f346b2ab3a980432fd8f2e24828fc9f9ee2df1548701bc542f6ec17882b32762781565b50565b7f36209a57dfd79e3872ec3a0c88c653bbe7e32a12306e5e1f92f118c1936ae8b281565b7f59e2d72f5870ccddd14d35394bd3c22374071b2da7c07a3d6c3b690400b7362881565b600081359050610246816102b2565b92915050565b600060208284031215610262576102616102ad565b5b600061027084828501610237565b91505092915050565b610282816102a3565b82525050565b600060208201905061029d6000830184610279565b92915050565b6000819050919050565b600080fd5b6102bb816102a3565b81146102c657600080fd5b5056fea2646970667358221220961c7be596297341228f4a429a6ffec06f61fb6eb176c0b5ec9d2b03b22c889a64736f6c63430008070033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c80639a39718b116100655780639a39718b146100e6578063a20b69c114610104578063d082009d14610120578063e9b679581461013e57610087565b80630bd8922d1461008c578063296425b5146100aa5780636b6c0774146100c8575b600080fd5b61009461015c565b6040516100a19190610288565b60405180910390f35b6100b2610180565b6040516100bf9190610288565b60405180910390f35b6100d06101a4565b6040516100dd9190610288565b60405180910390f35b6100ee6101c8565b6040516100fb9190610288565b60405180910390f35b61011e6004803603810190610119919061024c565b6101ec565b005b6101286101ef565b6040516101359190610288565b60405180910390f35b610146610213565b6040516101539190610288565b60405180910390f35b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b7fcdd7ba10b36b7349d5c9710e5e447ec8acaa8e3cbba8d20f4393eccf61f185b181565b7f907208bc2088fa777f18b43edd8b766e7243504cf8497f7ed936c65c7a446bbc81565b7f346b2ab3a980432fd8f2e24828fc9f9ee2df1548701bc542f6ec17882b32762781565b50565b7f36209a57dfd79e3872ec3a0c88c653bbe7e32a12306e5e1f92f118c1936ae8b281565b7f59e2d72f5870ccddd14d35394bd3c22374071b2da7c07a3d6c3b690400b7362881565b600081359050610246816102b2565b92915050565b600060208284031215610262576102616102ad565b5b600061027084828501610237565b91505092915050565b610282816102a3565b82525050565b600060208201905061029d6000830184610279565b92915050565b6000819050919050565b600080fd5b6102bb816102a3565b81146102c657600080fd5b5056fea2646970667358221220961c7be596297341228f4a429a6ffec06f61fb6eb176c0b5ec9d2b03b22c889a64736f6c63430008070033",
"bytecode": "0x610267610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c80630bd8922d14610071578063296425b51461008f5780636b6c0774146100ad5780639a39718b146100cb578063d082009d146100e9578063e9b6795814610107575b600080fd5b610079610125565b604051610086919061020c565b60405180910390f35b610097610149565b6040516100a4919061020c565b60405180910390f35b6100b561016d565b6040516100c2919061020c565b60405180910390f35b6100d3610191565b6040516100e0919061020c565b60405180910390f35b6100f16101b5565b6040516100fe919061020c565b60405180910390f35b61010f6101d9565b60405161011c919061020c565b60405180910390f35b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b7fcdd7ba10b36b7349d5c9710e5e447ec8acaa8e3cbba8d20f4393eccf61f185b181565b7f907208bc2088fa777f18b43edd8b766e7243504cf8497f7ed936c65c7a446bbc81565b7f346b2ab3a980432fd8f2e24828fc9f9ee2df1548701bc542f6ec17882b32762781565b7f36209a57dfd79e3872ec3a0c88c653bbe7e32a12306e5e1f92f118c1936ae8b281565b7f59e2d72f5870ccddd14d35394bd3c22374071b2da7c07a3d6c3b690400b7362881565b61020681610227565b82525050565b600060208201905061022160008301846101fd565b92915050565b600081905091905056fea2646970667358221220db1c9af793b17dae82b2e5ad36bbcc47430a9c333cb0487df3a6ae346ef625f364736f6c63430008070033",
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c80630bd8922d14610071578063296425b51461008f5780636b6c0774146100ad5780639a39718b146100cb578063d082009d146100e9578063e9b6795814610107575b600080fd5b610079610125565b604051610086919061020c565b60405180910390f35b610097610149565b6040516100a4919061020c565b60405180910390f35b6100b561016d565b6040516100c2919061020c565b60405180910390f35b6100d3610191565b6040516100e0919061020c565b60405180910390f35b6100f16101b5565b6040516100fe919061020c565b60405180910390f35b61010f6101d9565b60405161011c919061020c565b60405180910390f35b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b7fcdd7ba10b36b7349d5c9710e5e447ec8acaa8e3cbba8d20f4393eccf61f185b181565b7f907208bc2088fa777f18b43edd8b766e7243504cf8497f7ed936c65c7a446bbc81565b7f346b2ab3a980432fd8f2e24828fc9f9ee2df1548701bc542f6ec17882b32762781565b7f36209a57dfd79e3872ec3a0c88c653bbe7e32a12306e5e1f92f118c1936ae8b281565b7f59e2d72f5870ccddd14d35394bd3c22374071b2da7c07a3d6c3b690400b7362881565b61020681610227565b82525050565b600060208201905061022160008301846101fd565b92915050565b600081905091905056fea2646970667358221220db1c9af793b17dae82b2e5ad36bbcc47430a9c333cb0487df3a6ae346ef625f364736f6c63430008070033",
"linkReferences": {},
"deployedLinkReferences": {}
}
2 changes: 1 addition & 1 deletion artifacts/contracts/Executables.sol/Executables.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
56 changes: 2 additions & 54 deletions artifacts/contracts/Executables.sol/Executables.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/Proposals.sol/Proposals.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
56 changes: 2 additions & 54 deletions artifacts/contracts/Proposals.sol/Proposals.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/VoteWeight.sol/VoteWeight.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
56 changes: 2 additions & 54 deletions artifacts/contracts/VoteWeight.sol/VoteWeight.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/VotingBooth.sol/VotingBooth.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
56 changes: 2 additions & 54 deletions artifacts/contracts/VotingBooth.sol/VotingBooth.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artifacts/contracts/interfaces/IBooth.sol/IBooth.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/interfaces/ICoord.sol/ICoord.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/interfaces/ICore.sol/ICore.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/interfaces/IExe.sol/IExe.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
2 changes: 1 addition & 1 deletion artifacts/contracts/interfaces/IProp.sol/IProp.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,7 @@
"_format": "hh-sol-artifact-1",
"contractName": "Initializable",
"sourceName": "contracts/openZeppelin/Initializable.sol",
"abi": [
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0x00e2a1ba",
"type": "bytes32"
}
],
"name": "c_0x00e2a1ba",
"outputs": [],
"stateMutability": "pure",
"type": "function"
}
],
"abi": [],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
Expand Down
2 changes: 1 addition & 1 deletion artifacts/contracts/openZeppelin/Token.sol/Token.dbg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../build-info/1eee706ee39bb2600d5e7983337e2031.json"
"buildInfo": "../../../build-info/b23bf359bf282000089318300ee55fcb.json"
}
Loading

0 comments on commit b638d95

Please sign in to comment.