UNPKG

@josojo/tokenized-events

Version:
1,253 lines (1,252 loc) 126 kB
{ "contractName": "OutcomeTokenData", "abi": [ { "constant": true, "inputs": [], "name": "eventContract", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "Issuance", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "owner", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "Revocation", "type": "event" } ], "bytecode": "0x608060405234801561001057600080fd5b5060c68061001f6000396000f300608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663e274fd2481146043575b600080fd5b348015604e57600080fd5b506055607e565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058203ca095b515583481583af701329b537c30de7553c50c5c61a9fd250c54522d760029", "deployedBytecode": "0x608060405260043610603e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663e274fd2481146043575b600080fd5b348015604e57600080fd5b506055607e565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058203ca095b515583481583af701329b537c30de7553c50c5c61a9fd250c54522d760029", "sourceMap": "78:454:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;78:454:6;;;;;;;", "deployedSourceMap": "78:454:6:-;;;;;;;;;;;;;;;;;;;;;;;287:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;287:28:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", "source": "pragma solidity ^0.4.24;\nimport \"./StandardToken.sol\";\nimport \"./Proxy.sol\";\n\ncontract OutcomeTokenData {\n\n /*\n * Events\n */\n event Issuance(address indexed owner, uint amount);\n event Revocation(address indexed owner, uint amount);\n\n /*\n * Storage\n */\n address public eventContract;\n /*\n * Modifiers\n */\n modifier isEventContract () {\n // Only event contract is allowed to proceed\n require(msg.sender == eventContract, \"contract not event Contract\");\n _;\n }\n}\n\n\n/// @title Outcome token contract - Issuing and revoking outcome tokens\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract OutcomeToken is StandardToken, OutcomeTokenData {\n using Math for *;\n\n\n /// @dev Constructor sets events contract address\n constructor(string _symbol, string _name)\n public\n {\n name = _name;\n symbol = _symbol;\n eventContract = msg.sender;\n }\n\n /*\n * Public functions\n */\n /// @dev Events contract issues new tokens for address. Returns success\n /// @param _for Address of receiver\n /// @param outcomeTokenCount Number of tokens to issue\n function issue(address _for, uint outcomeTokenCount)\n public\n isEventContract()\n {\n balances[_for] = balances[_for].add(outcomeTokenCount);\n totalTokens = totalTokens.add(outcomeTokenCount);\n emit Issuance(_for, outcomeTokenCount);\n }\n\n /// @dev Events contract revokes tokens for address. Returns success\n /// @param _for Address of token holder\n /// @param outcomeTokenCount Number of tokens to revoke\n function revoke(address _for, uint outcomeTokenCount)\n public\n isEventContract()\n {\n balances[_for] = balances[_for].sub(outcomeTokenCount);\n totalTokens = totalTokens.sub(outcomeTokenCount);\n emit Revocation(_for, outcomeTokenCount);\n }\n}", "sourcePath": "/home/josojo/reality/tokenized-events/contracts/OutcomeToken.sol", "ast": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/OutcomeToken.sol", "exportedSymbols": { "OutcomeToken": [ 1700 ], "OutcomeTokenData": [ 1606 ] }, "id": 1701, "nodeType": "SourceUnit", "nodes": [ { "id": 1577, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:6" }, { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/StandardToken.sol", "file": "./StandardToken.sol", "id": 1578, "nodeType": "ImportDirective", "scope": 1701, "sourceUnit": 2635, "src": "25:29:6", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "file": "./Proxy.sol", "id": 1579, "nodeType": "ImportDirective", "scope": 1701, "sourceUnit": 1734, "src": "55:21:6", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 1606, "linearizedBaseContracts": [ 1606 ], "name": "OutcomeTokenData", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 1585, "name": "Issuance", "nodeType": "EventDefinition", "parameters": { "id": 1584, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1581, "indexed": true, "name": "owner", "nodeType": "VariableDeclaration", "scope": 1585, "src": "156:21:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1580, "name": "address", "nodeType": "ElementaryTypeName", "src": "156:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1583, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 1585, "src": "179:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1582, "name": "uint", "nodeType": "ElementaryTypeName", "src": "179:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "155:36:6" }, "src": "141:51:6" }, { "anonymous": false, "documentation": null, "id": 1591, "name": "Revocation", "nodeType": "EventDefinition", "parameters": { "id": 1590, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1587, "indexed": true, "name": "owner", "nodeType": "VariableDeclaration", "scope": 1591, "src": "214:21:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1586, "name": "address", "nodeType": "ElementaryTypeName", "src": "214:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1589, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 1591, "src": "237:11:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1588, "name": "uint", "nodeType": "ElementaryTypeName", "src": "237:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "213:36:6" }, "src": "197:53:6" }, { "constant": false, "id": 1593, "name": "eventContract", "nodeType": "VariableDeclaration", "scope": 1606, "src": "287:28:6", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1592, "name": "address", "nodeType": "ElementaryTypeName", "src": "287:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "body": { "id": 1604, "nodeType": "Block", "src": "382:148:6", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 1599, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1596, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8523, "src": "453:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1597, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "453:10:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 1598, "name": "eventContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1593, "src": "467:13:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "453:27:6", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "636f6e7472616374206e6f74206576656e7420436f6e7472616374", "id": 1600, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "482:29:6", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d9a60572984bd05063fa534198656d40f952d96104a72c2a322cd12660129d46", "typeString": "literal_string \"contract not event Contract\"" }, "value": "contract not event Contract" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_d9a60572984bd05063fa534198656d40f952d96104a72c2a322cd12660129d46", "typeString": "literal_string \"contract not event Contract\"" } ], "id": 1595, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 8526, 8527 ], "referencedDeclaration": 8527, "src": "445:7:6", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 1601, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "445:67:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1602, "nodeType": "ExpressionStatement", "src": "445:67:6" }, { "id": 1603, "nodeType": "PlaceholderStatement", "src": "522:1:6" } ] }, "documentation": null, "id": 1605, "name": "isEventContract", "nodeType": "ModifierDefinition", "parameters": { "id": 1594, "nodeType": "ParameterList", "parameters": [], "src": "379:2:6" }, "src": "354:176:6", "visibility": "internal" } ], "scope": 1701, "src": "78:454:6" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1607, "name": "StandardToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2634, "src": "679:13:6", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardToken_$2634", "typeString": "contract StandardToken" } }, "id": 1608, "nodeType": "InheritanceSpecifier", "src": "679:13:6" }, { "arguments": null, "baseName": { "contractScope": null, "id": 1609, "name": "OutcomeTokenData", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1606, "src": "694:16:6", "typeDescriptions": { "typeIdentifier": "t_contract$_OutcomeTokenData_$1606", "typeString": "contract OutcomeTokenData" } }, "id": 1610, "nodeType": "InheritanceSpecifier", "src": "694:16:6" } ], "contractDependencies": [ 1606, 2442, 2634, 2703 ], "contractKind": "contract", "documentation": "@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - <stefan@gnosis.pm>", "fullyImplemented": true, "id": 1700, "linearizedBaseContracts": [ 1700, 1606, 2634, 2442, 2703 ], "name": "OutcomeToken", "nodeType": "ContractDefinition", "nodes": [ { "id": 1612, "libraryName": { "contractScope": null, "id": 1611, "name": "Math", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3954, "src": "723:4:6", "typeDescriptions": { "typeIdentifier": "t_contract$_Math_$3954", "typeString": "library Math" } }, "nodeType": "UsingForDirective", "src": "717:17:6", "typeName": null }, { "body": { "id": 1632, "nodeType": "Block", "src": "857:91:6", "statements": [ { "expression": { "argumentTypes": null, "id": 1621, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1619, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2423, "src": "867:4:6", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 1620, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1616, "src": "874:5:6", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "867:12:6", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 1622, "nodeType": "ExpressionStatement", "src": "867:12:6" }, { "expression": { "argumentTypes": null, "id": 1625, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1623, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2426, "src": "889:6:6", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 1624, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1614, "src": "898:7:6", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "889:16:6", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 1626, "nodeType": "ExpressionStatement", "src": "889:16:6" }, { "expression": { "argumentTypes": null, "id": 1630, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1627, "name": "eventContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1593, "src": "915:13:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1628, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8523, "src": "931:3:6", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1629, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "931:10:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "915:26:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1631, "nodeType": "ExpressionStatement", "src": "915:26:6" } ] }, "documentation": "@dev Constructor sets events contract address", "id": 1633, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1617, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1614, "name": "_symbol", "nodeType": "VariableDeclaration", "scope": 1633, "src": "808:14:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1613, "name": "string", "nodeType": "ElementaryTypeName", "src": "808:6:6", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1616, "name": "_name", "nodeType": "VariableDeclaration", "scope": 1633, "src": "824:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1615, "name": "string", "nodeType": "ElementaryTypeName", "src": "824:6:6", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "807:30:6" }, "payable": false, "returnParameters": { "id": 1618, "nodeType": "ParameterList", "parameters": [], "src": "857:0:6" }, "scope": 1700, "src": "796:152:6", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1665, "nodeType": "Block", "src": "1267:177:6", "statements": [ { "expression": { "argumentTypes": null, "id": 1651, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1642, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1277:8:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 1644, "indexExpression": { "argumentTypes": null, "id": 1643, "name": "_for", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1635, "src": "1286:4:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1277:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1649, "name": "outcomeTokenCount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1637, "src": "1313:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1645, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1294:8:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 1647, "indexExpression": { "argumentTypes": null, "id": 1646, "name": "_for", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1635, "src": "1303:4:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1294:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1648, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 3760, "src": "1294:18:6", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) view returns (uint256)" } }, "id": 1650, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1294:37:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1277:54:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1652, "nodeType": "ExpressionStatement", "src": "1277:54:6" }, { "expression": { "argumentTypes": null, "id": 1658, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 1653, "name": "totalTokens", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2441, "src": "1341:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1656, "name": "outcomeTokenCount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1637, "src": "1371:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 1654, "name": "totalTokens", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2441, "src": "1355:11:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1655, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 3760, "src": "1355:15:6", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) view returns (uint256)" } }, "id": 1657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1355:34:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1341:48:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1659, "nodeType": "ExpressionStatement", "src": "1341:48:6" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1661, "name": "_for", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1635, "src": "1413:4:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 1662, "name": "outcomeTokenCount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1637, "src": "1419:17:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1660, "name": "Issuance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1585, "src": "1404:8:6", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 1663, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1404:33:6", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1664, "nodeType": "EmitStatement", "src": "1399:38:6" } ] }, "documentation": "@dev Events contract issues new tokens for address. Returns success\n @param _for Address of receiver\n @param outcomeTokenCount Number of tokens to issue", "id": 1666, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": [], "id": 1640, "modifierName": { "argumentTypes": null, "id": 1639, "name": "isEventContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1605, "src": "1245:15:6", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "1245:17:6" } ], "name": "issue", "nodeType": "FunctionDefinition", "parameters": { "id": 1638, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1635, "name": "_for", "nodeType": "VariableDeclaration", "scope": 1666, "src": "1184:12:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1634, "name": "address", "nodeType": "ElementaryTypeName", "src": "1184:7:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1637, "name": "outcomeTokenCount", "nodeType": "VariableDeclaration", "scope": 1666, "src": "1198:22:6", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1636, "name": "uint", "nodeType": "ElementaryTypeName", "src": "1198:4:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1183:38:6" }, "payable": false, "returnParameters": { "id": 1641, "nodeType": "ParameterList", "parameters": [], "src": "1267:0:6" }, "scope": 1700, "src": "1169:275:6", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1698, "nodeType": "Block", "src": "1726:179:6", "statements": [ { "expression": { "argumentTypes": null, "id": 1684, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1675, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1736:8:6", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 1677, "indexExpression": { "argumentTypes": null, "id": 1676, "name": "_for", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1668, "src": "1745:4:6", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1736:14:6", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 1682, "name": "outcomeTokenCount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1670,