UNPKG

@gooddollar/goodcontracts

Version:
1,264 lines (1,263 loc) 255 kB
{ "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" }, { "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" } ], "stateMutability": "nonpayable", "type": "function" }, { "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" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_proposalId", "type": "bytes32" } ], "name": "cancelVote", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_proposalId", "type": "bytes32" } ], "name": "getNumberOfChoices", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_proposalId", "type": "bytes32" } ], "name": "isVotable", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_proposalId", "type": "bytes32" }, { "internalType": "uint256", "name": "_choice", "type": "uint256" } ], "name": "voteStatus", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isAbstainAllow", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "getAllowedRangeOfChoices", "outputs": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "stateMutability": "pure", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"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\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"cancelVote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowedRangeOfChoices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"getNumberOfChoices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isAbstainAllow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"}],\"name\":\"isVotable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"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\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_proposalId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_choice\",\"type\":\"uint256\"}],\"name\":\"voteStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getAllowedRangeOfChoices()\":{\"details\":\"getAllowedRangeOfChoices returns the allowed range of choices for a voting machine.\",\"returns\":{\"min\":\"- minimum number of choices max - maximum number of choices\"}},\"isAbstainAllow()\":{\"details\":\"isAbstainAllow returns if the voting machine allow abstain (0)\",\"returns\":{\"_0\":\"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\"},\"returns\":{\"_0\":\"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\"},\"returns\":{\"_0\":\"voted reputation for the given choice\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/DAOStackInterfaces.sol\":\"IntVoteInterface\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/DAOStackInterfaces.sol\":{\"keccak256\":\"0xec80b6f0ad18a184cc23b1e172a0d6bf1f1bb5404b086fef56d5beafc46aad04\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ccc376680a6b45520d6158996e9c0e634c05cb374de1c6a27796afa3356bdb2\",\"dweb:/ipfs/QmZEUGR5HjF4Me6U9oXsEBeJ5PTvXe1HNNiVjVZbmhYf29\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "sourceMap": "", "deployedSourceMap": "", "source": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6;\n\ninterface Avatar {\n\tfunction nativeToken() external returns (address);\n\n\tfunction owner() external returns (address);\n}\n\ninterface Controller {\n\tfunction genericCall(\n\t\taddress _contract,\n\t\tbytes calldata _data,\n\t\tAvatar _avatar,\n\t\tuint256 _value\n\t) external returns (bool, bytes memory);\n\n\tfunction avatar() external view returns (Avatar);\n\n\tfunction unregisterScheme(address _scheme, address _avatar)\n\t\texternal\n\t\treturns (bool);\n\n\tfunction isSchemeRegistered(address _scheme, address _avatar)\n\t\texternal\n\t\tview\n\t\treturns (bool);\n}\n\ninterface ReputationInterface {\n\tfunction balanceOf(address _user) external view returns (uint256);\n\n\tfunction balanceOfAt(address _user, uint256 _blockNumber)\n\t\texternal\n\t\tview\n\t\treturns (uint256);\n\n\tfunction getVotes(address _user) external view returns (uint256);\n\n\tfunction getVotesAt(\n\t\taddress _user,\n\t\tbool _global,\n\t\tuint256 _blockNumber\n\t) external view returns (uint256);\n\n\tfunction totalSupply() external view returns (uint256);\n\n\tfunction totalSupplyAt(uint256 _blockNumber)\n\t\texternal\n\t\tview\n\t\treturns (uint256);\n\n\tfunction delegateOf(address _user) external returns (address);\n}\n\ninterface SchemeRegistrar {\n\tfunction proposeScheme(\n\t\tAvatar _avatar,\n\t\taddress _scheme,\n\t\tbytes32 _parametersHash,\n\t\tbytes4 _permissions,\n\t\tstring memory _descriptionHash\n\t) external returns (bytes32);\n\n\tevent NewSchemeProposal(\n\t\taddress indexed _avatar,\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _intVoteInterface,\n\t\taddress _scheme,\n\t\tbytes32 _parametersHash,\n\t\tbytes4 _permissions,\n\t\tstring _descriptionHash\n\t);\n}\n\ninterface IntVoteInterface {\n\tevent NewProposal(\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _organization,\n\t\tuint256 _numOfChoices,\n\t\taddress _proposer,\n\t\tbytes32 _paramsHash\n\t);\n\n\tevent ExecuteProposal(\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _organization,\n\t\tuint256 _decision,\n\t\tuint256 _totalReputation\n\t);\n\n\tevent VoteProposal(\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _organization,\n\t\taddress indexed _voter,\n\t\tuint256 _vote,\n\t\tuint256 _reputation\n\t);\n\n\tevent CancelProposal(\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _organization\n\t);\n\tevent CancelVoting(\n\t\tbytes32 indexed _proposalId,\n\t\taddress indexed _organization,\n\t\taddress indexed _voter\n\t);\n\n\t/**\n\t * @dev register a new proposal with the given parameters. Every proposal has a unique ID which is being\n\t * generated by calculating keccak256 of a incremented counter.\n\t * @param _numOfChoices number of voting choices\n\t * @param _proposalParameters defines the parameters of the voting machine used for this proposal\n\t * @param _proposer address\n\t * @param _organization address - if this address is zero the msg.sender will be used as the organization address.\n\t * @return proposal's id.\n\t */\n\tfunction propose(\n\t\tuint256 _numOfChoices,\n\t\tbytes32 _proposalParameters,\n\t\taddress _proposer,\n\t\taddress _organization\n\t) external returns (bytes32);\n\n\tfunction vote(\n\t\tbytes32 _proposalId,\n\t\tuint256 _vote,\n\t\tuint256 _rep,\n\t\taddress _voter\n\t) external returns (bool);\n\n\tfunction cancelVote(bytes32 _proposalId) external;\n\n\tfunction getNumberOfChoices(bytes32 _proposalId)\n\t\texternal\n\t\tview\n\t\treturns (uint256);\n\n\tfunction isVotable(bytes32 _proposalId) external view returns (bool);\n\n\t/**\n\t * @dev voteStatus returns the reputation voted for a proposal for a specific voting choice.\n\t * @param _proposalId the ID of the proposal\n\t * @param _choice the index in the\n\t * @return voted reputation for the given choice\n\t */\n\tfunction voteStatus(bytes32 _proposalId, uint256 _choice)\n\t\texternal\n\t\tview\n\t\treturns (uint256);\n\n\t/**\n\t * @dev isAbstainAllow returns if the voting machine allow abstain (0)\n\t * @return bool true or false\n\t */\n\tfunction isAbstainAllow() external pure returns (bool);\n\n\t/**\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\tfunction getAllowedRangeOfChoices()\n\t\texternal\n\t\tpure\n\t\treturns (uint256 min, uint256 max);\n}\n", "sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/DAOStackInterfaces.sol", "ast": { "absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/upgradables/contracts/DAOStackInterfaces.sol", "exportedSymbols": { "Avatar": [ 12 ], "Controller": [ 51 ], "IntVoteInterface": [ 256 ], "ReputationInterface": [ 105 ], "SchemeRegistrar": [ 137 ] }, "id": 257, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", ">=", "0.6" ], "nodeType": "PragmaDirective", "src": "33:22:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 12, "linearizedBaseContracts": [ 12 ], "name": "Avatar", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "e1758bd8", "id": 6, "implemented": false, "kind": "function", "modifiers": [], "name": "nativeToken", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 2, "nodeType": "ParameterList", "parameters": [], "src": "97:2:0" }, "returnParameters": { "id": 5, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 6, "src": "118:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3, "name": "address", "nodeType": "ElementaryTypeName", "src": "118:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "117:9:0" }, "scope": 12, "src": "77:50:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "8da5cb5b", "id": 11, "implemented": false, "kind": "function", "modifiers": [], "name": "owner", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 7, "nodeType": "ParameterList", "parameters": [], "src": "144:2:0" }, "returnParameters": { "id": 10, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 9, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 11, "src": "165:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 8, "name": "address", "nodeType": "ElementaryTypeName", "src": "165:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "164:9:0" }, "scope": 12, "src": "130:44:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 257, "src": "57:119:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 51, "linearizedBaseContracts": [ 51 ], "name": "Controller", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "d1b7089a", "id": 27, "implemented": false, "kind": "function", "modifiers": [], "name": "genericCall", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 21, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14, "mutability": "mutable", "name": "_contract", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "226:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13, "name": "address", "nodeType": "ElementaryTypeName", "src": "226:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16, "mutability": "mutable", "name": "_data", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "247:20:0", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 15, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "247:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 18, "mutability": "mutable", "name": "_avatar", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "271:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 17, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12, "src": "271:6:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 20, "mutability": "mutable", "name": "_value", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "289:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 19, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "289:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "222:84:0" }, "returnParameters": { "id": 26, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 23, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "325:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 22, "name": "bool", "nodeType": "ElementaryTypeName", "src": "325:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 25, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 27, "src": "331:12:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 24, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "331:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "324:20:0" }, "scope": 51, "src": "202:143:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "5aef7de6", "id": 32, "implemented": false, "kind": "function", "modifiers": [], "name": "avatar", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 28, "nodeType": "ParameterList", "parameters": [], "src": "363:2:0" }, "returnParameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 30, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 32, "src": "389:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12", "typeString": "contract Avatar" }, "typeName": { "contractScope": null, "id": 29, "name": "Avatar", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 12, "src": "389:6:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Avatar_$12", "typeString": "contract Avatar" } }, "value": null, "visibility": "internal" } ], "src": "388:8:0" }, "scope": 51, "src": "348:49:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "039de01d", "id": 41, "implemented": false, "kind": "function", "modifiers": [], "name": "unregisterScheme", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 37, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 34, "mutability": "mutable", "name": "_scheme", "nodeType": "VariableDeclaration", "overrides": null, "scope": 41, "src": "426:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 33, "name": "address", "nodeType": "ElementaryTypeName", "src": "426:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 36, "mutability": "mutable", "name": "_avatar", "nodeType": "VariableDeclaration", "overrides": null, "scope": 41, "src": "443:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 35, "name": "address", "nodeType": "ElementaryTypeName", "src": "443:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "425:34:0" }, "returnParameters": { "id": 40, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 39, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 41, "src": "482:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 38, "name": "bool", "nodeType": "ElementaryTypeName", "src": "482:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "481:6:0" }, "scope": 51, "src": "400:88:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "9be2faed", "id": 50, "implemented": false, "kind": "function", "modifiers": [], "name": "isSchemeRegistered", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 46, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 43, "mutability": "mutable", "name": "_scheme", "nodeType": "VariableDeclaration", "overrides": null, "scope": 50, "src": "519:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 42, "name": "address", "nodeType": "ElementaryTypeName", "src": "519:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 45, "mutability": "mutable", "name": "_avatar", "nodeType": "VariableDeclaration", "overrides": null, "scope": 50, "src": "536:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 44, "name": "address", "nodeType": "ElementaryTypeName", "src": "536:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "518:34:0" }, "returnParameters": { "id": 49, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 48, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 50, "src": "582:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 47, "name": "bool", "nodeType": "ElementaryTypeName", "src": "582:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "581:6:0" }, "scope": 51, "src": "491:97:0", "stateMutability": "view", "virtual": false, "visibility": "external" } ], "scope": 257, "src": "178:412:0" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": null, "fullyImplemented": false, "id": 105, "linearizedBaseContracts": [ 105 ], "name": "ReputationInterface", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": null, "functionSelector": "70a08231", "id": 58, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOf", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 54, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 53, "mutability": "mutable", "name": "_user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 58, "src": "644:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 52, "name": "address", "nodeType": "ElementaryTypeName", "src": "644:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "643:15:0" }, "returnParameters": { "id": 57, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 56, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 58, "src": "682:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 55, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "682:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "681:9:0" }, "scope": 105, "src": "625:66:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "4ee2cd7e", "id": 67, "implemented": false, "kind": "function", "modifiers": [], "name": "balanceOfAt", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 63, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 60, "mutability": "mutable", "name": "_user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 67, "src": "715:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 59, "name": "address", "nodeType": "ElementaryTypeName", "src": "715:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 62, "mutability": "mutable", "name": "_blockNumber", "nodeType": "VariableDeclaration", "overrides": null, "scope": 67, "src": "730:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 61, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "730:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "714:37:0" }, "returnParameters": { "id": 66, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 65, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 67, "src": "781:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 64, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "781:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "780:9:0" }, "scope": 105, "src": "694:96:0", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "body": null, "documentation": null, "functionSelector": "9ab24eb0", "id": 74, "implemented": false, "kind": "function", "modifiers": [], "name": "getVotes", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 70, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 69, "mutability": "mutable", "name": "_user", "nodeType": "VariableDeclaration", "overrides": null, "scope": 74, "src": "811:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": {