Files
CEIDEC-Pong-Web/build/contracts/Pong.json

1621 lines
60 KiB
JSON

{
"contractName": "Pong",
"abi": [
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "player",
"type": "address"
}
],
"name": "CanPlayTheGame",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "kill",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "howManytimesPlayed",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "play",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600181905550610246806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311713df21461005c57806341c0e1b51461008757806393e84cd91461009e575b600080fd5b34801561006857600080fd5b506100716100a8565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b5061009c6100b2565b005b6100a6610147565b005b6000600154905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561010d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b670de0b6b3a76400003414151561015d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156101c4573d6000803e3d6000fd5b50600180600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fa75916785ed274ade409b333cb54e33f4d515761c89b45c54ba3d9d944b109c960405160405180910390a25600a165627a7a72305820cc407087701b513237584fca8eaef984eb2d5cdc4fb55ec2d7d33a1f83e9f5480029",
"deployedBytecode": "0x608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311713df21461005c57806341c0e1b51461008757806393e84cd91461009e575b600080fd5b34801561006857600080fd5b506100716100a8565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b5061009c6100b2565b005b6100a6610147565b005b6000600154905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561010d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b670de0b6b3a76400003414151561015d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156101c4573d6000803e3d6000fd5b50600180600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff167fa75916785ed274ade409b333cb54e33f4d515761c89b45c54ba3d9d944b109c960405160405180910390a25600a165627a7a72305820cc407087701b513237584fca8eaef984eb2d5cdc4fb55ec2d7d33a1f83e9f5480029",
"sourceMap": "520:494:2:-;;;624:47;8:9:-1;5:2;;;30:1;27;20:12;5:2;624:47:2;2589:10:1;2581:5;;:18;;;;;;;;;;;;;;;;;;665:1:2;651:11;:15;;;;520:494;;;;;;",
"deployedSourceMap": "520:494:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;744:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;744:89:2;;;;;;;;;;;;;;;;;;;;;;;677:63;;8:9:-1;5:2;;;30:1;27;20:12;5:2;677:63:2;;;;;;839:173;;;;;;744:89;795:7;817:11;;810:18;;744:89;:::o;677:63::-;1737:5:1;;;;;;;;;;;1723:19;;:10;:19;;;1715:28;;;;;;;;729:5:2;;;;;;;;;;;716:19;;;839:173;897:19;884:9;:32;876:41;;;;;;;;923:5;;;;;;;;;;;:14;;:25;938:9;923:25;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;923:25:2;969:1;954:11;;:16;;;;;;;;;;;996:10;981:26;;;;;;;;;;;;839:173::o",
"source": "/*\n * -----------------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision 42):\n * <miguel.astor@ciens.ucv.ve> wrote this file. As long as you retain this notice you\n * can do whatever you want with this stuff. If we meet some day, and you think\n * this stuff is worth it, you can buy me a beer in return. Miguel Angel Astor\n * -----------------------------------------------------------------------------------\n */\n\npragma solidity ^0.4.24;\n\nimport \"./Ownable.sol\";\n\ncontract Pong is Ownable {\n uint256 timesPlayed;\n\n event CanPlayTheGame(address indexed player);\n \n constructor() public {\n timesPlayed = 0;\n }\n \n function kill() public onlyOwner {\n selfdestruct(owner);\n }\n\n function howManytimesPlayed() public view returns (uint256) {\n return timesPlayed;\n }\n \n function play() payable public {\n require(msg.value == 1000000000000000000);\n owner.transfer(msg.value);\n timesPlayed += 1;\n emit CanPlayTheGame(msg.sender);\n }\n}\n",
"sourcePath": "/home/miky/Documentos/Game/contracts/Pong.sol",
"ast": {
"absolutePath": "/home/miky/Documentos/Game/contracts/Pong.sol",
"exportedSymbols": {
"Pong": [
146
]
},
"id": 147,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 83,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "469:24:2"
},
{
"absolutePath": "/home/miky/Documentos/Game/contracts/Ownable.sol",
"file": "./Ownable.sol",
"id": 84,
"nodeType": "ImportDirective",
"scope": 147,
"sourceUnit": 82,
"src": "495:23:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 85,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 81,
"src": "537:7:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$81",
"typeString": "contract Ownable"
}
},
"id": 86,
"nodeType": "InheritanceSpecifier",
"src": "537:7:2"
}
],
"contractDependencies": [
81
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 146,
"linearizedBaseContracts": [
146,
81
],
"name": "Pong",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 88,
"name": "timesPlayed",
"nodeType": "VariableDeclaration",
"scope": 146,
"src": "549:19:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 87,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "549:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 92,
"name": "CanPlayTheGame",
"nodeType": "EventDefinition",
"parameters": {
"id": 91,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 90,
"indexed": true,
"name": "player",
"nodeType": "VariableDeclaration",
"scope": 92,
"src": "594:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 89,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "594:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "593:24:2"
},
"src": "573:45:2"
},
{
"body": {
"id": 99,
"nodeType": "Block",
"src": "645:26:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 95,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "651:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "665:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "651:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 98,
"nodeType": "ExpressionStatement",
"src": "651:15:2"
}
]
},
"documentation": null,
"id": 100,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 93,
"nodeType": "ParameterList",
"parameters": [],
"src": "635:2:2"
},
"payable": false,
"returnParameters": {
"id": 94,
"nodeType": "ParameterList",
"parameters": [],
"src": "645:0:2"
},
"scope": 146,
"src": "624:47:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 109,
"nodeType": "Block",
"src": "710:30:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 106,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 60,
"src": "729:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 105,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "716:12:2",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "716:19:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 108,
"nodeType": "ExpressionStatement",
"src": "716:19:2"
}
]
},
"documentation": null,
"id": 110,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 103,
"modifierName": {
"argumentTypes": null,
"id": 102,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 71,
"src": "700:9:2",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "700:9:2"
}
],
"name": "kill",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 101,
"nodeType": "ParameterList",
"parameters": [],
"src": "690:2:2"
},
"payable": false,
"returnParameters": {
"id": 104,
"nodeType": "ParameterList",
"parameters": [],
"src": "710:0:2"
},
"scope": 146,
"src": "677:63:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "804:29:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 115,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "817:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 114,
"id": 116,
"nodeType": "Return",
"src": "810:18:2"
}
]
},
"documentation": null,
"id": 118,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "howManytimesPlayed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 111,
"nodeType": "ParameterList",
"parameters": [],
"src": "771:2:2"
},
"payable": false,
"returnParameters": {
"id": 114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 113,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 118,
"src": "795:7:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 112,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "795:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "794:9:2"
},
"scope": 146,
"src": "744:89:2",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 144,
"nodeType": "Block",
"src": "870:142:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 122,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "884:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "884:9:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31303030303030303030303030303030303030",
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "897:19:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
},
"value": "1000000000000000000"
},
"src": "884:32:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 121,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
164,
165
],
"referencedDeclaration": 164,
"src": "876:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "876:41:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 127,
"nodeType": "ExpressionStatement",
"src": "876:41:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 131,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "938:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "938:9:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 128,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 60,
"src": "923:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "923:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "923:25:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 134,
"nodeType": "ExpressionStatement",
"src": "923:25:2"
},
{
"expression": {
"argumentTypes": null,
"id": 137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 135,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "954:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "969:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "954:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 138,
"nodeType": "ExpressionStatement",
"src": "954:16:2"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 140,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "996:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 141,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "996:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 139,
"name": "CanPlayTheGame",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 92,
"src": "981:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "981:26:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 143,
"nodeType": "EmitStatement",
"src": "976:31:2"
}
]
},
"documentation": null,
"id": 145,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "play",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 119,
"nodeType": "ParameterList",
"parameters": [],
"src": "852:2:2"
},
"payable": true,
"returnParameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [],
"src": "870:0:2"
},
"scope": 146,
"src": "839:173:2",
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 147,
"src": "520:494:2"
}
],
"src": "469:546:2"
},
"legacyAST": {
"absolutePath": "/home/miky/Documentos/Game/contracts/Pong.sol",
"exportedSymbols": {
"Pong": [
146
]
},
"id": 147,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 83,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "469:24:2"
},
{
"absolutePath": "/home/miky/Documentos/Game/contracts/Ownable.sol",
"file": "./Ownable.sol",
"id": 84,
"nodeType": "ImportDirective",
"scope": 147,
"sourceUnit": 82,
"src": "495:23:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 85,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 81,
"src": "537:7:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$81",
"typeString": "contract Ownable"
}
},
"id": 86,
"nodeType": "InheritanceSpecifier",
"src": "537:7:2"
}
],
"contractDependencies": [
81
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 146,
"linearizedBaseContracts": [
146,
81
],
"name": "Pong",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 88,
"name": "timesPlayed",
"nodeType": "VariableDeclaration",
"scope": 146,
"src": "549:19:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 87,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "549:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"anonymous": false,
"documentation": null,
"id": 92,
"name": "CanPlayTheGame",
"nodeType": "EventDefinition",
"parameters": {
"id": 91,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 90,
"indexed": true,
"name": "player",
"nodeType": "VariableDeclaration",
"scope": 92,
"src": "594:22:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 89,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "594:7:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "593:24:2"
},
"src": "573:45:2"
},
{
"body": {
"id": 99,
"nodeType": "Block",
"src": "645:26:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 95,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "651:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "30",
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "665:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "651:15:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 98,
"nodeType": "ExpressionStatement",
"src": "651:15:2"
}
]
},
"documentation": null,
"id": 100,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 93,
"nodeType": "ParameterList",
"parameters": [],
"src": "635:2:2"
},
"payable": false,
"returnParameters": {
"id": 94,
"nodeType": "ParameterList",
"parameters": [],
"src": "645:0:2"
},
"scope": 146,
"src": "624:47:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 109,
"nodeType": "Block",
"src": "710:30:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 106,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 60,
"src": "729:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 105,
"name": "selfdestruct",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 169,
"src": "716:12:2",
"typeDescriptions": {
"typeIdentifier": "t_function_selfdestruct_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "716:19:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 108,
"nodeType": "ExpressionStatement",
"src": "716:19:2"
}
]
},
"documentation": null,
"id": 110,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [
{
"arguments": null,
"id": 103,
"modifierName": {
"argumentTypes": null,
"id": 102,
"name": "onlyOwner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 71,
"src": "700:9:2",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "700:9:2"
}
],
"name": "kill",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 101,
"nodeType": "ParameterList",
"parameters": [],
"src": "690:2:2"
},
"payable": false,
"returnParameters": {
"id": 104,
"nodeType": "ParameterList",
"parameters": [],
"src": "710:0:2"
},
"scope": 146,
"src": "677:63:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 117,
"nodeType": "Block",
"src": "804:29:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 115,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "817:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 114,
"id": 116,
"nodeType": "Return",
"src": "810:18:2"
}
]
},
"documentation": null,
"id": 118,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "howManytimesPlayed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 111,
"nodeType": "ParameterList",
"parameters": [],
"src": "771:2:2"
},
"payable": false,
"returnParameters": {
"id": 114,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 113,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 118,
"src": "795:7:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 112,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "795:7:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "794:9:2"
},
"scope": 146,
"src": "744:89:2",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 144,
"nodeType": "Block",
"src": "870:142:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 122,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "884:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "884:9:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31303030303030303030303030303030303030",
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "897:19:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
},
"value": "1000000000000000000"
},
"src": "884:32:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 121,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
164,
165
],
"referencedDeclaration": 164,
"src": "876:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "876:41:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 127,
"nodeType": "ExpressionStatement",
"src": "876:41:2"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 131,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "938:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "value",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "938:9:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"id": 128,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 60,
"src": "923:5:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "923:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 133,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "923:25:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 134,
"nodeType": "ExpressionStatement",
"src": "923:25:2"
},
{
"expression": {
"argumentTypes": null,
"id": 137,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 135,
"name": "timesPlayed",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 88,
"src": "954:11:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "31",
"id": 136,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "969:1:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "954:16:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 138,
"nodeType": "ExpressionStatement",
"src": "954:16:2"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 140,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 161,
"src": "996:3:2",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 141,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "996:10:2",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 139,
"name": "CanPlayTheGame",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 92,
"src": "981:14:2",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
"typeString": "function (address)"
}
},
"id": 142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "981:26:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 143,
"nodeType": "EmitStatement",
"src": "976:31:2"
}
]
},
"documentation": null,
"id": 145,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "play",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 119,
"nodeType": "ParameterList",
"parameters": [],
"src": "852:2:2"
},
"payable": true,
"returnParameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [],
"src": "870:0:2"
},
"scope": 146,
"src": "839:173:2",
"stateMutability": "payable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 147,
"src": "520:494:2"
}
],
"src": "469:546:2"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {
"5786": {
"events": {},
"links": {},
"address": "0x119c7f04613e2d05407f6a6d188a7908d7dbc2d8",
"transactionHash": "0x7d2a99e9cb1c1de3f8c128f33cd98128b4fda1d7d4720bff300231d2f426d774"
},
"5787": {
"events": {},
"links": {},
"address": "0x119c7f04613e2d05407f6a6d188a7908d7dbc2d8",
"transactionHash": "0x43e7b44c34b1dcd9a426543f59330dd1b19f5eee5f7f23f67305766b364441aa"
}
},
"schemaVersion": "2.0.1",
"updatedAt": "2018-10-31T09:33:41.904Z"
}