@gooddollar/goodcontracts
Version:
GoodDollar Contracts
1,247 lines (1,246 loc) • 134 kB
JSON
{
"contractName": "IntVoteInterface",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "_organization",
"type": "address"
}
],
"name": "CancelProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "_organization",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_voter",
"type": "address"
}
],
"name": "CancelVoting",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "_organization",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_decision",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_totalReputation",
"type": "uint256"
}
],
"name": "ExecuteProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "_organization",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_numOfChoices",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "_proposer",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "_paramsHash",
"type": "bytes32"
}
],
"name": "NewProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "_organization",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "_voter",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_vote",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_reputation",
"type": "uint256"
}
],
"name": "VoteProposal",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_numOfChoices",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "_proposalParameters",
"type": "bytes32"
},
{
"internalType": "address",
"name": "_proposer",
"type": "address"
},
{
"internalType": "address",
"name": "_organization",
"type": "address"
}
],
"name": "propose",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_vote",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_rep",
"type": "uint256"
},
{
"internalType": "address",
"name": "_voter",
"type": "address"
}
],
"name": "vote",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "cancelVote",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "getNumberOfChoices",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "isVotable",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes32",
"name": "_proposalId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_choice",
"type": "uint256"
}
],
"name": "voteStatus",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isAbstainAllow",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getAllowedRangeOfChoices",
"outputs": [
{
"internalType": "uint256",
"name": "min",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "max",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"}],\"name\":\"CancelProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"CancelVoting\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_decision\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalReputation\",\"type\":\"uint256\"}],\"name\":\"ExecuteProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_numOfChoices\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_paramsHash\",\"type\":\"bytes32\"}],\"name\":\"NewProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_vote\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_reputation\",\"type\":\"uint256\"}],\"name\":\"VoteProposal\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"cancelVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAllowedRangeOfChoices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"getNumberOfChoices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isAbstainAllow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"isVotable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_numOfChoices\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_proposalParameters\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_organization\",\"type\":\"address\"}],\"name\":\"propose\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_vote\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rep\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_voter\",\"type\":\"address\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"voteStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"getAllowedRangeOfChoices()\":{\"details\":\"getAllowedRangeOfChoices returns the allowed range of choices for a voting machine.\",\"return\":\"min - minimum number of choices max - maximum number of choices\"},\"isAbstainAllow()\":{\"details\":\"isAbstainAllow returns if the voting machine allow abstain (0)\",\"return\":\"bool true or false\"},\"propose(uint256,bytes32,address,address)\":{\"details\":\"register a new proposal with the given parameters. Every proposal has a unique ID which is being generated by calculating keccak256 of a incremented counter.\",\"params\":{\"_numOfChoices\":\"number of voting choices\",\"_organization\":\"address - if this address is zero the msg.sender will be used as the organization address.\",\"_proposalParameters\":\"defines the parameters of the voting machine used for this proposal\",\"_proposer\":\"address\"},\"return\":\"proposal's id.\"},\"voteStatus(bytes32,uint256)\":{\"details\":\"voteStatus returns the reputation voted for a proposal for a specific voting choice.\",\"params\":{\"_choice\":\"the index in the\",\"_proposalId\":\"the ID of the proposal\"},\"return\":\"voted reputation for the given choice\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@daostack/infra/contracts/votingMachines/IntVoteInterface.sol\":\"IntVoteInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@daostack/infra/contracts/votingMachines/IntVoteInterface.sol\":{\"keccak256\":\"0x877991da94b1fe9c2accf69367b32fff474c4e4f7897e9cf5a61fa5d1378908f\",\"urls\":[\"bzz-raw://4ea2c35248b82ea74884313752870789de61b0bcbc14425e97192b1ef1450e5a\",\"dweb:/ipfs/QmZ9RxpmG6SsMLJm1hT9ZmVy3CVPNZyRihQxZFDk8u3w1G\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.5.4;\n\ninterface IntVoteInterface {\n //When implementing this interface please do not only override function and modifier,\n //but also to keep the modifiers on the overridden functions.\n modifier onlyProposalOwner(bytes32 _proposalId) {revert(); _;}\n modifier votable(bytes32 _proposalId) {revert(); _;}\n\n event NewProposal(\n bytes32 indexed _proposalId,\n address indexed _organization,\n uint256 _numOfChoices,\n address _proposer,\n bytes32 _paramsHash\n );\n\n event ExecuteProposal(bytes32 indexed _proposalId,\n address indexed _organization,\n uint256 _decision,\n uint256 _totalReputation\n );\n\n event VoteProposal(\n bytes32 indexed _proposalId,\n address indexed _organization,\n address indexed _voter,\n uint256 _vote,\n uint256 _reputation\n );\n\n event CancelProposal(bytes32 indexed _proposalId, address indexed _organization );\n event CancelVoting(bytes32 indexed _proposalId, address indexed _organization, address indexed _voter);\n\n /**\n * @dev register a new proposal with the given parameters. Every proposal has a unique ID which is being\n * generated by calculating keccak256 of a incremented counter.\n * @param _numOfChoices number of voting choices\n * @param _proposalParameters defines the parameters of the voting machine used for this proposal\n * @param _proposer address\n * @param _organization address - if this address is zero the msg.sender will be used as the organization address.\n * @return proposal's id.\n */\n function propose(\n uint256 _numOfChoices,\n bytes32 _proposalParameters,\n address _proposer,\n address _organization\n ) external returns(bytes32);\n\n function vote(\n bytes32 _proposalId,\n uint256 _vote,\n uint256 _rep,\n address _voter\n )\n external\n returns(bool);\n\n function cancelVote(bytes32 _proposalId) external;\n\n function getNumberOfChoices(bytes32 _proposalId) external view returns(uint256);\n\n function isVotable(bytes32 _proposalId) external view returns(bool);\n\n /**\n * @dev voteStatus returns the reputation voted for a proposal for a specific voting choice.\n * @param _proposalId the ID of the proposal\n * @param _choice the index in the\n * @return voted reputation for the given choice\n */\n function voteStatus(bytes32 _proposalId, uint256 _choice) external view returns(uint256);\n\n /**\n * @dev isAbstainAllow returns if the voting machine allow abstain (0)\n * @return bool true or false\n */\n function isAbstainAllow() external pure returns(bool);\n\n /**\n * @dev getAllowedRangeOfChoices returns the allowed range of choices for a voting machine.\n * @return min - minimum number of choices\n max - maximum number of choices\n */\n function getAllowedRangeOfChoices() external pure returns(uint256 min, uint256 max);\n}\n",
"sourcePath": "@daostack/infra/contracts/votingMachines/IntVoteInterface.sol",
"ast": {
"absolutePath": "@daostack/infra/contracts/votingMachines/IntVoteInterface.sol",
"exportedSymbols": {
"IntVoteInterface": [
20571
]
},
"id": 20572,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 20438,
"literals": [
"solidity",
"^",
"0.5",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:67"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 20571,
"linearizedBaseContracts": [
20571
],
"name": "IntVoteInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 20446,
"nodeType": "Block",
"src": "262:14:67",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 20442,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
22176,
22177
],
"referencedDeclaration": 22176,
"src": "263:6:67",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 20443,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "263:8:67",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20444,
"nodeType": "ExpressionStatement",
"src": "263:8:67"
},
{
"id": 20445,
"nodeType": "PlaceholderStatement",
"src": "273:1:67"
}
]
},
"documentation": null,
"id": 20447,
"name": "onlyProposalOwner",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 20441,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20440,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20447,
"src": "241:19:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20439,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "241:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "240:21:67"
},
"src": "214:62:67",
"visibility": "internal"
},
{
"body": {
"id": 20455,
"nodeType": "Block",
"src": "319:14:67",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 20451,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
22176,
22177
],
"referencedDeclaration": 22176,
"src": "320:6:67",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 20452,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "320:8:67",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 20453,
"nodeType": "ExpressionStatement",
"src": "320:8:67"
},
{
"id": 20454,
"nodeType": "PlaceholderStatement",
"src": "330:1:67"
}
]
},
"documentation": null,
"id": 20456,
"name": "votable",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 20450,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20449,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20456,
"src": "298:19:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20448,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "298:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "297:21:67"
},
"src": "281:52:67",
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 20468,
"name": "NewProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 20467,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20458,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20468,
"src": "366:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20457,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "366:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20460,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 20468,
"src": "403:29:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20459,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "403:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20462,
"indexed": false,
"name": "_numOfChoices",
"nodeType": "VariableDeclaration",
"scope": 20468,
"src": "442:21:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20461,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "442:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20464,
"indexed": false,
"name": "_proposer",
"nodeType": "VariableDeclaration",
"scope": 20468,
"src": "473:17:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20463,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "473:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20466,
"indexed": false,
"name": "_paramsHash",
"nodeType": "VariableDeclaration",
"scope": 20468,
"src": "500:19:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20465,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "500:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "356:169:67"
},
"src": "339:187:67"
},
{
"anonymous": false,
"documentation": null,
"id": 20478,
"name": "ExecuteProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 20477,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20470,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20478,
"src": "554:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20469,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "554:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20472,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 20478,
"src": "591:29:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20471,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "591:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20474,
"indexed": false,
"name": "_decision",
"nodeType": "VariableDeclaration",
"scope": 20478,
"src": "630:17:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20473,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "630:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20476,
"indexed": false,
"name": "_totalReputation",
"nodeType": "VariableDeclaration",
"scope": 20478,
"src": "657:24:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20475,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "657:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "553:134:67"
},
"src": "532:156:67"
},
{
"anonymous": false,
"documentation": null,
"id": 20490,
"name": "VoteProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 20489,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20480,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20490,
"src": "722:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20479,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "722:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20482,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 20490,
"src": "759:29:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20481,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "759:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20484,
"indexed": true,
"name": "_voter",
"nodeType": "VariableDeclaration",
"scope": 20490,
"src": "798:22:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20483,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "798:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20486,
"indexed": false,
"name": "_vote",
"nodeType": "VariableDeclaration",
"scope": 20490,
"src": "830:13:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20485,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "830:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20488,
"indexed": false,
"name": "_reputation",
"nodeType": "VariableDeclaration",
"scope": 20490,
"src": "853:19:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20487,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "853:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "712:166:67"
},
"src": "694:185:67"
},
{
"anonymous": false,
"documentation": null,
"id": 20496,
"name": "CancelProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 20495,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20492,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20496,
"src": "906:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20491,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "906:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20494,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 20496,
"src": "935:29:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20493,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "935:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "905:61:67"
},
"src": "885:82:67"
},
{
"anonymous": false,
"documentation": null,
"id": 20504,
"name": "CancelVoting",
"nodeType": "EventDefinition",
"parameters": {
"id": 20503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20498,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 20504,
"src": "991:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20497,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "991:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20500,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 20504,
"src": "1020:29:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20499,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1020:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20502,
"indexed": true,
"name": "_voter",
"nodeType": "VariableDeclaration",
"scope": 20504,
"src": "1051:22:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20501,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1051:7:67",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "990:84:67"
},
"src": "972:103:67"
},
{
"body": null,
"documentation": "@dev register a new proposal with the given parameters. Every proposal has a unique ID which is being\ngenerated by calculating keccak256 of a incremented counter.\n@param _numOfChoices number of voting choices\n@param _proposalParameters defines the parameters of the voting machine used for this proposal\n@param _proposer address\n@param _organization address - if this address is zero the msg.sender will be used as the organization address.\n@return proposal's id.",
"id": 20517,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "propose",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 20513,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 20506,
"name": "_numOfChoices",
"nodeType": "VariableDeclaration",
"scope": 20517,
"src": "1636:21:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20505,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1636:7:67",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20508,
"name": "_proposalParameters",
"nodeType": "VariableDeclaration",
"scope": 20517,
"src": "1667:27:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 20507,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1667:7:67",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 20510,
"name": "_proposer",
"nodeType": "VariableDeclaration",
"scope": 20517,
"src": "1704:17:67",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 20509,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1704:7:67",
"stateMutability": "nonpayable",