kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
771 lines • 30.3 kB
JSON
{
"contractName": "GeneScienceMock",
"abi": [
{
"constant": true,
"inputs": [],
"name": "isGeneScience",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "genes1",
"type": "uint256"
},
{
"name": "genes2",
"type": "uint256"
}
],
"name": "mixGenes",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x60806040526000805460ff1916600117905534801561001d57600080fd5b5060dd8061002c6000396000f30060806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166354c15b828114604d5780638d8b1b88146073575b600080fd5b348015605857600080fd5b50605f609d565b604080519115158252519081900360200190f35b348015607e57600080fd5b50608b60043560243560a6565b60408051918252519081900360200190f35b60005460ff1681565b6002910104600101905600a165627a7a723058209bd39de8197b484ed1a95d3f974f130cfb12078280c55ddb1bf3c8f79b8b2fb40029",
"deployedBytecode": "0x60806040526004361060485763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166354c15b828114604d5780638d8b1b88146073575b600080fd5b348015605857600080fd5b50605f609d565b604080519115158252519081900360200190f35b348015607e57600080fd5b50608b60043560243560a6565b60408051918252519081900360200190f35b60005460ff1681565b6002910104600101905600a165627a7a723058209bd39de8197b484ed1a95d3f974f130cfb12078280c55ddb1bf3c8f79b8b2fb40029",
"sourceMap": "370:278:20:-;;;401:32;;;-1:-1:-1;;401:32:20;429:4;401:32;;;370:278;5:2:-1;;;;30:1;27;20:12;5:2;370:278:20;;;;;;;",
"deployedSourceMap": "370:278:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;401:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;401:32:20;;;;;;;;;;;;;;;;;;;;;;517:129;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;517:129:20;;;;;;;;;;;;;;;;;;;;;;;401:32;;;;;;:::o;517:129::-;633:1;616:15;;615:19;638:1;614:25;;517:129::o",
"source": "/**\n * @title A deterministic implementation of Breeding algo for tests\n * @author dapperlabs (https://github.com/dapperlabs) \n * This code was taken from https://github.com/dapperlabs at\n * https://github.com/dapperlabs/cryptokitties-bounty and is NOT kleros code.\n */\npragma solidity ^0.4.12;\n\n\n/// @title A deterministic implementation of Breeding algo for tests\ncontract GeneScienceMock {\n bool public isGeneScience = true;\n\n /// @dev given genes of kitten 1 & 2, return a silly genetic combination\n function mixGenes(uint256 genes1, uint256 genes2) public pure returns (uint256) {\n return ((genes1 + genes2)/2) + 1;\n }\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/CriptoKitties/GeneScienceMock.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/CriptoKitties/GeneScienceMock.sol",
"exportedSymbols": {
"GeneScienceMock": [
6478
]
},
"id": 6479,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6454,
"literals": [
"solidity",
"^",
"0.4",
".12"
],
"nodeType": "PragmaDirective",
"src": "274:24:20"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title A deterministic implementation of Breeding algo for tests",
"fullyImplemented": true,
"id": 6478,
"linearizedBaseContracts": [
6478
],
"name": "GeneScienceMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 6457,
"name": "isGeneScience",
"nodeType": "VariableDeclaration",
"scope": 6478,
"src": "401:32:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6455,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "401:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 6456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "429:4:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"visibility": "public"
},
{
"body": {
"id": 6476,
"nodeType": "Block",
"src": "597:49:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6466,
"name": "genes1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6459,
"src": "616:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 6467,
"name": "genes2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6461,
"src": "625:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "616:15:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6469,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "615:17:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 6470,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "633:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "615:19:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6472,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "614:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 6473,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "638:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "614:25:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6465,
"id": 6475,
"nodeType": "Return",
"src": "607:32:20"
}
]
},
"documentation": "@dev given genes of kitten 1 & 2, return a silly genetic combination",
"id": 6477,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "mixGenes",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6462,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6459,
"name": "genes1",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "535:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6458,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "535:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6461,
"name": "genes2",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "551:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6460,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "551:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "534:32:20"
},
"payable": false,
"returnParameters": {
"id": 6465,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6464,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "588:7:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6463,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "588:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "587:9:20"
},
"scope": 6478,
"src": "517:129:20",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
"scope": 6479,
"src": "370:278:20"
}
],
"src": "274:375:20"
},
"legacyAST": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/CriptoKitties/GeneScienceMock.sol",
"exportedSymbols": {
"GeneScienceMock": [
6478
]
},
"id": 6479,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6454,
"literals": [
"solidity",
"^",
"0.4",
".12"
],
"nodeType": "PragmaDirective",
"src": "274:24:20"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title A deterministic implementation of Breeding algo for tests",
"fullyImplemented": true,
"id": 6478,
"linearizedBaseContracts": [
6478
],
"name": "GeneScienceMock",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 6457,
"name": "isGeneScience",
"nodeType": "VariableDeclaration",
"scope": 6478,
"src": "401:32:20",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6455,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "401:4:20",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 6456,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "429:4:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"visibility": "public"
},
{
"body": {
"id": 6476,
"nodeType": "Block",
"src": "597:49:20",
"statements": [
{
"expression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6474,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6471,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6468,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 6466,
"name": "genes1",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6459,
"src": "616:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"id": 6467,
"name": "genes2",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6461,
"src": "625:6:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "616:15:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6469,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "615:17:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"argumentTypes": null,
"hexValue": "32",
"id": 6470,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "633:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "615:19:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6472,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "614:21:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 6473,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "638:1:20",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "614:25:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6465,
"id": 6475,
"nodeType": "Return",
"src": "607:32:20"
}
]
},
"documentation": "@dev given genes of kitten 1 & 2, return a silly genetic combination",
"id": 6477,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "mixGenes",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6462,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6459,
"name": "genes1",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "535:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6458,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "535:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 6461,
"name": "genes2",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "551:14:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6460,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "551:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "534:32:20"
},
"payable": false,
"returnParameters": {
"id": 6465,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6464,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 6477,
"src": "588:7:20",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 6463,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "588:7:20",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "587:9:20"
},
"scope": 6478,
"src": "517:129:20",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
}
],
"scope": 6479,
"src": "370:278:20"
}
],
"src": "274:375:20"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-11-02T14:04:10.981Z"
}