@josojo/realitytoken-contracts
Version:
realitytoken basic contracts
1,256 lines (1,255 loc) • 126 kB
JSON
{
"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:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;78:454:2;;;;;;;",
"deployedSourceMap": "78:454:2:-;;;;;;;;;;;;;;;;;;;;;;;287:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;287:28:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::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": [
453
],
"OutcomeTokenData": [
359
]
},
"id": 454,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 330,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:2"
},
{
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/StandardToken.sol",
"file": "./StandardToken.sol",
"id": 331,
"nodeType": "ImportDirective",
"scope": 454,
"sourceUnit": 1388,
"src": "25:29:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol",
"file": "./Proxy.sol",
"id": 332,
"nodeType": "ImportDirective",
"scope": 454,
"sourceUnit": 487,
"src": "55:21:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 359,
"linearizedBaseContracts": [
359
],
"name": "OutcomeTokenData",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 338,
"name": "Issuance",
"nodeType": "EventDefinition",
"parameters": {
"id": 337,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 334,
"indexed": true,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 338,
"src": "156:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 333,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "156:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 336,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 338,
"src": "179:11:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 335,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "179:4:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "155:36:2"
},
"src": "141:51:2"
},
{
"anonymous": false,
"documentation": null,
"id": 344,
"name": "Revocation",
"nodeType": "EventDefinition",
"parameters": {
"id": 343,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 340,
"indexed": true,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 344,
"src": "214:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 339,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "214:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 342,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 344,
"src": "237:11:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 341,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "237:4:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "213:36:2"
},
"src": "197:53:2"
},
{
"constant": false,
"id": 346,
"name": "eventContract",
"nodeType": "VariableDeclaration",
"scope": 359,
"src": "287:28:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 345,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "287:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 357,
"nodeType": "Block",
"src": "382:148:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 352,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 349,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9180,
"src": "453:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 350,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "453:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 351,
"name": "eventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 346,
"src": "467:13:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "453:27:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "636f6e7472616374206e6f74206576656e7420436f6e7472616374",
"id": 353,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "482:29:2",
"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": 348,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
9183,
9184
],
"referencedDeclaration": 9184,
"src": "445:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "445:67:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 355,
"nodeType": "ExpressionStatement",
"src": "445:67:2"
},
{
"id": 356,
"nodeType": "PlaceholderStatement",
"src": "522:1:2"
}
]
},
"documentation": null,
"id": 358,
"name": "isEventContract",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 347,
"nodeType": "ParameterList",
"parameters": [],
"src": "379:2:2"
},
"src": "354:176:2",
"visibility": "internal"
}
],
"scope": 454,
"src": "78:454:2"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 360,
"name": "StandardToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1387,
"src": "679:13:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_StandardToken_$1387",
"typeString": "contract StandardToken"
}
},
"id": 361,
"nodeType": "InheritanceSpecifier",
"src": "679:13:2"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 362,
"name": "OutcomeTokenData",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 359,
"src": "694:16:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_OutcomeTokenData_$359",
"typeString": "contract OutcomeTokenData"
}
},
"id": 363,
"nodeType": "InheritanceSpecifier",
"src": "694:16:2"
}
],
"contractDependencies": [
359,
1195,
1387,
3360
],
"contractKind": "contract",
"documentation": "@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 453,
"linearizedBaseContracts": [
453,
359,
1387,
1195,
3360
],
"name": "OutcomeToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 365,
"libraryName": {
"contractScope": null,
"id": 364,
"name": "Math",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4611,
"src": "723:4:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Math_$4611",
"typeString": "library Math"
}
},
"nodeType": "UsingForDirective",
"src": "717:17:2",
"typeName": null
},
{
"body": {
"id": 385,
"nodeType": "Block",
"src": "857:91:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 372,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1176,
"src": "867:4:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 373,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 369,
"src": "874:5:2",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "867:12:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 375,
"nodeType": "ExpressionStatement",
"src": "867:12:2"
},
{
"expression": {
"argumentTypes": null,
"id": 378,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 376,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1179,
"src": "889:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 377,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 367,
"src": "898:7:2",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "889:16:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 379,
"nodeType": "ExpressionStatement",
"src": "889:16:2"
},
{
"expression": {
"argumentTypes": null,
"id": 383,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 380,
"name": "eventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 346,
"src": "915:13:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 381,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9180,
"src": "931:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 382,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "931:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "915:26:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 384,
"nodeType": "ExpressionStatement",
"src": "915:26:2"
}
]
},
"documentation": "@dev Constructor sets events contract address",
"id": 386,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 370,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 367,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 386,
"src": "808:14:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 366,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "808:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 369,
"name": "_name",
"nodeType": "VariableDeclaration",
"scope": 386,
"src": "824:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 368,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "824:6:2",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "807:30:2"
},
"payable": false,
"returnParameters": {
"id": 371,
"nodeType": "ParameterList",
"parameters": [],
"src": "857:0:2"
},
"scope": 453,
"src": "796:152:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 418,
"nodeType": "Block",
"src": "1267:177:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 395,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1277:8:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 397,
"indexExpression": {
"argumentTypes": null,
"id": 396,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 388,
"src": "1286:4:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1277:14:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 402,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 390,
"src": "1313:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 398,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1294:8:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 400,
"indexExpression": {
"argumentTypes": null,
"id": 399,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 388,
"src": "1303:4:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1294:14:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 401,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 4417,
"src": "1294:18:2",
"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": 403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1294:37:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1277:54:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 405,
"nodeType": "ExpressionStatement",
"src": "1277:54:2"
},
{
"expression": {
"argumentTypes": null,
"id": 411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 406,
"name": "totalTokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1194,
"src": "1341:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 409,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 390,
"src": "1371:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 407,
"name": "totalTokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1194,
"src": "1355:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "add",
"nodeType": "MemberAccess",
"referencedDeclaration": 4417,
"src": "1355:15:2",
"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": 410,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1355:34:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1341:48:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 412,
"nodeType": "ExpressionStatement",
"src": "1341:48:2"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 414,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 388,
"src": "1413:4:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 415,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 390,
"src": "1419:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 413,
"name": "Issuance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 338,
"src": "1404:8:2",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 416,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1404:33:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 417,
"nodeType": "EmitStatement",
"src": "1399:38:2"
}
]
},
"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": 419,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": [],
"id": 393,
"modifierName": {
"argumentTypes": null,
"id": 392,
"name": "isEventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 358,
"src": "1245:15:2",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1245:17:2"
}
],
"name": "issue",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 391,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 388,
"name": "_for",
"nodeType": "VariableDeclaration",
"scope": 419,
"src": "1184:12:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 387,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1184:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 390,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 419,
"src": "1198:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 389,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1198:4:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1183:38:2"
},
"payable": false,
"returnParameters": {
"id": 394,
"nodeType": "ParameterList",
"parameters": [],
"src": "1267:0:2"
},
"scope": 453,
"src": "1169:275:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 451,
"nodeType": "Block",
"src": "1726:179:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 428,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1736:8:2",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 430,
"indexExpression": {
"argumentTypes": null,
"id": 429,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 421,
"src": "1745:4:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1736:14:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 435,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 423,
"src": "1772:17:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",