UNPKG

@gnosis.pm/pm-contracts

Version:

Collection of smart contracts for the Gnosis prediction market platform

853 lines (852 loc) 331 kB
{ "contractName": "StandardMarketWithPriceLoggerProxy", "abi": [ { "constant": true, "inputs": [], "name": "creator", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "startDate", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "marketMaker", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "LONG", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "createdAtBlock", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lastTradeDate", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "priceIntegral", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "netOutcomeTokensSold", "outputs": [ { "name": "", "type": "int256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "masterCopy", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "stage", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "endDate", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "funding", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "fee", "outputs": [ { "name": "", "type": "uint24" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lastTradePrice", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "eventContract", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "FEE_RANGE", "outputs": [ { "name": "", "type": "uint24" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "proxied", "type": "address" }, { "name": "_creator", "type": "address" }, { "name": "_eventContract", "type": "address" }, { "name": "_marketMaker", "type": "address" }, { "name": "_fee", "type": "uint24" }, { "name": "_startDate", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "funding", "type": "uint256" } ], "name": "MarketFunding", "type": "event" }, { "anonymous": false, "inputs": [], "name": "MarketClosing", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "fees", "type": "uint256" } ], "name": "FeeWithdrawal", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "buyer", "type": "address" }, { "indexed": false, "name": "outcomeTokenIndex", "type": "uint8" }, { "indexed": false, "name": "outcomeTokenCount", "type": "uint256" }, { "indexed": false, "name": "outcomeTokenCost", "type": "uint256" }, { "indexed": false, "name": "marketFees", "type": "uint256" } ], "name": "OutcomeTokenPurchase", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "seller", "type": "address" }, { "indexed": false, "name": "outcomeTokenIndex", "type": "uint8" }, { "indexed": false, "name": "outcomeTokenCount", "type": "uint256" }, { "indexed": false, "name": "outcomeTokenProfit", "type": "uint256" }, { "indexed": false, "name": "marketFees", "type": "uint256" } ], "name": "OutcomeTokenSale", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "buyer", "type": "address" }, { "indexed": false, "name": "outcomeTokenIndex", "type": "uint8" }, { "indexed": false, "name": "outcomeTokenCount", "type": "uint256" }, { "indexed": false, "name": "cost", "type": "uint256" } ], "name": "OutcomeTokenShortSale", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "transactor", "type": "address" }, { "indexed": false, "name": "outcomeTokenAmounts", "type": "int256[]" }, { "indexed": false, "name": "outcomeTokenNetCost", "type": "int256" }, { "indexed": false, "name": "marketFees", "type": "uint256" } ], "name": "OutcomeTokenTrade", "type": "event" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"creator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"startDate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"marketMaker\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"LONG\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"createdAtBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTradeDate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"priceIntegral\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"netOutcomeTokensSold\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stage\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"endDate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"funding\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint24\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTradePrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"eventContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"FEE_RANGE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint24\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"proxied\",\"type\":\"address\"},{\"name\":\"_creator\",\"type\":\"address\"},{\"name\":\"_eventContract\",\"type\":\"address\"},{\"name\":\"_marketMaker\",\"type\":\"address\"},{\"name\":\"_fee\",\"type\":\"uint24\"},{\"name\":\"_startDate\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"funding\",\"type\":\"uint256\"}],\"name\":\"MarketFunding\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MarketClosing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"fees\",\"type\":\"uint256\"}],\"name\":\"FeeWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"outcomeTokenCost\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenPurchase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"outcomeTokenProfit\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenSale\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenShortSale\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"transactor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenAmounts\",\"type\":\"int256[]\"},{\"indexed\":false,\"name\":\"outcomeTokenNetCost\",\"type\":\"int256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenTrade\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Constructor validates and sets market properties\",\"params\":{\"_creator\":\"Market creator\",\"_eventContract\":\"Event contract\",\"_fee\":\"Market fee\",\"_marketMaker\":\"Market maker contract\",\"_startDate\":\"Start date for price logging\"}}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol\":\"StandardMarketWithPriceLoggerProxy\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol\":{\"keccak256\":\"0xdcacfa25145426b5681ad7d8bafb3c117c92a37b7a0175d72a10b42f130fb8c1\",\"urls\":[\"bzzr://bd10fbdb82f0d50866442c9e95317b3176c8ee067def27d764529973fb36420a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol\":{\"keccak256\":\"0xa71f8ce92412033d0900d44c01f0702aefced87d860cf116c6a4d3efe86913cf\",\"urls\":[\"bzzr://63c5bf60b931bb032fcab23514a3db171b680b11d8c6c05ac8caa88752e3be41\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol\":{\"keccak256\":\"0x7bc1ebf0ea0f4cd9b6e9bfff6c6ac9088c253bcfca4e27f31e5845799f0278d8\",\"urls\":[\"bzzr://5e3f86d96ab269d284b34563501469d539cc436d62f070dd0abda2519d5e60c0\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol\":{\"keccak256\":\"0x527abf1b0997e2d38ce3c97f7ed647b9e913424828594287e2b068f2fb41ad4c\",\"urls\":[\"bzzr://16756e1b212fd40f21de50d99c8b7a5dde0acc2b0b047af8beead831a1274bd7\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol\":{\"keccak256\":\"0xac611de823e324e444a9749619091be1f81edfd67af6109581c2f8655251fb8e\",\"urls\":[\"bzzr://feb7902d610a1e499e0330780e0e9638d4372ad941e5d5896cb1730df791405a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol\":{\"keccak256\":\"0xf4d12f4a59c17e66dfa6791188f621a8914e2038a4e3f72d6fc9fb903ca8e18e\",\"urls\":[\"bzzr://a477ccd203e677cc904b1a4f8fcc85251c5b5e09c5c10eed27e01318584b16d1\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":{\"keccak256\":\"0x3d4c9ec14a60cf7577d366da5116e919a4331da8d6d993174f7d599f84ae74e0\",\"urls\":[\"bzzr://20f87450259a3af24ff1769faa9ab3b714d01921e9d8fa4efa75a0c277837a8a\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0xeab0e83a9ec9e7f052c0455a11577061ec6d1994db08dae429abd6faaabf6555\",\"urls\":[\"bzzr://b2c1273d4ec30e2f9e768eea8c510f8493a7359b03e01923d93eea86b57ec145\"]},\"openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol\":{\"keccak256\":\"0xb4b45cd5475c318722ac0f8d7e2b9e77fee6f4f36374c1110fe615d50fbc0650\",\"urls\":[\"bzzr://a90fb457269c8a03ec5b811c71acef08a2751a4d2019b0661328610f9357dae7\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b5060405160c080610b36833981018060405260c081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050858585858584600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100b357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561015e5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156101765750620f424062ffffff168162ffffff16105b61017f57600080fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360028190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561027057600080fd5b505afa158015610284573d6000803e3d6000fd5b505050506040513d602081101561029a57600080fd5b810190808051906020019092919050505060ff166040519080825280602002602001820160405280156102dc5781602001602082028038833980820191505090505b50600690805190602001906102f2929190610486565b5080600460146101000a81548162ffffff021916908362ffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760006101000a81548160ff0219169083600281111561037257fe5b021790555050505050506002600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b810190808051906020019092919050505060ff161461042e57600080fd5b60008114156104435742600881905550610458565b4281101561045057600080fd5b806008819055505b600854600a819055506002680100000000000000008161047457fe5b04600b819055505050505050506104f8565b8280548282559060005260206000209081019282156104c2579160200282015b828111156104c15782518255916020019190600101906104a6565b5b5090506104cf91906104d3565b5090565b6104f591905b808211156104f15760008160009055506001016104d9565b5090565b90565b61062f806105076000396000f3fe6080604052600436106100f35760003560e01c8063a619486e1161008a578063ddca3f4311610059578063ddca3f4314610401578063df449cb814610436578063e274fd2414610461578063fbde47f6146104b8576100f3565b8063a619486e1461031b578063c040e6b814610372578063c24a0f8b146103ab578063cb4c86b7146103d6576100f3565b806359acb42c116100c657806359acb42c1461024b57806368b586d5146102765780638b797a0c146102a1578063a157979c146102cc576100f3565b806302d05d3f146101415780630b97bc86146101985780631f21f9af146101c3578063561cce0a1461021a575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461013c573d6000f35b3d6000fd5b34801561014d57600080fd5b506101566104ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a457600080fd5b506101ad610513565b6040518082815260200191505060405180910390f35b3480156101cf57600080fd5b506101d8610519565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022657600080fd5b5061022f61053f565b604051808260ff1660ff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610544565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b5061028b61054a565b6040518082815260200191505060405180910390f35b3480156102ad57600080fd5b506102b6610550565b6040518082815260200191505060405180910390f35b3480156102d857600080fd5b50610305600480360360208110156102ef57600080fd5b8101908080359060200190929190505050610556565b6040518082815260200191505060405180910390f35b34801561032757600080fd5b50610330610577565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037e57600080fd5b5061038761059c565b6040518082600281111561039757fe5b60ff16815260200191505060405180910390f35b3480156103b757600080fd5b506103c06105af565b6040518082815260200191505060405180910390f35b3480156103e257600080fd5b506103eb6105b5565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b506104166105bb565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b6105d0565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b506104766105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c457600080fd5b506104cd6105fc565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b6006818154811061056357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f42408156fea165627a7a7230582065c17f145e6b937964c164036f854c9c984839cc85937ccdbab0381644b274650029", "deployedBytecode": "0x6080604052600436106100f35760003560e01c8063a619486e1161008a578063ddca3f4311610059578063ddca3f4314610401578063df449cb814610436578063e274fd2414610461578063fbde47f6146104b8576100f3565b8063a619486e1461031b578063c040e6b814610372578063c24a0f8b146103ab578063cb4c86b7146103d6576100f3565b806359acb42c116100c657806359acb42c1461024b57806368b586d5146102765780638b797a0c146102a1578063a157979c146102cc576100f3565b806302d05d3f146101415780630b97bc86146101985780631f21f9af146101c3578063561cce0a1461021a575b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050366000803760008036600084600019f43d6000803e806000811461013c573d6000f35b3d6000fd5b34801561014d57600080fd5b506101566104ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156101a457600080fd5b506101ad610513565b6040518082815260200191505060405180910390f35b3480156101cf57600080fd5b506101d8610519565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022657600080fd5b5061022f61053f565b604051808260ff1660ff16815260200191505060405180910390f35b34801561025757600080fd5b50610260610544565b6040518082815260200191505060405180910390f35b34801561028257600080fd5b5061028b61054a565b6040518082815260200191505060405180910390f35b3480156102ad57600080fd5b506102b6610550565b6040518082815260200191505060405180910390f35b3480156102d857600080fd5b50610305600480360360208110156102ef57600080fd5b8101908080359060200190929190505050610556565b6040518082815260200191505060405180910390f35b34801561032757600080fd5b50610330610577565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561037e57600080fd5b5061038761059c565b6040518082600281111561039757fe5b60ff16815260200191505060405180910390f35b3480156103b757600080fd5b506103c06105af565b6040518082815260200191505060405180910390f35b3480156103e257600080fd5b506103eb6105b5565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b506104166105bb565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b34801561044257600080fd5b5061044b6105d0565b6040518082815260200191505060405180910390f35b34801561046d57600080fd5b506104766105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c457600080fd5b506104cd6105fc565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600181565b60025481565b600a5481565b600c5481565b6006818154811061056357fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b60095481565b60055481565b600460149054906101000a900462ffffff1681565b600b5481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620f42408156fea165627a7a7230582065c17f145e6b937964c164036f854c9c984839cc85937ccdbab0381644b274650029", "sourceMap": "406:1062:11:-;;;797:669;8:9:-1;5:2;;;30:1;27;20:12;5:2;797:669:11;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;797:669:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;965:7;974:8;984:14;1000:12;1014:4;580:5:9;644:1:29;621:25;;:11;:25;;;;613:34;;;;;;670:11;657:10;;:24;;;;;;;;;;;;;;;;;;551:137;686:1:9;651:37;;659:14;651:37;;;;:76;;;;;725:1;692:35;;700:12;692:35;;;;651:76;:96;;;;;364:7;731:16;;:4;:16;;;651:96;643:105;;;;;;768:8;758:7;;:18;;;;;;;;;;;;;;;;;;803:12;786:14;:29;;;;841:14;825:13;;:30;;;;;;;;;;;;;;;;;;898:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;898:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;898:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;898:31:9;;;;;;;;;;;;;;;;888:42;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;888:42:9;;;;865:20;:65;;;;;;;;;;;;:::i;:::-;;946:4;940:3;;:10;;;;;;;;;;;;;;;;;;974:12;960:11;;:26;;;;;;;;;;;;;;;;;;1004:20;996:5;;:28;;;;;;;;;;;;;;;;;;;;;;;;460:571;;;;;1077:1:11;1042:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1042:31:11;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1042:31:11;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1042:31:11;;;;;;;;;;;;;;;;:36;;;1034:45;;;;;;1108:1;1094:10;:15;1090:217;;;1135:3;1123:9;:15;;;;1090:217;;;1256:3;1242:10;:17;;1234:26;;;;;;1286:10;1274:9;:22;;;;1090:217;1333:9;;1317:13;:25;;;;1458:1;168:19;1452:7;;;;;;1435:14;:24;;;;797:669;;;;;;406:1062;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "406:1062:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;848:19:29;870:10;;;;;;;;;;;848:32;;932:14;929:1;926;913:34;1031:1;1028;1012:14;1009:1;996:11;992:1;988:6;975:58;1067:16;1064:1;1061;1046:38;1104:7;1129:1;1124:38;;;;1195:16;1192:1;1185:27;1124:38;1143:16;1140:1;1133:27;873:22:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;873:22:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;261:21:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;261:21:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;965:30:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;965:30:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;193::11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;193:30:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;901:26:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;901:26:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;313:25:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;313:25:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;376;;8:9:-1;5:2;;;30:1;27;20:12;5:2;376:25:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1049:33:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1049:33:8;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1049:33:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;205:25:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;205:25:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1088:19:8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1088:19:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;288::11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;288:19:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1024::8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1024:19:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1001:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:17:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;344:26:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;344:26:11;;;:::i;:::-;;;;;;;;;;;;;;;;;;;933::8;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:26:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;329:42:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;329:42:9;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;873:22:8;;;;;;;;;;;;;:::o;261:21:11:-;;;;:::o;965:30:8:-;;;;;;;;;;;;;:::o;193::11:-;222:1;193:30;:::o;901:26:8:-;;;;:::o;313:25:11:-;;;;:::o;376:::-;;;;:::o;1049:33:8:-;;;;;;;;;;;;;;;;;;;;;;;;;:::o;205:25:29:-;;;;;;;;;;;;;:::o;1088:19:8:-;;;;;;;;;;;;;:::o;288::11:-;;;;:::o;1024::8:-;;;;:::o;1001:17::-;;;;;;;;;;;;;:::o;344:26:11:-;;;;:::o;933::8:-;;;;;;;;;;;;;:::o;329:42:9:-;364:7;329:42;:::o", "source": "pragma solidity ^0.5.0;\nimport \"../Markets/StandardMarket.sol\";\n\ncontract StandardMarketWithPriceLoggerData {\n\n /*\n * Constants\n */\n uint constant ONE = 0x10000000000000000;\n uint8 public constant LONG = 1;\n\n /*\n * Storage\n */\n uint public startDate;\n uint public endDate;\n uint public lastTradeDate;\n uint public lastTradePrice;\n uint public priceIntegral;\n}\n\ncontract StandardMarketWithPriceLoggerProxy is StandardMarketProxy, StandardMarketWithPriceLoggerData {\n\n /// @dev Constructor validates and sets market properties\n /// @param _creator Market creator\n /// @param _eventContract Event contract\n /// @param _marketMaker Market maker contract\n /// @param _fee Market fee\n /// @param _startDate Start date for price logging\n constructor(address proxied, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee, uint _startDate)\n public\n StandardMarketProxy(proxied, _creator, _eventContract, _marketMaker, _fee)\n {\n require(eventContract.getOutcomeCount() == 2);\n\n if (_startDate == 0)\n startDate = now;\n else {\n // The earliest start date is the market creation date\n require(_startDate >= now);\n startDate = _startDate;\n }\n\n lastTradeDate = startDate;\n // initialize lastTradePrice to assuming uniform probabilities of outcomes\n lastTradePrice = ONE / 2;\n }\n}\n\ncontract StandardMarketWithPriceLogger is StandardMarket, StandardMarketWithPriceLoggerData {\n /*\n * Public functions\n */\n /// @dev Allows to buy outcome tokens from market maker\n /// @param outcomeTokenIndex Index of the outcome token to buy\n /// @param outcomeTokenCount Amount of outcome tokens to buy\n /// @param maxCost The maximum cost in collateral tokens to pay for outcome tokens\n /// @return Cost in collateral tokens\n function buy(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint maxCost)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.buy(outcomeTokenIndex, outcomeTokenCount, maxCost);\n logPriceAfter();\n }\n\n /// @dev Allows to sell outcome tokens to market maker\n /// @param outcomeTokenIndex Index of the outcome token to sell\n /// @param outcomeTokenCount Amount of outcome tokens to sell\n /// @param minProfit The minimum profit in collateral tokens to earn for outcome tokens\n /// @return Profit in collateral tokens\n function sell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint profit)\n {\n logPriceBefore();\n profit = super.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Buys all outcomes, then sells all shares of selected outcome which were bought, keeping\n /// shares of all other outcome tokens.\n /// @param outcomeTokenIndex Index of the outcome token to short sell\n /// @param outcomeTokenCount Amount of outcome tokens to short sell\n /// @param minProfit The minimum profit in collateral tokens to earn for short sold outcome tokens\n /// @return Cost to short sell outcome in collateral tokens\n function shortSell(uint8 outcomeTokenIndex, uint outcomeTokenCount, uint minProfit)\n public\n returns (uint cost)\n {\n logPriceBefore();\n cost = super.shortSell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n logPriceAfter();\n }\n\n /// @dev Allows to trade outcome tokens with market maker\n /// @param outcomeTokenAmounts Amounts of outcome tokens to trade\n /// @param collateralLimit The maximum cost or minimum profit in collateral tokens\n /// @return Cost/profit in collateral tokens\n function trade(int[] memory outcomeTokenAmounts, int collateralLimit)\n public\n returns (int netCost)\n {\n logPriceBefore();\n netCost = super.trade(outcomeTokenAmounts, collateralLimit);\n logPriceAfter();\n }\n\n\n /// @dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\n function close()\n public\n {\n endDate = now;\n super.close();\n }\n\n /// @dev Calculates average price for long tokens based on price integral\n /// @return Average price for long tokens over time\n function getAvgPrice()\n public\n view\n returns (uint)\n {\n if(endDate > 0)\n return (priceIntegral + lastTradePrice * (endDate - lastTradeDate)) / (endDate - startDate);\n return (priceIntegral + lastTradePrice * (now - lastTradeDate)) / (now - startDate);\n }\n\n /*\n * Private functions\n */\n /// @dev Adds price integral since the last trade to the total price integral\n function logPriceBefore()\n private\n {\n if (now >= startDate) {\n // Accumulate price integral only if logging has begun\n priceIntegral += lastTradePrice * (now - lastTradeDate);\n }\n }\n\n /// @dev Updates last trade timestamp and price\n function logPriceAfter()\n private\n {\n // Refresh lastTradePrice after every transactions as we don't know if\n // this will be the last transaction before logging period starts\n lastTradePrice = marketMaker.calcMarginalPrice(this, LONG);\n lastTradeDate = now;\n }\n}\n", "sourcePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol", "ast": { "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarketWithPriceLogger.sol", "exportedSymbols": { "StandardMarketWithPriceLogger": [ 3549 ], "StandardMarketWithPriceLoggerData": [ 3286 ], "StandardMarketWithPriceLoggerProxy": [ 3351 ] }, "id": 3550, "nodeType": "SourceUnit", "nodes": [ { "id": 3268, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:11" }, { "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol", "file": "../Markets/StandardMarket.sol", "id": 3269, "nodeType": "ImportDirective", "scope": 3550, "sourceUnit": 3200, "src": "24:39:11", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3286, "linearizedBaseContracts": [ 3286 ], "name": "StandardMarketWithPriceLoggerData", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "id": 3272, "name": "ONE", "nodeType": "VariableDeclaration", "scope": 3286, "src": "148:39:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3270, "name": "uint", "nodeType": "ElementaryTypeName", "src": "148:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30783130303030303030303030303030303030", "id": 3271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "168:19:11", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18446744073709551616_by_1", "typeString": "int_const 18446744073709551616" }, "value": "0x10000000000000000" }, "visibility": "internal" }, { "constant": true, "id": 3275, "name": "LONG", "nodeType": "VariableDeclaration", "scope": 3286, "src": "193:30:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 3273, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "193:5:11", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": { "argumentTypes": null, "hexValue": "31", "id": 3274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "222:1:11", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "visibility": "public" }, { "constant": false, "id": 3277, "name": "startDate", "nodeType": "VariableDeclaration", "scope": 3286, "src": "261:21:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3276, "name": "uint", "nodeType": "ElementaryTypeName", "src": "261:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 3279, "name": "endDate", "nodeType": "VariableDeclaration", "scope": 3286, "src": "288:19:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3278, "name": "uint", "nodeType": "ElementaryTypeName", "src": "288:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 3281, "name": "lastTradeDate", "nodeType": "VariableDeclaration", "scope": 3286, "src": "313:25:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3280, "name": "uint", "nodeType": "ElementaryTypeName", "src": "313:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 3283, "name": "lastTradePrice", "nodeType": "VariableDeclaration", "scope": 3286, "src": "344:26:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3282, "name": "uint", "nodeType": "ElementaryTypeName", "src": "344:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 3285, "name": "priceIntegral", "nodeType": "VariableDeclaration", "scope": 3286, "src": "376:25:11", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 3284, "name": "uint", "nodeType": "ElementaryTypeName", "src": "376:4:11", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" } ], "scope": 3550, "src": "65:339:11" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3287, "name": "StandardMarketProxy", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2389, "src": "453:19:11", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketProxy_$2389", "typeString": "contract StandardMarketProxy" } }, "id": 3288, "nodeType": "InheritanceSpecifier", "src": "453:19:11" }, { "arguments": null, "baseName": { "contractScope": null, "id": 3289, "name": "StandardMarketWithPriceLoggerData", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3286, "src": "474:33:11", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardMarketWithPriceLoggerData_$3286", "typeString": "contract StandardMarketWithPriceLoggerData" } }, "id": 3290, "nodeType": "InheritanceSpecifier", "src": "474:33:11" } ], "contractDependencies": [ 2230, 2307, 2389, 3286, 6798, 6828 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 3351, "linearizedBaseContracts": [ 3351, 3286, 2389, 2307, 2230, 6828, 6798 ], "name": "StandardMarketWithPriceLoggerProxy", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 3349, "nodeType": "Block", "src": "1024:442:11", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "id": 3317, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 3313, "name": "eventContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2214, "src": "1042:13:11", "typeDescriptions": { "typeIdentifier": "t_contract$_Event_$392", "typeString": "contract Event" } }, "id": 3314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getOutcomeCount", "nodeType": "MemberAccess", "referencedDeclaration": 331, "src": "1042:29:11", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", "typeString": "function () view external returns (uint8)" } }, "id": 3315, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1042:31:11", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "32", "id": 3316, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1077:1:11", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "1042:36:11", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ],