@gooddollar/goodcontracts
Version:
GoodDollar Contracts
1,436 lines (1,435 loc) • 125 kB
JSON
{
"contractName": "IntVoteInterface",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"name": "_organization",
"type": "address"
},
{
"indexed": false,
"name": "_numOfChoices",
"type": "uint256"
},
{
"indexed": false,
"name": "_proposer",
"type": "address"
},
{
"indexed": false,
"name": "_paramsHash",
"type": "bytes32"
}
],
"name": "NewProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"name": "_organization",
"type": "address"
},
{
"indexed": false,
"name": "_decision",
"type": "uint256"
},
{
"indexed": false,
"name": "_totalReputation",
"type": "uint256"
}
],
"name": "ExecuteProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"name": "_organization",
"type": "address"
},
{
"indexed": true,
"name": "_voter",
"type": "address"
},
{
"indexed": false,
"name": "_vote",
"type": "uint256"
},
{
"indexed": false,
"name": "_reputation",
"type": "uint256"
}
],
"name": "VoteProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"name": "_organization",
"type": "address"
}
],
"name": "CancelProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_proposalId",
"type": "bytes32"
},
{
"indexed": true,
"name": "_organization",
"type": "address"
},
{
"indexed": true,
"name": "_voter",
"type": "address"
}
],
"name": "CancelVoting",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_numOfChoices",
"type": "uint256"
},
{
"name": "_proposalParameters",
"type": "bytes32"
},
{
"name": "_proposer",
"type": "address"
},
{
"name": "_organization",
"type": "address"
}
],
"name": "propose",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
},
{
"name": "_vote",
"type": "uint256"
},
{
"name": "_rep",
"type": "uint256"
},
{
"name": "_voter",
"type": "address"
}
],
"name": "vote",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "cancelVote",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "getNumberOfChoices",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
}
],
"name": "isVotable",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_proposalId",
"type": "bytes32"
},
{
"name": "_choice",
"type": "uint256"
}
],
"name": "voteStatus",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isAbstainAllow",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getAllowedRangeOfChoices",
"outputs": [
{
"name": "min",
"type": "uint256"
},
{
"name": "max",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"metadata": "",
"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": [
15182
]
},
"id": 15183,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 15049,
"literals": [
"solidity",
"^",
"0.5",
".4"
],
"nodeType": "PragmaDirective",
"src": "0:23:58"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 15182,
"linearizedBaseContracts": [
15182
],
"name": "IntVoteInterface",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 15057,
"nodeType": "Block",
"src": "262:14:58",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 15053,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
16787,
16788
],
"referencedDeclaration": 16787,
"src": "263:6:58",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 15054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "263:8:58",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 15055,
"nodeType": "ExpressionStatement",
"src": "263:8:58"
},
{
"id": 15056,
"nodeType": "PlaceholderStatement",
"src": "273:1:58"
}
]
},
"documentation": null,
"id": 15058,
"name": "onlyProposalOwner",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 15052,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15051,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15058,
"src": "241:19:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15050,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "241:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "240:21:58"
},
"src": "214:62:58",
"visibility": "internal"
},
{
"body": {
"id": 15066,
"nodeType": "Block",
"src": "319:14:58",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 15062,
"name": "revert",
"nodeType": "Identifier",
"overloadedDeclarations": [
16787,
16788
],
"referencedDeclaration": 16787,
"src": "320:6:58",
"typeDescriptions": {
"typeIdentifier": "t_function_revert_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 15063,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "320:8:58",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 15064,
"nodeType": "ExpressionStatement",
"src": "320:8:58"
},
{
"id": 15065,
"nodeType": "PlaceholderStatement",
"src": "330:1:58"
}
]
},
"documentation": null,
"id": 15067,
"name": "votable",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 15061,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15060,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15067,
"src": "298:19:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15059,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "298:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "297:21:58"
},
"src": "281:52:58",
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 15079,
"name": "NewProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 15078,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15069,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15079,
"src": "366:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15068,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "366:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15071,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15079,
"src": "403:29:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15070,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "403:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15073,
"indexed": false,
"name": "_numOfChoices",
"nodeType": "VariableDeclaration",
"scope": 15079,
"src": "442:21:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15072,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "442:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15075,
"indexed": false,
"name": "_proposer",
"nodeType": "VariableDeclaration",
"scope": 15079,
"src": "473:17:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15074,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "473:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15077,
"indexed": false,
"name": "_paramsHash",
"nodeType": "VariableDeclaration",
"scope": 15079,
"src": "500:19:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15076,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "500:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "356:169:58"
},
"src": "339:187:58"
},
{
"anonymous": false,
"documentation": null,
"id": 15089,
"name": "ExecuteProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 15088,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15081,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15089,
"src": "554:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15080,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "554:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15083,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15089,
"src": "591:29:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15082,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "591:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15085,
"indexed": false,
"name": "_decision",
"nodeType": "VariableDeclaration",
"scope": 15089,
"src": "630:17:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15084,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "630:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15087,
"indexed": false,
"name": "_totalReputation",
"nodeType": "VariableDeclaration",
"scope": 15089,
"src": "657:24:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15086,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "657:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "553:134:58"
},
"src": "532:156:58"
},
{
"anonymous": false,
"documentation": null,
"id": 15101,
"name": "VoteProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 15100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15091,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15101,
"src": "722:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15090,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "722:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15093,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15101,
"src": "759:29:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15092,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "759:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15095,
"indexed": true,
"name": "_voter",
"nodeType": "VariableDeclaration",
"scope": 15101,
"src": "798:22:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15094,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "798:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15097,
"indexed": false,
"name": "_vote",
"nodeType": "VariableDeclaration",
"scope": 15101,
"src": "830:13:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15096,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "830:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15099,
"indexed": false,
"name": "_reputation",
"nodeType": "VariableDeclaration",
"scope": 15101,
"src": "853:19:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15098,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "853:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "712:166:58"
},
"src": "694:185:58"
},
{
"anonymous": false,
"documentation": null,
"id": 15107,
"name": "CancelProposal",
"nodeType": "EventDefinition",
"parameters": {
"id": 15106,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15103,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15107,
"src": "906:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15102,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "906:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15105,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15107,
"src": "935:29:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15104,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "935:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "905:61:58"
},
"src": "885:82:58"
},
{
"anonymous": false,
"documentation": null,
"id": 15115,
"name": "CancelVoting",
"nodeType": "EventDefinition",
"parameters": {
"id": 15114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15109,
"indexed": true,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15115,
"src": "991:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15108,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "991:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15111,
"indexed": true,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15115,
"src": "1020:29:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15110,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1020:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15113,
"indexed": true,
"name": "_voter",
"nodeType": "VariableDeclaration",
"scope": 15115,
"src": "1051:22:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15112,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1051:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "990:84:58"
},
"src": "972:103:58"
},
{
"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": 15128,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "propose",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15124,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15117,
"name": "_numOfChoices",
"nodeType": "VariableDeclaration",
"scope": 15128,
"src": "1636:21:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15116,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1636:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15119,
"name": "_proposalParameters",
"nodeType": "VariableDeclaration",
"scope": 15128,
"src": "1667:27:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15118,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1667:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15121,
"name": "_proposer",
"nodeType": "VariableDeclaration",
"scope": 15128,
"src": "1704:17:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15120,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1704:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15123,
"name": "_organization",
"nodeType": "VariableDeclaration",
"scope": 15128,
"src": "1731:21:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15122,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1731:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1626:136:58"
},
"returnParameters": {
"id": 15127,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15126,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 15128,
"src": "1780:7:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15125,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1780:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1779:9:58"
},
"scope": 15182,
"src": "1610:179:58",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 15141,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "vote",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 15137,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15130,
"name": "_proposalId",
"nodeType": "VariableDeclaration",
"scope": 15141,
"src": "1818:19:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 15129,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1818:7:58",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15132,
"name": "_vote",
"nodeType": "VariableDeclaration",
"scope": 15141,
"src": "1847:13:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15131,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1847:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15134,
"name": "_rep",
"nodeType": "VariableDeclaration",
"scope": 15141,
"src": "1870:12:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 15133,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1870:7:58",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 15136,
"name": "_voter",
"nodeType": "VariableDeclaration",
"scope": 15141,
"src": "1892:14:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15135,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1892:7:58",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1808:104:58"
},
"returnParameters": {
"id": 15140,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 15139,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 15141,
"src": "1938:4:58",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 15138,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1938:4:58",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],