@josojo/tokenized-events
Version:
tokenized events for pm markets
969 lines • 32.5 kB
JSON
{
"contractName": "MarketMaker",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "market",
"type": "address"
},
{
"name": "outcomeTokenIndex",
"type": "uint8"
},
{
"name": "outcomeTokenCount",
"type": "uint256"
}
],
"name": "calcCost",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "market",
"type": "address"
},
{
"name": "outcomeTokenIndex",
"type": "uint8"
},
{
"name": "outcomeTokenCount",
"type": "uint256"
}
],
"name": "calcProfit",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "market",
"type": "address"
},
{
"name": "outcomeTokenIndex",
"type": "uint8"
}
],
"name": "calcMarginalPrice",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.15;\nimport \"./Market.sol\";\n\n\n/// @title Abstract market maker contract - Functions to be implemented by market maker contracts\ncontract MarketMaker {\n\n /*\n * Public functions\n */\n function calcCost(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public constant returns (uint);\n function calcProfit(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public constant returns (uint);\n function calcMarginalPrice(Market market, uint8 outcomeTokenIndex) public constant returns (uint);\n}\n",
"sourcePath": "/home/josojo/reality/tokenized-events/contracts/Market/MarketMaker.sol",
"ast": {
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Market/MarketMaker.sol",
"exportedSymbols": {
"MarketMaker": [
920
]
},
"id": 921,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 887,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Market/Market.sol",
"file": "./Market.sol",
"id": 888,
"nodeType": "ImportDirective",
"scope": 921,
"sourceUnit": 886,
"src": "25:22:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Abstract market maker contract - Functions to be implemented by market maker contracts",
"fullyImplemented": false,
"id": 920,
"linearizedBaseContracts": [
920
],
"name": "MarketMaker",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 899,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcCost",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 895,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 890,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "234:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 889,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "234:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 892,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "249:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 891,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "249:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 894,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "274:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 893,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "274:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "233:64:3"
},
"payable": false,
"returnParameters": {
"id": 898,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 897,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "323:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 896,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "323:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "322:6:3"
},
"scope": 920,
"src": "216:113:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 910,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcProfit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 906,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 901,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "354:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 900,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "354:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 903,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "369:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 902,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "369:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 905,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "394:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 904,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "394:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "353:64:3"
},
"payable": false,
"returnParameters": {
"id": 909,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 908,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "443:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 907,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "443:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "442:6:3"
},
"scope": 920,
"src": "334:115:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 919,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcMarginalPrice",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 915,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 912,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "481:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 911,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "481:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 914,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "496:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 913,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "496:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:40:3"
},
"payable": false,
"returnParameters": {
"id": 918,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 917,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "546:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 916,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "546:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "545:6:3"
},
"scope": 920,
"src": "454:98:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 921,
"src": "148:406:3"
}
],
"src": "0:555:3"
},
"legacyAST": {
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Market/MarketMaker.sol",
"exportedSymbols": {
"MarketMaker": [
920
]
},
"id": 921,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 887,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:3"
},
{
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Market/Market.sol",
"file": "./Market.sol",
"id": 888,
"nodeType": "ImportDirective",
"scope": 921,
"sourceUnit": 886,
"src": "25:22:3",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title Abstract market maker contract - Functions to be implemented by market maker contracts",
"fullyImplemented": false,
"id": 920,
"linearizedBaseContracts": [
920
],
"name": "MarketMaker",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 899,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcCost",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 895,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 890,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "234:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 889,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "234:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 892,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "249:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 891,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "249:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 894,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "274:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 893,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "274:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "233:64:3"
},
"payable": false,
"returnParameters": {
"id": 898,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 897,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 899,
"src": "323:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 896,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "323:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "322:6:3"
},
"scope": 920,
"src": "216:113:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 910,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcProfit",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 906,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 901,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "354:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 900,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "354:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 903,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "369:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 902,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "369:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 905,
"name": "outcomeTokenCount",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "394:22:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 904,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "394:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "353:64:3"
},
"payable": false,
"returnParameters": {
"id": 909,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 908,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 910,
"src": "443:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 907,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "443:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "442:6:3"
},
"scope": 920,
"src": "334:115:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 919,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "calcMarginalPrice",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 915,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 912,
"name": "market",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "481:13:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
},
"typeName": {
"contractScope": null,
"id": 911,
"name": "Market",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 885,
"src": "481:6:3",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Market_$885",
"typeString": "contract Market"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 914,
"name": "outcomeTokenIndex",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "496:23:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 913,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "496:5:3",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:40:3"
},
"payable": false,
"returnParameters": {
"id": 918,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 917,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 919,
"src": "546:4:3",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 916,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "546:4:3",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "545:6:3"
},
"scope": 920,
"src": "454:98:3",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 921,
"src": "148:406:3"
}
],
"src": "0:555:3"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.0-beta.1",
"updatedAt": "2018-11-11T16:30:48.171Z"
}