dc-protocol
Version:
Start ganache and deploy our contracts
724 lines • 266 kB
JSON
{
"contractName": "GameEngine",
"abi": [
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
}
],
"name": "hashGameData",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function",
"signature": "0xada3e210"
},
{
"constant": true,
"inputs": [],
"name": "signidice",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0xa12fa955"
},
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
},
{
"name": "_bets",
"type": "uint256[]"
}
],
"name": "checkGameData",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function",
"signature": "0xe1e48c38"
},
{
"inputs": [
{
"name": "_signidice",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor",
"signature": "constructor"
},
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
},
{
"name": "_bets",
"type": "uint256[]"
},
{
"name": "_randoms",
"type": "uint256[]"
}
],
"name": "game",
"outputs": [
{
"name": "",
"type": "int256[2]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0xf7413d30"
},
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
},
{
"name": "_bets",
"type": "uint256[]"
}
],
"name": "getProfit",
"outputs": [
{
"name": "_profit",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function",
"signature": "0x8119b5b2"
},
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
},
{
"name": "_bets",
"type": "uint256[]"
}
],
"name": "getPenatlty",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0xb7628d00"
},
{
"constant": true,
"inputs": [
{
"components": [
{
"name": "playerNumber",
"type": "uint256"
},
{
"name": "randomRanges",
"type": "uint256[2][]"
},
{
"name": "seed",
"type": "bytes32"
}
],
"name": "_gameData",
"type": "tuple"
},
{
"name": "_bets",
"type": "uint256[]"
},
{
"name": "_signature",
"type": "bytes"
}
],
"name": "resolveGame",
"outputs": [
{
"name": "",
"type": "int256[2]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x4b897dab"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50604051602080610e28833981018060405261002f9190810190610067565b60008054600160a060020a031916600160a060020a03929092169190911790556100aa565b60006100608251610099565b9392505050565b60006020828403121561007957600080fd5b60006100858484610054565b949350505050565b600160a060020a031690565b60006100a48261008d565b92915050565b610d6f806100b96000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635d40ddfe81146100875780638be2c0c3146100bd5780639ff1b6a7146100ea578063a12fa9551461010a578063c8c432a71461012c578063caa824f51461014c578063e63584471461016c575b600080fd5b34801561009357600080fd5b506100a76100a2366004610932565b610199565b6040516100b49190610bdd565b60405180910390f35b3480156100c957600080fd5b506100dd6100d8366004610894565b610285565b6040516100b49190610bf9565b3480156100f657600080fd5b506100a76101053660046109c6565b610368565b34801561011657600080fd5b5061011f610439565b6040516100b49190610c07565b34801561013857600080fd5b506100dd6101473660046108c9565b610455565b34801561015857600080fd5b506100dd6101673660046108c9565b61045e565b34801561017857600080fd5b5061018c6101873660046108c9565b6104d4565b6040516100b49190610beb565b6101a1610599565b6000806000806101b188886104d4565b15156101f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e990610c15565b60405180910390fd5b85600081518110151561020157fe5b602090810290910101518851909450841161022f57610220888861045e565b92505050600081900381610269565b86600081518110151561023e57fe5b90602001906020020151600003925086600081518110151561025c57fe5b9060200190602002015191505b5060408051808201909152918252602082015295945050505050565b6000816000015182602001518360400151604051602001808481526020018380516000925b818410156102ec57602080850284010151604080838360005b838110156102db5781810151838201526020016102c3565b5050505090500192600101926102aa565b9485525050604080518085038152602094850191829052805190965090945084938601925090508083835b602083106103365780518252601f199092019160209182019101610317565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b610370610599565b60005460208501516040517f6ee25e4c00000000000000000000000000000000000000000000000000000000815260609273ffffffffffffffffffffffffffffffffffffffff1691636ee25e4c916103cd91908790600401610bb8565b600060405180830381600087803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104239190810190610857565b9050610430858583610199565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b602a5b92915050565b81518151600091908290819085908290811061047657fe5b6020908102909101015191506104a861271061049c858161ffff8463ffffffff61053a16565b9063ffffffff61057016565b90506104ca826104be818463ffffffff61053a16565b9063ffffffff61058716565b9695505050505050565b600060018360200151511415806104ec575082516000115b806104f95750825161ffff105b80610524575068056bc75e2d6310000082600081518110151561051857fe5b90602001906020020151115b1561053157506000610458565b50600192915050565b60008083151561054d5760009150610569565b5082820282848281151561055d57fe5b041461056557fe5b8091505b5092915050565b600080828481151561057e57fe5b04949350505050565b60008282111561059357fe5b50900390565b60408051808201825290600290829080388339509192915050565b6000601f820183136105c557600080fd5b81356105d86105d382610c4c565b610c25565b915081818352602084019350602081019050838560408402820111156105fd57600080fd5b60005b8381101561062b57816106138882610635565b84525060209092019160409190910190600101610600565b5050505092915050565b6000601f8201831361064657600080fd5b60026106546105d382610c6d565b9150818385602084028201111561066a57600080fd5b60005b8381101561062b57816106808882610776565b845250602092830192919091019060010161066d565b6000601f820183136106a757600080fd5b81356106b56105d382610c4c565b915081818352602084019350602081019050838560208402820111156106da57600080fd5b60005b8381101561062b57816106f08882610776565b84525060209283019291909101906001016106dd565b6000601f8201831361071757600080fd5b81516107256105d382610c4c565b9150818183526020840193506020810190508385602084028201111561074a57600080fd5b60005b8381101561062b5781610760888261084b565b845250602092830192919091019060010161074d565b60006107828235610cb9565b9392505050565b6000601f8201831361079a57600080fd5b81356107a86105d382610c8b565b915080825260208301602083018583830111156107c457600080fd5b6107cf838284610cef565b50505092915050565b6000606082840312156107ea57600080fd5b6107f46060610c25565b905060006108028484610776565b825250602082013567ffffffffffffffff81111561081f57600080fd5b61082b848285016105b4565b602083015250604061083f84828501610776565b60408301525092915050565b60006107828251610cb9565b60006020828403121561086957600080fd5b815167ffffffffffffffff81111561088057600080fd5b61088c84828501610706565b949350505050565b6000602082840312156108a657600080fd5b813567ffffffffffffffff8111156108bd57600080fd5b61088c848285016107d8565b600080604083850312156108dc57600080fd5b823567ffffffffffffffff8111156108f357600080fd5b6108ff858286016107d8565b925050602083013567ffffffffffffffff81111561091c57600080fd5b61092885828601610696565b9150509250929050565b60008060006060848603121561094757600080fd5b833567ffffffffffffffff81111561095e57600080fd5b61096a868287016107d8565b935050602084013567ffffffffffffffff81111561098757600080fd5b61099386828701610696565b925050604084013567ffffffffffffffff8111156109b057600080fd5b6109bc86828701610696565b9150509250925092565b6000806000606084860312156109db57600080fd5b833567ffffffffffffffff8111156109f257600080fd5b6109fe868287016107d8565b935050602084013567ffffffffffffffff811115610a1b57600080fd5b610a2786828701610696565b925050604084013567ffffffffffffffff811115610a4457600080fd5b6109bc86828701610789565b6000610a5b82610cbc565b808452602084019350610a6d83610cb3565b60005b82811015610a9d57610a83868351610af0565b610a8c82610cb3565b604096909601959150600101610a70565b5093949350505050565b610ab081610cc0565b610ab982610cb9565b60005b82811015610ae957610acf858351610b41565b610ad882610cb3565b602095909501949150600101610abc565b5050505050565b610af981610cc0565b610b0282610cb9565b60005b82811015610ae957610b18858351610b41565b610b2182610cb3565b602095909501949150600101610b05565b610b3b81610cdf565b82525050565b610b3b81610cb9565b6000610b5582610cbc565b808452610b69816020860160208601610cfb565b610b7281610d2b565b9093016020019392505050565b610b3b81610ce4565b601181527f696e76616c69642067616d652064617461000000000000000000000000000000602082015260400190565b60408082528101610bc98185610a50565b9050818103602083015261088c8184610b4a565b604081016104588284610aa7565b602081016104588284610b32565b602081016104588284610b41565b602081016104588284610b7f565b6020808252810161045881610b88565b60405181810167ffffffffffffffff81118282101715610c4457600080fd5b604052919050565b600067ffffffffffffffff821115610c6357600080fd5b5060209081020190565b600067ffffffffffffffff821115610c8457600080fd5b5060200290565b600067ffffffffffffffff821115610ca257600080fd5b506020601f91909101601f19160190565b60200190565b90565b5190565b50600290565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b600061045882610cc6565b82818337506000910152565b60005b83811015610d16578181015183820152602001610cfe565b83811115610d25576000848401525b50505050565b601f01601f1916905600a265627a7a72305820b6c134d9e29ce9be700cf1018d90ac1f83861688cd4d6dceba7e11d0b8c5c36e6c6578706572696d656e74616cf50037",
"deployedBytecode": "0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635d40ddfe81146100875780638be2c0c3146100bd5780639ff1b6a7146100ea578063a12fa9551461010a578063c8c432a71461012c578063caa824f51461014c578063e63584471461016c575b600080fd5b34801561009357600080fd5b506100a76100a2366004610932565b610199565b6040516100b49190610bdd565b60405180910390f35b3480156100c957600080fd5b506100dd6100d8366004610894565b610285565b6040516100b49190610bf9565b3480156100f657600080fd5b506100a76101053660046109c6565b610368565b34801561011657600080fd5b5061011f610439565b6040516100b49190610c07565b34801561013857600080fd5b506100dd6101473660046108c9565b610455565b34801561015857600080fd5b506100dd6101673660046108c9565b61045e565b34801561017857600080fd5b5061018c6101873660046108c9565b6104d4565b6040516100b49190610beb565b6101a1610599565b6000806000806101b188886104d4565b15156101f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e990610c15565b60405180910390fd5b85600081518110151561020157fe5b602090810290910101518851909450841161022f57610220888861045e565b92505050600081900381610269565b86600081518110151561023e57fe5b90602001906020020151600003925086600081518110151561025c57fe5b9060200190602002015191505b5060408051808201909152918252602082015295945050505050565b6000816000015182602001518360400151604051602001808481526020018380516000925b818410156102ec57602080850284010151604080838360005b838110156102db5781810151838201526020016102c3565b5050505090500192600101926102aa565b9485525050604080518085038152602094850191829052805190965090945084938601925090508083835b602083106103365780518252601f199092019160209182019101610317565b5181516020939093036101000a6000190180199091169216919091179052604051920182900390912095945050505050565b610370610599565b60005460208501516040517f6ee25e4c00000000000000000000000000000000000000000000000000000000815260609273ffffffffffffffffffffffffffffffffffffffff1691636ee25e4c916103cd91908790600401610bb8565b600060405180830381600087803b1580156103e757600080fd5b505af11580156103fb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104239190810190610857565b9050610430858583610199565b95945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b602a5b92915050565b81518151600091908290819085908290811061047657fe5b6020908102909101015191506104a861271061049c858161ffff8463ffffffff61053a16565b9063ffffffff61057016565b90506104ca826104be818463ffffffff61053a16565b9063ffffffff61058716565b9695505050505050565b600060018360200151511415806104ec575082516000115b806104f95750825161ffff105b80610524575068056bc75e2d6310000082600081518110151561051857fe5b90602001906020020151115b1561053157506000610458565b50600192915050565b60008083151561054d5760009150610569565b5082820282848281151561055d57fe5b041461056557fe5b8091505b5092915050565b600080828481151561057e57fe5b04949350505050565b60008282111561059357fe5b50900390565b60408051808201825290600290829080388339509192915050565b6000601f820183136105c557600080fd5b81356105d86105d382610c4c565b610c25565b915081818352602084019350602081019050838560408402820111156105fd57600080fd5b60005b8381101561062b57816106138882610635565b84525060209092019160409190910190600101610600565b5050505092915050565b6000601f8201831361064657600080fd5b60026106546105d382610c6d565b9150818385602084028201111561066a57600080fd5b60005b8381101561062b57816106808882610776565b845250602092830192919091019060010161066d565b6000601f820183136106a757600080fd5b81356106b56105d382610c4c565b915081818352602084019350602081019050838560208402820111156106da57600080fd5b60005b8381101561062b57816106f08882610776565b84525060209283019291909101906001016106dd565b6000601f8201831361071757600080fd5b81516107256105d382610c4c565b9150818183526020840193506020810190508385602084028201111561074a57600080fd5b60005b8381101561062b5781610760888261084b565b845250602092830192919091019060010161074d565b60006107828235610cb9565b9392505050565b6000601f8201831361079a57600080fd5b81356107a86105d382610c8b565b915080825260208301602083018583830111156107c457600080fd5b6107cf838284610cef565b50505092915050565b6000606082840312156107ea57600080fd5b6107f46060610c25565b905060006108028484610776565b825250602082013567ffffffffffffffff81111561081f57600080fd5b61082b848285016105b4565b602083015250604061083f84828501610776565b60408301525092915050565b60006107828251610cb9565b60006020828403121561086957600080fd5b815167ffffffffffffffff81111561088057600080fd5b61088c84828501610706565b949350505050565b6000602082840312156108a657600080fd5b813567ffffffffffffffff8111156108bd57600080fd5b61088c848285016107d8565b600080604083850312156108dc57600080fd5b823567ffffffffffffffff8111156108f357600080fd5b6108ff858286016107d8565b925050602083013567ffffffffffffffff81111561091c57600080fd5b61092885828601610696565b9150509250929050565b60008060006060848603121561094757600080fd5b833567ffffffffffffffff81111561095e57600080fd5b61096a868287016107d8565b935050602084013567ffffffffffffffff81111561098757600080fd5b61099386828701610696565b925050604084013567ffffffffffffffff8111156109b057600080fd5b6109bc86828701610696565b9150509250925092565b6000806000606084860312156109db57600080fd5b833567ffffffffffffffff8111156109f257600080fd5b6109fe868287016107d8565b935050602084013567ffffffffffffffff811115610a1b57600080fd5b610a2786828701610696565b925050604084013567ffffffffffffffff811115610a4457600080fd5b6109bc86828701610789565b6000610a5b82610cbc565b808452602084019350610a6d83610cb3565b60005b82811015610a9d57610a83868351610af0565b610a8c82610cb3565b604096909601959150600101610a70565b5093949350505050565b610ab081610cc0565b610ab982610cb9565b60005b82811015610ae957610acf858351610b41565b610ad882610cb3565b602095909501949150600101610abc565b5050505050565b610af981610cc0565b610b0282610cb9565b60005b82811015610ae957610b18858351610b41565b610b2182610cb3565b602095909501949150600101610b05565b610b3b81610cdf565b82525050565b610b3b81610cb9565b6000610b5582610cbc565b808452610b69816020860160208601610cfb565b610b7281610d2b565b9093016020019392505050565b610b3b81610ce4565b601181527f696e76616c69642067616d652064617461000000000000000000000000000000602082015260400190565b60408082528101610bc98185610a50565b9050818103602083015261088c8184610b4a565b604081016104588284610aa7565b602081016104588284610b32565b602081016104588284610b41565b602081016104588284610b7f565b6020808252810161045881610b88565b60405181810167ffffffffffffffff81118282101715610c4457600080fd5b604052919050565b600067ffffffffffffffff821115610c6357600080fd5b5060209081020190565b600067ffffffffffffffff821115610c8457600080fd5b5060200290565b600067ffffffffffffffff821115610ca257600080fd5b506020601f91909101601f19160190565b60200190565b90565b5190565b50600290565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b600061045882610cc6565b82818337506000910152565b60005b83811015610d16578181015183820152602001610cfe565b83811115610d25576000848401525b50505050565b601f01601f1916905600a265627a7a72305820b6c134d9e29ce9be700cf1018d90ac1f83861688cd4d6dceba7e11d0b8c5c36e6c6578706572696d656e74616cf50037",
"sourceMap": "234:1653:2:-;;;343:94;8:9:-1;5:2;;;30:1;27;20:12;5:2;343:94:2;;;;;;;;;;;;;;;;;;;;;;396:9;:34;;-1:-1:-1;;;;;;396:34:2;-1:-1:-1;;;;;396:34:2;;;;;;;;;;234:1653;;5:160:-1;;102:58;152:6;146:13;102:58;;;93:67;87:78;-1:-1;;;87:78;172:301;;306:2;294:9;285:7;281:23;277:32;274:2;;;322:1;319;312:12;274:2;357:1;374:83;449:7;429:9;374:83;;;364:93;268:205;-1:-1;;;;268:205;480:128;-1:-1;;;;;549:54;;532:76;615:124;;703:31;728:5;703:31;;;692:42;686:53;-1:-1;;686:53;;234:1653:2;;;;;;",
"deployedSourceMap": "234:1653:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;443:747;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;443:747:2;;;;;;;;;;;;;;;;;;;;;;;;;327:268:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;327:268:3;;;;;;;;;;;;;;;;;1626:258:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1626:258:2;;;;;;;;;309:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;309:27:2;;;;;;;;;;;;1501:119;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1501:119:2;;;;;;;;;1196:299;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1196:299:2;;;;;;;;;601:379:3;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;601:379:3;;;;;;;;;;;;;;;;;443:747:2;535:9;;:::i;:::-;636:20;681:19;711:23;838:14;564:31;578:9;589:5;564:13;:31::i;:::-;556:61;;;;;;;;;;;;;;;;;;;;;;;;659:8;668:1;659:11;;;;;;;;;;;;;;;;;;;757:22;;659:11;;-1:-1:-1;757:38:2;-1:-1:-1;753:381:2;;855:27;865:9;876:5;855:9;:27::i;:::-;838:44;-1:-1:-1;;;964:15:2;;;;838:44;753:381;;;1064:5;1070:1;1064:8;;;;;;;;;;;;;;;;;;1056:17;;1037:36;;1114:5;1120:1;1114:8;;;;;;;;;;;;;;;;;;1087:36;;753:381;-1:-1:-1;1143:40:2;;;;;;;;;;;;;;;;;443:747;-1:-1:-1;;;;;443:747:2:o;327:268:3:-;389:7;491:9;:22;;;527:9;:22;;;563:9;:14;;;425:162;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;425:162:3;;;;;;;;;;;;;;;;-1:-1:-1;;425:162:3;;;26:21:-1;;;6:49;;425:162:3;;;;;;;;415:173;;425:162;;-1:-1:-1;425:162:3;;-1:-1:-1;425:162:3;;415:173;;;-1:-1:-1;415:173:3;-1:-1:-1;415:173:3;425:162;415:173;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;415:173:3;;;;;;;;;;;;-1:-1:-1;;;;;327:268:3:o;1626:258:2:-;1722:9;;:::i;:::-;1771;;1793:22;;;;1771:57;;;;;1743:25;;1771:9;;;:21;;:57;;1793:22;1817:10;;1771:57;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1771:57:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1771:57:2;;;;;;39:16:-1;36:1;17:17;2:54;101:4;1771:57:2;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;1771:57:2;;;;;;;;;1743:85;;1845:32;1850:9;1861:5;1868:8;1845:4;:32::i;:::-;1838:39;1626:258;-1:-1:-1;;;;;1626:258:2:o;309:27::-;;;;;;:::o;1501:119::-;1610:2;1501:119;;;;;:::o;1196:299::-;1320:22;;1364:8;;1272:15;;1320:22;1272:15;;;;1364:5;;1272:15;;1364:8;;;;;;;;;;;;;;;;-1:-1:-1;1392:54:2;1440:5;1393:41;1420:13;1393:41;1398:5;1440;1393:22;:15;:22;:::i;:::-;:26;:41;:26;:41;:::i;1392:54::-;1382:64;-1:-1:-1;1466:22:2;1483:4;1466:12;1483:4;1382:64;1466:12;:8;:12;:::i;:::-;:16;:22;:16;:22;:::i;:::-;1456:32;1196:299;-1:-1:-1;;;;;;1196:299:2:o;601:379:3:-;679:4;750:1;712:9;:22;;;:29;:40;;:88;;;-1:-1:-1;768:22:3;;798:1;-1:-1:-1;712:88:3;:149;;;-1:-1:-1;825:22:3;;855:5;-1:-1:-1;712:149:3;:189;;;;892:9;881:5;887:1;881:8;;;;;;;;;;;;;;;;;;:20;712:189;695:258;;;-1:-1:-1;937:5:3;930:12;;695:258;-1:-1:-1;969:4:3;601:379;;;;:::o;236:173:11:-;294:7;;313:6;;309:35;;;336:1;329:8;;;;309:35;-1:-1:-1;361:5:11;;;365:1;361;:5;379;;;;;;;;:10;372:18;;;;403:1;396:8;;236:173;;;;;;:::o;489:265::-;547:7;636:9;652:1;648;:5;;;;;;;;;489:265;-1:-1:-1;;;;489:265:11:o;865:110::-;923:7;945:6;;;;938:14;;;;-1:-1:-1;965:5:11;;;865:110::o;234:1653:2:-;;;;;;;;;;;;;;;105:10:-1;234:1653:2;88:34:-1;-1:-1;234:1653:2;;;-1:-1:-1;;234:1653:2:o;26:756:-1:-;;151:4;139:17;;135:27;-1:-1;125:2;;176:1;173;166:12;125:2;213:6;200:20;235:95;250:79;322:6;250:79;;;235:95;;;226:104;;347:5;372:6;365:5;358:21;402:4;394:6;390:17;380:27;;424:4;419:3;415:14;408:21;;477:6;524:3;516:4;508:6;504:17;499:3;495:27;492:36;489:2;;;541:1;538;531:12;489:2;566:1;551:225;576:6;573:1;570:13;551:225;;;634:3;656:56;708:3;696:10;656:56;;;644:69;;-1:-1;736:4;727:14;;;;764:4;755:14;;;;;598:1;591:9;551:225;;;555:14;118:664;;;;;;;;809:607;;913:4;901:17;;897:27;-1:-1;887:2;;938:1;935;928:12;887:2;962:3;980:74;995:58;1046:6;995:58;;980:74;971:83;;1071:5;1130:6;1177:3;1169:4;1161:6;1157:17;1152:3;1148:27;1145:36;1142:2;;;1194:1;1191;1184:12;1142:2;1219:1;1204:206;1229:6;1226:1;1223:13;1204:206;;;1287:3;1309:37;1342:3;1330:10;1309:37;;;1297:50;;-1:-1;1370:4;1361:14;;;;1389;;;;;1251:1;1244:9;1204:206;;1442:707;;1552:4;1540:17;;1536:27;-1:-1;1526:2;;1577:1;1574;1567:12;1526:2;1614:6;1601:20;1636:80;1651:64;1708:6;1651:64;;1636:80;1627:89;;1733:5;1758:6;1751:5;1744:21;1788:4;1780:6;1776:17;1766:27;;1810:4;1805:3;1801:14;1794:21;;1863:6;1910:3;1902:4;1894:6;1890:17;1885:3;1881:27;1878:36;1875:2;;;1927:1;1924;1917:12;1875:2;1952:1;1937:206;1962:6;1959:1;1956:13;1937:206;;;2020:3;2042:37;2075:3;2063:10;2042:37;;;2030:50;;-1:-1;2103:4;2094:14;;;;2122;;;;;1984:1;1977:9;1937:206;;2175:722;;2296:4;2284:17;;2280:27;-1:-1;2270:2;;2321:1;2318;2311:12;2270:2;2351:6;2345:13;2373:80;2388:64;2445:6;2388:64;;2373:80;2364:89;;2470:5;2495:6;2488:5;2481:21;2525:4;2517:6;2513:17;2503:27;;2547:4;2542:3;2538:14;2531:21;;2600:6;2647:3;2639:4;2631:6;2627:17;2622:3;2618:27;2615:36;2612:2;;;2664:1;2661;2654:12;2612:2;2689:1;2674:217;2699:6;2696:1;2693:13;2674:217;;;2757:3;2779:48;2823:3;2811:10;2779:48;;;2767:61;;-1:-1;2851:4;2842:14;;;;2870;;;;;2721:1;2714:9;2674:217;;2905:118;;2972:46;3010:6;2997:20;2972:46;;;2963:55;2957:66;-1:-1;;;2957:66;3031:440;;3125:4;3113:17;;3109:27;-1:-1;3099:2;;3150:1;3147;3140:12;3099:2;3187:6;3174:20;3209:64;3224:48;3265:6;3224:48;;3209:64;3200:73;;3293:6;3286:5;3279:21;3329:4;3321:6;3317:17;3362:4;3355:5;3351:16;3397:3;3388:6;3383:3;3379:16;3376:25;3373:2;;;3414:1;3411;3404:12;3373:2;3424:41;3458:6;3453:3;3448;3424:41;;;3092:379;;;;;;;;3512:752;;3626:4;3614:9;3609:3;3605:19;3601:30;3598:2;;;3644:1;3641;3634:12;3598:2;3662:20;3677:4;3662:20;;;3653:29;-1:-1;3740:1;3771:49;3816:3;3796:9;3771:49;;;3747:74;;-1:-1;3918:2;3903:18;;3890:32;3942:18;3931:30;;3928:2;;;3974:1;3971;3964:12;3928:2;4009:89;4094:3;4085:6;4074:9;4070:22;4009:89;;;4002:4;3995:5;3991:16;3984:115;3842:268;4160:2;4193:49;4238:3;4229:6;4218:9;4214:22;4193:49;;;4186:4;4179:5;4175:16;4168:75;4120:134;3592:672;;;;;4396:122;;4474:39;4505:6;4499:13;4474:39;;4525:392;;4665:2;4653:9;4644:7;4640:23;4636:32;4633:2;;;4681:1;4678;4671:12;4633:2;4716:24;;4760:18;4749:30;;4746:2;;;4792:1;4789;4782:12;4746:2;4812:89;4893:7;4884:6;4873:9;4869:22;4812:89;;;4802:99;4627:290;-1:-1;;;;4627:290;4924:377;;5053:2;5041:9;5032:7;5028:23;5024:32;5021:2;;;5069:1;5066;5059:12;5021:2;5104:31;;5155:18;5144:30;;5141:2;;;5187:1;5184;5177:12;5141:2;5207:78;5277:7;5268:6;5257:9;5253:22;5207:78;;5308:638;;;5479:2;5467:9;5458:7;5454:23;5450:32;5447:2;;;5495:1;5492;5485:12;5447:2;5530:31;;5581:18;5570:30;;5567:2;;;5613:1;5610;5603:12;5567:2;5633:78;5703:7;5694:6;5683:9;5679:22;5633:78;;;5623:88;;5509:208;5776:2;5765:9;5761:18;5748:32;5800:18;5792:6;5789:30;5786:2;;;5832:1;5829;5822:12;5786:2;5852:78;5922:7;5913:6;5902:9;5898:22;5852:78;;;5842:88;;5727:209;5441:505;;;;;;5953:899;;;;6166:2;6154:9;6145:7;6141:23;6137:32;6134:2;;;6182:1;6179;6172:12;6134:2;6217:31;;6268:18;6257:30;;6254:2;;;6300:1;6297;6290:12;6254:2;6320:78;6390:7;6381:6;6370:9;6366:22;6320:78;;;6310:88;;6196:208;6463:2;6452:9;6448:18;6435:32;6487:18;6479:6;6476:30;6473:2;;;6519:1;6516;6509:12;6473:2;6539:78;6609:7;6600:6;6589:9;6585:22;6539:78;;;6529:88;;6414:209;6682:2;6671:9;6667:18;6654:32;6706:18;6698:6;6695:30;6692:2;;;6738:1;6735;6728:12;6692:2;6758:78;6828:7;6819:6;6808:9;6804:22;6758:78;;;6748:88;;6633:209;6128:724;;;;;;6859:867;;;;7056:2;7044:9;7035:7;7031:23;7027:32;7024:2;;;7072:1;7069;7062:12;7024:2;7107:31;;7158:18;7147:30;;7144:2;;;7190:1;7187;7180:12;7144:2;7210:78;7280:7;7271:6;7260:9;7256:22;7210:78;;;7200:88;;7086:208;7353:2;7342:9;7338:18;7325:32;7377:18;7369:6;7366:30;7363:2;;;7409:1;7406;7399:12;7363:2;7429:78;7499:7;7490:6;7479:9;7475:22;7429:78;;;7419:88;;7304:209;7572:2;7561:9;7557:18;7544:32;7596:18;7588:6;7585:30;7582:2;;;7628:1;7625;7618:12;7582:2;7648:62;7702:7;7693:6;7682:9;7678:22;7648:62;;7770:711;;7939:69;8002:5;7939:69;;;8026:6;8021:3;8014:19;8050:4;8045:3;8041:14;8034:21;;8095:71;8160:5;8095:71;;;8187:1;8172:287;8197:6;8194:1;8191:13;8172:287;;;8237:95;8328:3;8319:6;8313:13;8237:95;;;8349:75;8417:6;8349:75;;;8447:4;8438:14;;;;;8339:85;-1:-1;8219:1;8212:9;8172:287;;;-1:-1;8472:3;;7918:563;-1:-1;;;;7918:563;8520:514;8641:51;8686:5;8641:51;;;8738:53;8785:5;8738:53;;;8812:1;8797:225;8822:6;8819:1;8816:13;8797:225;;;8862:51;8909:3;8900:6;8894:13;8862:51;;;8930:57;8980:6;8930:57;;;9010:4;9001:14;;;;;8920:67;-1:-1;8844:1;8837:9;8797:225;;;8801:14;8620:414;;;;;9075:505;9194:48;9236:5;9194:48;;;9288:50;9332:5;9288:50;;;9359:1;9344:224;9369:6;9366:1;9363:13;9344:224;;;9409:53;9458:3;9449:6;9443:13;9409:53;;;9479:54;9526:6;9479:54;;;9556:4;9547:14;;;;;9469:64;-1:-1;9391:1;9384:9;9344:224;;9588:101;9655:28;9677:5;9655:28;;;9650:3;9643:41;9637:52;;;9696:110;9769:31;9794:5;9769:31;;9813:297;;9913:38;9945:5;9913:38;;;9968:6;9963:3;9956:19;9980:63;10036:6;10029:4;10024:3;10020:14;10013:4;10006:5;10002:16;9980:63;;;10075:29;10097:6;10075:29;;;10055:50;;;10068:4;10055:50;;9893:217;-1:-1;;;9893:217;10117:154;10209:56;10259:5;10209:56;;10393:296;10548:2;10536:15;;10585:66;10580:2;10571:12;;10564:88;10680:2;10671:12;;10529:160;10814:594;11052:2;11066:47;;;11037:18;;11127:132;11037:18;11245:6;11127:132;;;11119:140;;11307:9;11301:4;11297:20;11292:2;11281:9;11277:18;11270:48;11332:66;11393:4;11384:6;11332:66;;11415:281;11567:2;11552:18;;11581:105;11556:9;11659:6;11581:105;;11703:181;11805:2;11790:18;;11819:55;11794:9;11847:6;11819:55;;11891:193;11999:2;11984:18;;12013:61;11988:9;12047:6;12013:61;;12091:231;12218:2;12203:18;;12232:80;12207:9;12285:6;12232:80;;12329:387;12510:2;12524:47;;;12495:18;;12585:121;12495:18;12585:121;;12923:256;12985:2;12979:9;13011:17;;;13086:18;13071:34;;13107:22;;;13068:62;13065:2;;;13143:1;13140;13133:12;13065:2;13159;13152:22;12963:216;;-1:-1;12963:216;13186:273;;13360:18;13352:6;13349:30;13346:2;;;13392:1;13389;13382:12;13346:2;-1:-1;13421:4;13409:17;;;13439:15;;13283:176;13466:229;;13619:18;13611:6;13608:30;13605:2;;;13651:1;13648;13641:12;13605:2;-1:-1;13680:4;13668:17;;13542:153;13967:258;;14110:18;14102:6;14099:30;14096:2;;;14142:1;14139;14132:12;14096:2;-1:-1;14215:4;14186;14163:17;;;;-1:-1;;14159:33;14205:15;;14033:192;14234:136;14358:4;14346:17;;14327:43;14381:107;14475:6;14456:32;14612:122;14717:12;;14701:33;14741:95;-1:-1;14828:3;;14812:24;15439:128;15519:42;15508:54;;15491:76;15574:92;15647:13;15640:21;;15623:43;16102:134;;16200:31;16225:5;16200:31;;16244:145;16325:6;16320:3;16315;16302:30;-1:-1;16381:1;16363:16;;16356:27;16295:94;16398:268;16463:1;16470:101;16484:6;16481:1;16478:13;16470:101;;;16551:11;;;16545:18;16532:11;;;16525:39;16506:2;16499:10;16470:101;;;16586:6;16583:1;16580:13;16577:2;;;16651:1;16642:6;16637:3;16633:16;16626:27;16577:2;16447:219;;;;;16674:97;16762:2;16742:14;-1:-1;;16738:28;;16722:49",
"source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\nimport '../library/SafeMath.sol';\nimport './GameObject.sol';\nimport {ISignidice } from '../interfaces/Interfaces.sol';\n\n/**\n* @title Dice game\n* @dev Example of dice game\n*/\ncontract GameEngine is GameObject {\n\n using SafeMath for uint;\n \n ISignidice public signidice;\n\n constructor (ISignidice _signidice) public {\n signidice = ISignidice(_signidice);\n }\n\n function game(gameData _gameData, uint256[] _bets, uint256[] _randoms) public view returns (int256[2]) {\n require(checkGameData(_gameData, _bets), 'invalid game data');\n \n uint256 randomNumber = _randoms[0];\n int256 playerProfit;\n int256 bankrollerProfit;\n \n if (_gameData.playerNumber >= randomNumber) {\n // player win \n uint256 profit = getProfit(_gameData, _bets); \n playerProfit = int256(profit);\n bankrollerProfit = -int256(profit);\n } else {\n // player lose\n playerProfit = -int256(_bets[0]);\n bankrollerProfit = int256(_bets[0]);\n }\n return([playerProfit, bankrollerProfit]);\n }\n\n function getProfit(gameData _gameData, uint256[] _bets) public pure returns(uint256 _profit) {\n uint _playerNumber = _gameData.playerNumber;\n uint _bet = _bets[0];\n uint _k = (uint(65535).mul(10000).div(_playerNumber)).div(10000);\n _profit = _bet.mul(_k).sub(_bet);\n }\n\n function getPenatlty(gameData _gameData, uint256[] _bets) public view returns(uint256) {\n return uint(42);\n }\n\n function resolveGame(gameData _gameData, uint256[] _bets, bytes _signature) public view returns(int256[2]) {\n uint256[] memory _randoms = signidice.generateRnd(_gameData.randomRanges, _signature);\n return game(_gameData, _bets, _randoms);\n }\n\n}\n",
"sourcePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/game/GameEngine.sol",
"ast": {
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/game/GameEngine.sol",
"exportedSymbols": {
"GameEngine": [
284
]
},
"id": 285,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 79,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:2"
},
{
"id": 80,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "25:33:2"
},
{
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/library/SafeMath.sol",
"file": "../library/SafeMath.sol",
"id": 81,
"nodeType": "ImportDirective",
"scope": 285,
"sourceUnit": 1928,
"src": "60:33:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/game/GameObject.sol",
"file": "./GameObject.sol",
"id": 82,
"nodeType": "ImportDirective",
"scope": 285,
"sourceUnit": 363,
"src": "94:26:2",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/interfaces/Interfaces.sol",
"file": "../interfaces/Interfaces.sol",
"id": 84,
"nodeType": "ImportDirective",
"scope": 285,
"sourceUnit": 1830,
"src": "121:57:2",
"symbolAliases": [
{
"foreign": 83,
"local": null
}
],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 85,
"name": "GameObject",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 362,
"src": "257:10:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_GameObject_$362",
"typeString": "contract GameObject"
}
},
"id": 86,
"nodeType": "InheritanceSpecifier",
"src": "257:10:2"
}
],
"contractDependencies": [
362
],
"contractKind": "contract",
"documentation": "@title Dice game\n@dev Example of dice game",
"fullyImplemented": true,
"id": 284,
"linearizedBaseContracts": [
284,
362
],
"name": "GameEngine",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 89,
"libraryName": {
"contractScope": null,
"id": 87,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1927,
"src": "281:8:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$1927",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "275:24:2",
"typeName": {
"id": 88,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "294:4:2",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"id": 91,
"name": "signidice",
"nodeType": "VariableDeclaration",
"scope": 284,
"src": "309:27:2",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
},
"typeName": {
"contractScope": null,
"id": 90,
"name": "ISignidice",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1785,
"src": "309:10:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 102,
"nodeType": "Block",
"src": "386:51:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 100,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 96,
"name": "signidice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 91,
"src": "396:9:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 98,
"name": "_signidice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 93,
"src": "419:10:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
],
"id": 97,
"name": "ISignidice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1785,
"src": "408:10:2",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_ISignidice_$1785_$",
"typeString": "type(contract ISignidice)"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "408:22:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
},
"src": "396:34:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
},
"id": 101,
"nodeType": "ExpressionStatement",
"src": "396:34:2"
}
]
},
"documentation": null,
"id": 103,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 94,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 93,
"name": "_signidice",
"nodeType": "VariableDeclaration",
"scope": 103,
"src": "356:21:2",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
},
"typeName": {
"contractScope": null,
"id": 92,
"name": "ISignidice",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1785,
"src": "356:10:2",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ISignidice_$1785",
"typeString": "contract ISignidice"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "355:23:2"
},
"payable": false,
"returnParameters": {
"id": 95,
"nodeType": "ParameterList",
"parameters": [],
"src": "386:0:2"
},
"scope": 284,
"src": "343:94:2",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 187,
"nodeType": "Block",
"src": "546:644:2",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 120,
"name": "_gameData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 105,
"src": "578:9:2",
"typeDescriptions": {
"typeIdentifier": "t_struct$_gameData_$297_memory_ptr",
"typeString": "struct GameObject.gameData memory"
}
},
{
"argumentTypes": null,
"id": 121,
"name": "_bets",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 108,
"src": "589:5:2",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_gameData_$297_memory_ptr",
"typeString": "struct GameObject.gameData memory"
},
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[] memory"
}
],
"id": 119,
"name": "checkGameData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 361,
"src": "564:13:2",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_gameData_$297_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_bool_$",
"typeString": "function (struct GameObject.gameData memory,uint256[] memory) pure returns (bool)"
}
},
"id": 122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "564:31:2",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "696e76616c69642067616d652064617461",
"id": 123,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "597:19:2",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1ee0ea4ec70f4c83639f4896d78eb971ffd7c822df662d0597f4b268394124de",
"typeString": "literal_string \"invalid game data\""
},
"value": "invalid game data"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1ee0ea4ec70f4c83639f4896d78eb971ffd7c822df662d0597f4b268394124de",
"typeString": "literal_string \"invalid game data\""
}
],
"id": 118,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
3280,
3281
],
"referencedDeclaration": 3281,
"src": "556:7:2",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "556:61:2",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 125,
"nodeType": "ExpressionStatement",
"src": "556:61:2"
},
{
"assignments": [
127
],
"declarations": [
{
"constant": false,
"id": 127,
"name": "randomNumber",
"nodeType": "VariableDeclaration",
"scope": 188,
"src": "636:20:2",
"stateVariable": false