@gnosis.pm/pm-contracts
Version:
Collection of smart contracts for the Gnosis prediction market platform
1,216 lines • 101 kB
JSON
{
"contractName": "OutcomeTokenProxy",
"abi": [
{
"constant": true,
"inputs": [],
"name": "masterCopy",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "proxied",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"proxied\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Constructor sets events contract address\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":\"OutcomeTokenProxy\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":{\"keccak256\":\"0x3d4c9ec14a60cf7577d366da5116e919a4331da8d6d993174f7d599f84ae74e0\",\"urls\":[\"bzzr://20f87450259a3af24ff1769faa9ab3b714d01921e9d8fa4efa75a0c277837a8a\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0xeab0e83a9ec9e7f052c0455a11577061ec6d1994db08dae429abd6faaabf6555\",\"urls\":[\"bzzr://b2c1273d4ec30e2f9e768eea8c510f8493a7359b03e01923d93eea86b57ec145\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5060405160208061021c8339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561007c57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061010e8061010e6000396000f3fe608060405260043610601c5760003560e01c8063a619486e146069575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146064573d6000f35b3d6000fd5b348015607457600080fd5b50607b60bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a72305820cbbb84b03efb936eec7a7a63670e9c47ced04c53284f2b0435d190970bfd2eb40029",
"deployedBytecode": "0x608060405260043610601c5760003560e01c8063a619486e146069575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e80600081146064573d6000f35b3d6000fd5b348015607457600080fd5b50607b60bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a72305820cbbb84b03efb936eec7a7a63670e9c47ced04c53284f2b0435d190970bfd2eb40029",
"sourceMap": "146:529:27:-;;;559:114;8:9:-1;5:2;;;30:1;27;20:12;5:2;559:114:27;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;559:114:27;;;;;;;;;;;;;;;;617:7;644:1:29;621:25;;:11;:25;;;;613:34;;;;;;670:11;657:10;;:24;;;;;;;;;;;;;;;;;;551:137;656:10:27;640:13;;:26;;;;;;;;;;;;;;;;;;559:114;146:529;;;;;;",
"deployedSourceMap": "146:529:27:-;;;;;;;;;;;;;;;;;;848:19:29;870:10;;;;;;;;;;;848:32;;932:14;929:1;926;913:34;1031:1;1028;1012:14;1009:1;996:11;992:1;988:6;975:58;1067:16;1064:1;1061;1046:38;1104:7;1129:1;1124:38;;;;1195:16;1192:1;1185:27;1124:38;1143:16;1140:1;1133:27;205:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;205:25:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o",
"source": "pragma solidity ^0.5.0;\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract OutcomeTokenProxy is Proxy {\n /*\n * Storage\n */\n\n // HACK: Lining up storage with StandardToken and OutcomeToken\n mapping(address => uint256) balances;\n uint256 totalSupply_;\n mapping (address => mapping (address => uint256)) internal allowed;\n\n address internal eventContract;\n\n /*\n * Public functions\n */\n /// @dev Constructor sets events contract address\n constructor(address proxied)\n public\n Proxy(proxied)\n {\n eventContract = msg.sender;\n }\n}\n\n/// @title Outcome token contract - Issuing and revoking outcome tokens\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract OutcomeToken is Proxied, ERC20 {\n using SafeMath for *;\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 /*\n * Modifiers\n */\n modifier isEventContract () {\n // Only event contract is allowed to proceed\n require(msg.sender == eventContract);\n _;\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 _mint(_for, 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 _burn(_for, outcomeTokenCount);\n emit Revocation(_for, outcomeTokenCount);\n }\n}\n",
"sourcePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol",
"ast": {
"absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol",
"exportedSymbols": {
"OutcomeToken": [
5793
],
"OutcomeTokenProxy": [
5721
]
},
"id": 5794,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5688,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:27"
},
{
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
"file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
"id": 5689,
"nodeType": "ImportDirective",
"scope": 5794,
"sourceUnit": 7779,
"src": "24:63:27",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol",
"file": "@gnosis.pm/util-contracts/contracts/Proxy.sol",
"id": 5690,
"nodeType": "ImportDirective",
"scope": 5794,
"sourceUnit": 6829,
"src": "88:55:27",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5691,
"name": "Proxy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 6828,
"src": "176:5:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Proxy_$6828",
"typeString": "contract Proxy"
}
},
"id": 5692,
"nodeType": "InheritanceSpecifier",
"src": "176:5:27"
}
],
"contractDependencies": [
6798,
6828
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 5721,
"linearizedBaseContracts": [
5721,
6828,
6798
],
"name": "OutcomeTokenProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 5696,
"name": "balances",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "287:36:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 5695,
"keyType": {
"id": 5693,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "295:7:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "287:27:27",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 5694,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "306:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5698,
"name": "totalSupply_",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "329:20:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5697,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "329:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5704,
"name": "allowed",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "355:66:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 5703,
"keyType": {
"id": 5699,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "364:7:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "355:49:27",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 5702,
"keyType": {
"id": 5700,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "384:7:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "375:28:27",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 5701,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "395:7:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5706,
"name": "eventContract",
"nodeType": "VariableDeclaration",
"scope": 5721,
"src": "428:30:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5705,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "428:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"body": {
"id": 5719,
"nodeType": "Block",
"src": "630:43:27",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 5717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 5714,
"name": "eventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5706,
"src": "640:13:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5715,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7920,
"src": "656:3:27",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 5716,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "656:10:27",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "640:26:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 5718,
"nodeType": "ExpressionStatement",
"src": "640:26:27"
}
]
},
"documentation": "@dev Constructor sets events contract address",
"id": 5720,
"implemented": true,
"kind": "constructor",
"modifiers": [
{
"arguments": [
{
"argumentTypes": null,
"id": 5711,
"name": "proxied",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5708,
"src": "617:7:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"id": 5712,
"modifierName": {
"argumentTypes": null,
"id": 5710,
"name": "Proxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6828,
"src": "611:5:27",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_Proxy_$6828_$",
"typeString": "type(contract Proxy)"
}
},
"nodeType": "ModifierInvocation",
"src": "611:14:27"
}
],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5708,
"name": "proxied",
"nodeType": "VariableDeclaration",
"scope": 5720,
"src": "571:15:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5707,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "571:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "570:17:27"
},
"returnParameters": {
"id": 5713,
"nodeType": "ParameterList",
"parameters": [],
"src": "630:0:27"
},
"scope": 5721,
"src": "559:114:27",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 5794,
"src": "146:529:27"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5722,
"name": "Proxied",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 6798,
"src": "821:7:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Proxied_$6798",
"typeString": "contract Proxied"
}
},
"id": 5723,
"nodeType": "InheritanceSpecifier",
"src": "821:7:27"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 5724,
"name": "ERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 7778,
"src": "830:5:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$7778",
"typeString": "contract ERC20"
}
},
"id": 5725,
"nodeType": "InheritanceSpecifier",
"src": "830:5:27"
}
],
"contractDependencies": [
6798,
7778,
7905
],
"contractKind": "contract",
"documentation": "@title Outcome token contract - Issuing and revoking outcome tokens\n @author Stefan George - <stefan@gnosis.pm>",
"fullyImplemented": true,
"id": 5793,
"linearizedBaseContracts": [
5793,
7778,
7905,
6798
],
"name": "OutcomeToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 5727,
"libraryName": {
"contractScope": null,
"id": 5726,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 7381,
"src": "848:8:27",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$7381",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "842:21:27",
"typeName": null
},
{
"anonymous": false,
"documentation": null,
"id": 5733,
"name": "Issuance",
"nodeType": "EventDefinition",
"parameters": {
"id": 5732,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5729,
"indexed": true,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 5733,
"src": "914:21:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5728,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "914:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5731,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 5733,
"src": "937:11:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5730,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "937:4:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "913:36:27"
},
"src": "899:51:27"
},
{
"anonymous": false,
"documentation": null,
"id": 5739,
"name": "Revocation",
"nodeType": "EventDefinition",
"parameters": {
"id": 5738,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5735,
"indexed": true,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 5739,
"src": "972:21:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5734,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "972:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5737,
"indexed": false,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 5739,
"src": "995:11:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5736,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "995:4:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "971:36:27"
},
"src": "955:53:27"
},
{
"constant": false,
"id": 5741,
"name": "eventContract",
"nodeType": "VariableDeclaration",
"scope": 5793,
"src": "1045:28:27",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5740,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1045:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 5751,
"nodeType": "Block",
"src": "1141:117:27",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 5747,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 5744,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7920,
"src": "1212:3:27",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 5745,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1212:10:27",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 5746,
"name": "eventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5741,
"src": "1226:13:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1212:27:27",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 5743,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
7923,
7924
],
"referencedDeclaration": 7923,
"src": "1204:7:27",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 5748,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1204:36:27",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5749,
"nodeType": "ExpressionStatement",
"src": "1204:36:27"
},
{
"id": 5750,
"nodeType": "PlaceholderStatement",
"src": "1250:1:27"
}
]
},
"documentation": null,
"id": 5752,
"name": "isEventContract",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 5742,
"nodeType": "ParameterList",
"parameters": [],
"src": "1138:2:27"
},
"src": "1113:145:27",
"visibility": "internal"
},
{
"body": {
"id": 5771,
"nodeType": "Block",
"src": "1575:95:27",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5762,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5754,
"src": "1591:4:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5763,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5756,
"src": "1597:17:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5761,
"name": "_mint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7664,
"src": "1585:5:27",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 5764,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1585:30:27",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5765,
"nodeType": "ExpressionStatement",
"src": "1585:30:27"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5767,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5754,
"src": "1639:4:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5768,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5756,
"src": "1645:17:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5766,
"name": "Issuance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5733,
"src": "1630:8:27",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 5769,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1630:33:27",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5770,
"nodeType": "EmitStatement",
"src": "1625:38:27"
}
]
},
"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": 5772,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 5759,
"modifierName": {
"argumentTypes": null,
"id": 5758,
"name": "isEventContract",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5752,
"src": "1555:15:27",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1555:15:27"
}
],
"name": "issue",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5757,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5754,
"name": "_for",
"nodeType": "VariableDeclaration",
"scope": 5772,
"src": "1494:12:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 5753,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1494:7:27",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 5756,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 5772,
"src": "1508:22:27",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5755,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1508:4:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1493:38:27"
},
"returnParameters": {
"id": 5760,
"nodeType": "ParameterList",
"parameters": [],
"src": "1575:0:27"
},
"scope": 5793,
"src": "1479:191:27",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 5791,
"nodeType": "Block",
"src": "1950:97:27",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5782,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5774,
"src": "1966:4:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5783,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5776,
"src": "1972:17:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5781,
"name": "_burn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 7707,
"src": "1960:5:27",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 5784,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1960:30:27",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5785,
"nodeType": "ExpressionStatement",
"src": "1960:30:27"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 5787,
"name": "_for",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5774,
"src": "2016:4:27",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 5788,
"name": "outcomeTokenCount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5776,
"src": "2022:17:27",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5786,
"name": "Revocation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5739,
"src": "2005:10:27",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 5789,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2005:35:27",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 5790,
"nodeType": "EmitStatement",
"src": "