{
  "contractName": "StandardMarket",
  "abi": [
    {
      "constant": true,
      "inputs": [],
      "name": "creator",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "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": "createdAtBlock",
      "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": "stage",
      "outputs": [
        {
          "name": "",
          "type": "uint8"
        }
      ],
      "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": "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": "_creator",
          "type": "address"
        },
        {
          "name": "_eventContract",
          "type": "address"
        },
        {
          "name": "_marketMaker",
          "type": "address"
        },
        {
          "name": "_fee",
          "type": "uint24"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "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"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_funding",
          "type": "uint256"
        }
      ],
      "name": "fund",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "close",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "withdrawFees",
      "outputs": [
        {
          "name": "fees",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "name": "maxCost",
          "type": "uint256"
        }
      ],
      "name": "buy",
      "outputs": [
        {
          "name": "cost",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "name": "minProfit",
          "type": "uint256"
        }
      ],
      "name": "sell",
      "outputs": [
        {
          "name": "profit",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "name": "minProfit",
          "type": "uint256"
        }
      ],
      "name": "shortSell",
      "outputs": [
        {
          "name": "cost",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "outcomeTokenCost",
          "type": "uint256"
        }
      ],
      "name": "calcMarketFee",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "bytecode": "0x60806040523480156200001157600080fd5b50604051608080620021968339810160409081528151602083015191830151606090930151909290600160a060020a038316158015906200005a5750600160a060020a03821615155b80156200006e5750620f424062ffffff8216105b15156200007a57600080fd5b60008054600160a060020a03808716600160a060020a0319928316178355436001556002805487831693169290921791829055604080517f7dc8f08600000000000000000000000000000000000000000000000000000000815290519290911692637dc8f086926004808401936020939083900390910190829087803b1580156200010457600080fd5b505af115801562000119573d6000803e3d6000fd5b505050506040513d60208110156200013057600080fd5b50516040805160ff9092168083526020818102840101909152801562000160578160200160208202803883390190505b5080516200017791600591602090910190620001db565b506003805460a060020a62ffffff0219167401000000000000000000000000000000000000000062ffffff84160217600160a060020a031916600160a060020a038416179055600680546000919060ff19166001830217905550505050506200024b565b82805482825590600052602060002090810192821562000219579160200282015b8281111562000219578251825591602001919060010190620001fc565b50620002279291506200022b565b5090565b6200024891905b8082111562000227576000815560010162000232565b90565b611f3b806200025b6000396000f3006080604052600436106100cc5763ffffffff60e060020a60003504166302d05d3f81146100d15780631f21f9af1461010257806328c05d321461011757806343d726d61461014a57806346280a8014610161578063476343ee1461018257806359acb42c14610197578063a157979c146101ac578063b0011509146101c4578063c040e6b8146101dc578063ca1d209d14610215578063cb4c86b71461022d578063ddca3f4314610242578063e274fd241461026f578063f6d956df14610284578063fbde47f6146102a5575b600080fd5b3480156100dd57600080fd5b506100e66102ba565b60408051600160a060020a039092168252519081900360200190f35b34801561010e57600080fd5b506100e66102c9565b34801561012357600080fd5b5061013860ff600435166024356044356102d8565b60408051918252519081900360200190f35b34801561015657600080fd5b5061015f610a2e565b005b34801561016d57600080fd5b5061013860ff60043516602435604435610d63565b34801561018e57600080fd5b50610138611298565b3480156101a357600080fd5b50610138611517565b3480156101b857600080fd5b5061013860043561151d565b3480156101d057600080fd5b5061013860043561153c565b3480156101e857600080fd5b506101f161156d565b6040518082600281111561020157fe5b60ff16815260200191505060405180910390f35b34801561022157600080fd5b5061015f600435611576565b34801561023957600080fd5b5061013861188f565b34801561024e57600080fd5b50610257611895565b6040805162ffffff9092168252519081900360200190f35b34801561027b57600080fd5b506100e66118b8565b34801561029057600080fd5b5061013860ff600435166024356044356118c7565b3480156102b157600080fd5b50610257611f08565b600054600160a060020a031681565b600354600160a060020a031681565b600080600080600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561033157600080fd5b505af1158015610345573d6000803e3d6000fd5b505050506040513d602081101561035b57600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018990529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b505050506040513d60208110156103e157600080fd5b505180156104ef5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561043d57600080fd5b505af1158015610451573d6000803e3d6000fd5b505050506040513d602081101561046757600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018a90529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b50515b15156104fa57600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b15801561056057600080fd5b505af1158015610574573d6000803e3d6000fd5b50506002546040805160e160020a63455f2cf502815260ff8c1660048201529051600160a060020a039092169350638abe59ea92506024808201926020929091908290030181600087803b1580156105cb57600080fd5b505af11580156105df573d6000803e3d6000fd5b505050506040513d60208110156105f557600080fd5b50516040805160e060020a63095ea7b3028152306004820152602481018990529051600160a060020a039092169163095ea7b3916044808201926020929091908290030181600087803b15801561064b57600080fd5b505af115801561065f573d6000803e3d6000fd5b505050506040513d602081101561067557600080fd5b5050604080517f46280a8000000000000000000000000000000000000000000000000000000000815260ff891660048201526024810188905260448101879052905130916346280a809160648083019260209291908290030181600087803b1580156106e057600080fd5b505af11580156106f4573d6000803e3d6000fd5b505050506040513d602081101561070a57600080fd5b5051600254604080517f7dc8f0860000000000000000000000000000000000000000000000000000000081529051838a039750929550600160a060020a0390911691637dc8f086916004808201926020929091908290030181600087803b15801561077457600080fd5b505af1158015610788573d6000803e3d6000fd5b505050506040513d602081101561079e57600080fd5b50519150600090505b8160ff168160ff1610156108d45760ff818116908816146108cc576002546040805160e160020a63455f2cf502815260ff841660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b15801561081557600080fd5b505af1158015610829573d6000803e3d6000fd5b505050506040513d602081101561083f57600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018990529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050506040513d60208110156108bf57600080fd5b505115156108cc57600080fd5b6001016107a7565b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561092757600080fd5b505af115801561093b573d6000803e3d6000fd5b505050506040513d602081101561095157600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018690529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b1580156109a757600080fd5b505af11580156109bb573d6000803e3d6000fd5b505050506040513d60208110156109d157600080fd5b505115156109de57600080fd5b6040805160ff8916815260208101889052808201869052905133917f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88919081900360600190a25050509392505050565b600080548190600160a060020a03163314610a4857600080fd5b60018060065460ff166002811115610a5c57fe5b14610a6657600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a0316637dc8f0866040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506040513d6020811015610ae357600080fd5b50519250600091505b8260ff168260ff161015610d28576002546040805160e160020a63455f2cf502815260ff851660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b158015610b4d57600080fd5b505af1158015610b61573d6000803e3d6000fd5b505050506040513d6020811015610b7757600080fd5b5051600080546002546040805160e160020a63455f2cf502815260ff881660048201529051600160a060020a039586169563a9059cbb9594811694931692638abe59ea92602480820193602093909283900390910190829087803b158015610bde57600080fd5b505af1158015610bf2573d6000803e3d6000fd5b505050506040513d6020811015610c0857600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610c6d57600080fd5b505af1158015610c81573d6000803e3d6000fd5b505050506040513d6020811015610c9757600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610ce657600080fd5b505af1158015610cfa573d6000803e3d6000fd5b505050506040513d6020811015610d1057600080fd5b50511515610d1d57600080fd5b600190910190610aec565b6006805460ff191660021790556040517fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0790600090a1505050565b6000808060018060065460ff166002811115610d7b57fe5b14610d8557600080fd5b600354604080517f4091c6a900000000000000000000000000000000000000000000000000000000815230600482015260ff8a166024820152604481018990529051600160a060020a0390921691634091c6a9916064808201926020929091908290030181600087803b158015610dfb57600080fd5b505af1158015610e0f573d6000803e3d6000fd5b505050506040513d6020811015610e2557600080fd5b50519250610e328361153c565b91508273__Math__________________________________63b67d77c59091846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015610e9057600080fd5b505af4158015610ea4573d6000803e3d6000fd5b505050506040513d6020811015610eba57600080fd5b50519350600084118015610ece5750848410155b1515610ed957600080fd5b6002546040805160e160020a63455f2cf502815260ff8a1660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b158015610f2c57600080fd5b505af1158015610f40573d6000803e3d6000fd5b505050506040513d6020811015610f5657600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018990529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050506040513d6020811015610fdc57600080fd5b50511515610fe957600080fd5b600254604080517f6fb1edcd000000000000000000000000000000000000000000000000000000008152600481018690529051600160a060020a0390921691636fb1edcd9160248082019260009290919082900301818387803b15801561104f57600080fd5b505af1158015611063573d6000803e3d6000fd5b50505050600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156110ba57600080fd5b505af11580156110ce573d6000803e3d6000fd5b505050506040513d60208110156110e457600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018790529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b15801561113a57600080fd5b505af115801561114e573d6000803e3d6000fd5b505050506040513d602081101561116457600080fd5b5051151561117157600080fd5b600086121561117f57600080fd5b6005805460ff891690811061119057fe5b906000526020600020015473__Math__________________________________63adefc37b9091886040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156111f657600080fd5b505af415801561120a573d6000803e3d6000fd5b505050506040513d602081101561122057600080fd5b50516005805460ff8a1690811061123357fe5b600091825260209182902001919091556040805160ff8a168152918201889052818101859052606082018490525133917fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b69919081900360800190a25050509392505050565b60008054600160a060020a031633146112b057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b5051600254604080517fb2016bd40000000000000000000000000000000000000000000000000000000081529051929350600160a060020a039091169163b2016bd4916004808201926020929091908290030181600087803b15801561142157600080fd5b505af1158015611435573d6000803e3d6000fd5b505050506040513d602081101561144b57600080fd5b5051600080546040805160e060020a63a9059cbb028152600160a060020a039283166004820152602481018690529051919093169263a9059cbb9260448083019360209390929083900390910190829087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d60208110156114d457600080fd5b505115156114e157600080fd5b6040805182815290517f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d7879181900360200190a190565b60015481565b600580548290811061152b57fe5b600091825260209091200154905081565b600354600090620f42409074010000000000000000000000000000000000000000900462ffffff1683020492915050565b60065460ff1681565b600054600160a060020a0316331461158d57600080fd5b60008060065460ff1660028111156115a157fe5b146115ab57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156115fe57600080fd5b505af1158015611612573d6000803e3d6000fd5b505050506040513d602081101561162857600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018590529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561168457600080fd5b505af1158015611698573d6000803e3d6000fd5b505050506040513d60208110156116ae57600080fd5b505180156117bc5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561170a57600080fd5b505af115801561171e573d6000803e3d6000fd5b505050506040513d602081101561173457600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018690529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561178f57600080fd5b505af11580156117a3573d6000803e3d6000fd5b505050506040513d60208110156117b957600080fd5b50515b15156117c757600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b15801561182d57600080fd5b505af1158015611841573d6000803e3d6000fd5b5050506004839055506006805460ff191660011790556040805183815290517f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f9163916020908290030190a15050565b60045481565b60035474010000000000000000000000000000000000000000900462ffffff1681565b600254600160a060020a031681565b6000808060018060065460ff1660028111156118df57fe5b146118e957600080fd5b600354604080517fbd8ff81700000000000000000000000000000000000000000000000000000000815230600482015260ff8a166024820152604481018990529051600160a060020a039092169163bd8ff817916064808201926020929091908290030181600087803b15801561195f57600080fd5b505af1158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b505192506119968361153c565b91508273__Math__________________________________63771602f79091846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156119f457600080fd5b505af4158015611a08573d6000803e3d6000fd5b505050506040513d6020811015611a1e57600080fd5b50519350600084118015611a325750848411155b1515611a3d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050506040513d6020811015611aba57600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018790529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b158015611b1657600080fd5b505af1158015611b2a573d6000803e3d6000fd5b505050506040513d6020811015611b4057600080fd5b50518015611c4e5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611b9c57600080fd5b505af1158015611bb0573d6000803e3d6000fd5b505050506040513d6020811015611bc657600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b505050506040513d6020811015611c4b57600080fd5b50515b1515611c5957600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018690529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b158015611cbf57600080fd5b505af1158015611cd3573d6000803e3d6000fd5b50506002546040805160e160020a63455f2cf502815260ff8c1660048201529051600160a060020a039092169350638abe59ea92506024808201926020929091908290030181600087803b158015611d2a57600080fd5b505af1158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018990529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015611daa57600080fd5b505af1158015611dbe573d6000803e3d6000fd5b505050506040513d6020811015611dd457600080fd5b50511515611de157600080fd5b6000861215611def57600080fd5b6005805460ff8916908110611e0057fe5b906000526020600020015473__Math__________________________________63a5f3c23b9091886040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015611e6657600080fd5b505af4158015611e7a573d6000803e3d6000fd5b505050506040513d6020811015611e9057600080fd5b50516005805460ff8a16908110611ea357fe5b600091825260209182902001919091556040805160ff8a168152918201889052818101859052606082018490525133917f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae410919081900360800190a25050509392505050565b620f4240815600a165627a7a72305820484aafaeacf87c73aeb16e21d02ea670d3ac05d4f796fb0a4b8433bc4e1ccf180029",
  "deployedBytecode": "0x6080604052600436106100cc5763ffffffff60e060020a60003504166302d05d3f81146100d15780631f21f9af1461010257806328c05d321461011757806343d726d61461014a57806346280a8014610161578063476343ee1461018257806359acb42c14610197578063a157979c146101ac578063b0011509146101c4578063c040e6b8146101dc578063ca1d209d14610215578063cb4c86b71461022d578063ddca3f4314610242578063e274fd241461026f578063f6d956df14610284578063fbde47f6146102a5575b600080fd5b3480156100dd57600080fd5b506100e66102ba565b60408051600160a060020a039092168252519081900360200190f35b34801561010e57600080fd5b506100e66102c9565b34801561012357600080fd5b5061013860ff600435166024356044356102d8565b60408051918252519081900360200190f35b34801561015657600080fd5b5061015f610a2e565b005b34801561016d57600080fd5b5061013860ff60043516602435604435610d63565b34801561018e57600080fd5b50610138611298565b3480156101a357600080fd5b50610138611517565b3480156101b857600080fd5b5061013860043561151d565b3480156101d057600080fd5b5061013860043561153c565b3480156101e857600080fd5b506101f161156d565b6040518082600281111561020157fe5b60ff16815260200191505060405180910390f35b34801561022157600080fd5b5061015f600435611576565b34801561023957600080fd5b5061013861188f565b34801561024e57600080fd5b50610257611895565b6040805162ffffff9092168252519081900360200190f35b34801561027b57600080fd5b506100e66118b8565b34801561029057600080fd5b5061013860ff600435166024356044356118c7565b3480156102b157600080fd5b50610257611f08565b600054600160a060020a031681565b600354600160a060020a031681565b600080600080600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561033157600080fd5b505af1158015610345573d6000803e3d6000fd5b505050506040513d602081101561035b57600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018990529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b1580156103b757600080fd5b505af11580156103cb573d6000803e3d6000fd5b505050506040513d60208110156103e157600080fd5b505180156104ef5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561043d57600080fd5b505af1158015610451573d6000803e3d6000fd5b505050506040513d602081101561046757600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018a90529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050506040513d60208110156104ec57600080fd5b50515b15156104fa57600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b15801561056057600080fd5b505af1158015610574573d6000803e3d6000fd5b50506002546040805160e160020a63455f2cf502815260ff8c1660048201529051600160a060020a039092169350638abe59ea92506024808201926020929091908290030181600087803b1580156105cb57600080fd5b505af11580156105df573d6000803e3d6000fd5b505050506040513d60208110156105f557600080fd5b50516040805160e060020a63095ea7b3028152306004820152602481018990529051600160a060020a039092169163095ea7b3916044808201926020929091908290030181600087803b15801561064b57600080fd5b505af115801561065f573d6000803e3d6000fd5b505050506040513d602081101561067557600080fd5b5050604080517f46280a8000000000000000000000000000000000000000000000000000000000815260ff891660048201526024810188905260448101879052905130916346280a809160648083019260209291908290030181600087803b1580156106e057600080fd5b505af11580156106f4573d6000803e3d6000fd5b505050506040513d602081101561070a57600080fd5b5051600254604080517f7dc8f0860000000000000000000000000000000000000000000000000000000081529051838a039750929550600160a060020a0390911691637dc8f086916004808201926020929091908290030181600087803b15801561077457600080fd5b505af1158015610788573d6000803e3d6000fd5b505050506040513d602081101561079e57600080fd5b50519150600090505b8160ff168160ff1610156108d45760ff818116908816146108cc576002546040805160e160020a63455f2cf502815260ff841660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b15801561081557600080fd5b505af1158015610829573d6000803e3d6000fd5b505050506040513d602081101561083f57600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018990529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b15801561089557600080fd5b505af11580156108a9573d6000803e3d6000fd5b505050506040513d60208110156108bf57600080fd5b505115156108cc57600080fd5b6001016107a7565b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561092757600080fd5b505af115801561093b573d6000803e3d6000fd5b505050506040513d602081101561095157600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018690529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b1580156109a757600080fd5b505af11580156109bb573d6000803e3d6000fd5b505050506040513d60208110156109d157600080fd5b505115156109de57600080fd5b6040805160ff8916815260208101889052808201869052905133917f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88919081900360600190a25050509392505050565b600080548190600160a060020a03163314610a4857600080fd5b60018060065460ff166002811115610a5c57fe5b14610a6657600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a0316637dc8f0866040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506040513d6020811015610ae357600080fd5b50519250600091505b8260ff168260ff161015610d28576002546040805160e160020a63455f2cf502815260ff851660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b158015610b4d57600080fd5b505af1158015610b61573d6000803e3d6000fd5b505050506040513d6020811015610b7757600080fd5b5051600080546002546040805160e160020a63455f2cf502815260ff881660048201529051600160a060020a039586169563a9059cbb9594811694931692638abe59ea92602480820193602093909283900390910190829087803b158015610bde57600080fd5b505af1158015610bf2573d6000803e3d6000fd5b505050506040513d6020811015610c0857600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610c6d57600080fd5b505af1158015610c81573d6000803e3d6000fd5b505050506040513d6020811015610c9757600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610ce657600080fd5b505af1158015610cfa573d6000803e3d6000fd5b505050506040513d6020811015610d1057600080fd5b50511515610d1d57600080fd5b600190910190610aec565b6006805460ff191660021790556040517fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0790600090a1505050565b6000808060018060065460ff166002811115610d7b57fe5b14610d8557600080fd5b600354604080517f4091c6a900000000000000000000000000000000000000000000000000000000815230600482015260ff8a166024820152604481018990529051600160a060020a0390921691634091c6a9916064808201926020929091908290030181600087803b158015610dfb57600080fd5b505af1158015610e0f573d6000803e3d6000fd5b505050506040513d6020811015610e2557600080fd5b50519250610e328361153c565b91508273__Math__________________________________63b67d77c59091846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015610e9057600080fd5b505af4158015610ea4573d6000803e3d6000fd5b505050506040513d6020811015610eba57600080fd5b50519350600084118015610ece5750848410155b1515610ed957600080fd5b6002546040805160e160020a63455f2cf502815260ff8a1660048201529051600160a060020a0390921691638abe59ea916024808201926020929091908290030181600087803b158015610f2c57600080fd5b505af1158015610f40573d6000803e3d6000fd5b505050506040513d6020811015610f5657600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018990529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b505050506040513d6020811015610fdc57600080fd5b50511515610fe957600080fd5b600254604080517f6fb1edcd000000000000000000000000000000000000000000000000000000008152600481018690529051600160a060020a0390921691636fb1edcd9160248082019260009290919082900301818387803b15801561104f57600080fd5b505af1158015611063573d6000803e3d6000fd5b50505050600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156110ba57600080fd5b505af11580156110ce573d6000803e3d6000fd5b505050506040513d60208110156110e457600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018790529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b15801561113a57600080fd5b505af115801561114e573d6000803e3d6000fd5b505050506040513d602081101561116457600080fd5b5051151561117157600080fd5b600086121561117f57600080fd5b6005805460ff891690811061119057fe5b906000526020600020015473__Math__________________________________63adefc37b9091886040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156111f657600080fd5b505af415801561120a573d6000803e3d6000fd5b505050506040513d602081101561122057600080fd5b50516005805460ff8a1690811061123357fe5b600091825260209182902001919091556040805160ff8a168152918201889052818101859052606082018490525133917fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b69919081900360800190a25050509392505050565b60008054600160a060020a031633146112b057600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b15801561139257600080fd5b505af11580156113a6573d6000803e3d6000fd5b505050506040513d60208110156113bc57600080fd5b5051600254604080517fb2016bd40000000000000000000000000000000000000000000000000000000081529051929350600160a060020a039091169163b2016bd4916004808201926020929091908290030181600087803b15801561142157600080fd5b505af1158015611435573d6000803e3d6000fd5b505050506040513d602081101561144b57600080fd5b5051600080546040805160e060020a63a9059cbb028152600160a060020a039283166004820152602481018690529051919093169263a9059cbb9260448083019360209390929083900390910190829087803b1580156114aa57600080fd5b505af11580156114be573d6000803e3d6000fd5b505050506040513d60208110156114d457600080fd5b505115156114e157600080fd5b6040805182815290517f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d7879181900360200190a190565b60015481565b600580548290811061152b57fe5b600091825260209091200154905081565b600354600090620f42409074010000000000000000000000000000000000000000900462ffffff1683020492915050565b60065460ff1681565b600054600160a060020a0316331461158d57600080fd5b60008060065460ff1660028111156115a157fe5b146115ab57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156115fe57600080fd5b505af1158015611612573d6000803e3d6000fd5b505050506040513d602081101561162857600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018590529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561168457600080fd5b505af1158015611698573d6000803e3d6000fd5b505050506040513d60208110156116ae57600080fd5b505180156117bc5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561170a57600080fd5b505af115801561171e573d6000803e3d6000fd5b505050506040513d602081101561173457600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018690529051919092169163095ea7b39160448083019260209291908290030181600087803b15801561178f57600080fd5b505af11580156117a3573d6000803e3d6000fd5b505050506040513d60208110156117b957600080fd5b50515b15156117c757600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b15801561182d57600080fd5b505af1158015611841573d6000803e3d6000fd5b5050506004839055506006805460ff191660011790556040805183815290517f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f9163916020908290030190a15050565b60045481565b60035474010000000000000000000000000000000000000000900462ffffff1681565b600254600160a060020a031681565b6000808060018060065460ff1660028111156118df57fe5b146118e957600080fd5b600354604080517fbd8ff81700000000000000000000000000000000000000000000000000000000815230600482015260ff8a166024820152604481018990529051600160a060020a039092169163bd8ff817916064808201926020929091908290030181600087803b15801561195f57600080fd5b505af1158015611973573d6000803e3d6000fd5b505050506040513d602081101561198957600080fd5b505192506119968361153c565b91508273__Math__________________________________63771602f79091846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156119f457600080fd5b505af4158015611a08573d6000803e3d6000fd5b505050506040513d6020811015611a1e57600080fd5b50519350600084118015611a325750848411155b1515611a3d57600080fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611a9057600080fd5b505af1158015611aa4573d6000803e3d6000fd5b505050506040513d6020811015611aba57600080fd5b50516040805160e060020a6323b872dd028152336004820152306024820152604481018790529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b158015611b1657600080fd5b505af1158015611b2a573d6000803e3d6000fd5b505050506040513d6020811015611b4057600080fd5b50518015611c4e5750600260009054906101000a9004600160a060020a0316600160a060020a031663b2016bd46040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015611b9c57600080fd5b505af1158015611bb0573d6000803e3d6000fd5b505050506040513d6020811015611bc657600080fd5b50516002546040805160e060020a63095ea7b3028152600160a060020a039283166004820152602481018790529051919092169163095ea7b39160448083019260209291908290030181600087803b158015611c2157600080fd5b505af1158015611c35573d6000803e3d6000fd5b505050506040513d6020811015611c4b57600080fd5b50515b1515611c5957600080fd5b600254604080517f28da850b000000000000000000000000000000000000000000000000000000008152600481018690529051600160a060020a03909216916328da850b9160248082019260009290919082900301818387803b158015611cbf57600080fd5b505af1158015611cd3573d6000803e3d6000fd5b50506002546040805160e160020a63455f2cf502815260ff8c1660048201529051600160a060020a039092169350638abe59ea92506024808201926020929091908290030181600087803b158015611d2a57600080fd5b505af1158015611d3e573d6000803e3d6000fd5b505050506040513d6020811015611d5457600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018990529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015611daa57600080fd5b505af1158015611dbe573d6000803e3d6000fd5b505050506040513d6020811015611dd457600080fd5b50511515611de157600080fd5b6000861215611def57600080fd5b6005805460ff8916908110611e0057fe5b906000526020600020015473__Math__________________________________63a5f3c23b9091886040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b158015611e6657600080fd5b505af4158015611e7a573d6000803e3d6000fd5b505050506040513d6020811015611e9057600080fd5b50516005805460ff8a16908110611ea357fe5b600091825260209182902001919091556040805160ff8a168152918201889052818101859052606082018490525133917f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae410919081900360800190a25050509392505050565b620f4240815600a165627a7a72305820484aafaeacf87c73aeb16e21d02ea670d3ac05d4f796fb0a4b8433bc4e1ccf180029",
  "sourceMap": "279:8103:10:-;;;998:529;8:9:-1;5:2;;;30:1;27;20:12;5:2;998:529:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1165:28:10;;;;;;:58;;-1:-1:-1;;;;;;1197:26:10;;;;1165:58;:78;;;;-1:-1:-1;410:7:10;1227:16;;;;1165:78;1157:87;;;;;;;;1254:7;:18;;-1:-1:-1;;;;;1254:18:10;;;-1:-1:-1;;;;;;1254:18:10;;;;;;1299:12;1254:18;1282:29;1321:13;:30;;;;;;;;;;;;;;;1394:31;;;;;;;;:13;;;;;:29;;:31;;;;;;;;;;;;;;;;;:13;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;1394:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1394:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1394:31:10;1384:42;;;;;;;;;;1394:31;1384:42;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;1384:42:10;-1:-1:-1;1361:65:10;;;;:20;;:65;;;;;;:::i;:::-;-1:-1:-1;1436:3:10;:10;;-1:-1:-1;;;;;;1436:10:10;;;;;;;-1:-1:-1;;;;;;1456:26:10;-1:-1:-1;;;;;1456:26:10;;;;;1492:5;:28;;-1:-1:-1;;1492:5:10;-1:-1:-1;;1492:28:10;-1:-1:-1;;1492:28:10;;;;;998:529;;;;279:8103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;279:8103:10;;;-1:-1:-1;279:8103:10;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
  "deployedSourceMap": "279:8103:10:-;;;;;;;;;-1:-1:-1;;;279:8103:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;775:22:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;775:22:9;;;;;;;;-1:-1:-1;;;;;775:22:9;;;;;;;;;;;;;;867:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;867:30:9;;;;6896:1167:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6896:1167:10;;;;;;;;;;;;;;;;;;;;;;;;;;;2325:390;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2325:390:10;;;;;;5130:1297;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5130:1297:10;;;;;;;;;;;2820:288;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2820:288:10;;;;803:26:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;803:26:9;;;;951:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;951:33:9;;;;;8217:163:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8217:163:10;;;;;990:19:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;990:19:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1670:533:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1670:533:10;;;;;926:19:9;;8:9:-1;5:2;;;30:1;27;20:12;5:2;926:19:9;;;;903:17;;8:9:-1;5:2;;;30:1;27;20:12;5:2;903:17:9;;;;;;;;;;;;;;;;;;;;;;;835:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;835:26:9;;;;3435:1360:10;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3435:1360:10;;;;;;;;;;;375:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;375:42:10;;;;775:22:9;;;-1:-1:-1;;;;;775:22:9;;:::o;867:30::-;;;-1:-1:-1;;;;;867:30:9;;:::o;6896:1167:10:-;7012:9;7446:11;7615:18;7682:7;7076:13;;;;;;;;;-1:-1:-1;;;;;7076:13:10;-1:-1:-1;;;;;7076:29:10;;:31;;;;;-1:-1:-1;;;7076:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7076:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7076:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7076:31:10;:81;;;-1:-1:-1;;;;;7076:81:10;;7121:10;7076:81;;;;7133:4;7076:81;;;;;;;;;;;;-1:-1:-1;;;;;7076:44:10;;;;;;:81;;;;;:31;;:81;;;;;;;;-1:-1:-1;7076:44:10;:81;;;5:2:-1;;;;30:1;27;20:12;5:2;7076:81:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7076:81:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7076:81:10;:174;;;;;7177:13;;;;;;;;;-1:-1:-1;;;;;7177:13:10;-1:-1:-1;;;;;7177:29:10;;:31;;;;;-1:-1:-1;;;7177:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7177:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7177:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7177:31:10;7217:13;;7177:73;;;-1:-1:-1;;;;;7177:73:10;;-1:-1:-1;;;;;7217:13:10;;;7177:73;;;;;;;;;;;;:39;;;;;;;:73;;;;;:31;;:73;;;;;;;7217:13;7177:39;:73;;;5:2:-1;;;;30:1;27;20:12;5:2;7177:73:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7177:73:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7177:73:10;7076:174;7065:186;;;;;;;;7261:13;;:47;;;;;;;;;;;;;;-1:-1:-1;;;;;7261:13:10;;;;:28;;:47;;;;;:13;;:47;;;;;;;;:13;;:47;;;5:2:-1;;;;30:1;27;20:12;5:2;7261:47:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;7357:13:10;;:46;;;-1:-1:-1;;;;;7357:46:10;;;;;;;;;;;-1:-1:-1;;;;;7357:13:10;;;;-1:-1:-1;7357:27:10;;-1:-1:-1;7357:46:10;;;;;;;;;;;;;;;:13;;:46;;;5:2:-1;;;;30:1;27;20:12;5:2;7357:46:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7357:46:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7357:46:10;:79;;;-1:-1:-1;;;;;7357:79:10;;7412:4;7357:79;;;;;;;;;;;;-1:-1:-1;;;;;7357:54:10;;;;;;:79;;;;;:46;;:79;;;;;;;;-1:-1:-1;7357:54:10;:79;;;5:2:-1;;;;30:1;27;20:12;5:2;7357:79:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7357:79:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;7460:58:10;;;;;;;;;;;;;;;;;;;;;;;;;;;:4;;:9;;:58;;;;;7357:79;;7460:58;;;;;;;-1:-1:-1;7460:4:10;:58;;;5:2:-1;;;;30:1;27;20:12;5:2;7460:58:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7460:58:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7460:58:10;7636:13;;:31;;;;;;;;7535:26;;;;-1:-1:-1;7460:58:10;;-1:-1:-1;;;;;;7636:13:10;;;;:29;;:31;;;;;7460:58;;7636:31;;;;;;;;:13;;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;7636:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7636:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7636:31:10;;-1:-1:-1;7692:1:10;;-1:-1:-1;7677:176:10;7699:12;7695:16;;:1;:16;;;7677:176;;;7734:22;;;;;;;;7730:123;;7782:13;;:30;;;-1:-1:-1;;;;;7782:30:10;;;;;;;;;;;-1:-1:-1;;;;;7782:13:10;;;;:27;;:30;;;;;;;;;;;;;;;:13;;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;7782:30:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7782:30:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7782:30:10;:70;;;-1:-1:-1;;;;;7782:70:10;;7822:10;7782:70;;;;;;;;;;;;-1:-1:-1;;;;;7782:39:10;;;;;;:70;;;;;:30;;:70;;;;;;;;-1:-1:-1;7782:39:10;:70;;;5:2:-1;;;;30:1;27;20:12;5:2;7782:70:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7782:70:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7782:70:10;7774:79;;;;;;;;7713:3;;7677:176;;;7908:13;;;;;;;;;-1:-1:-1;;;;;7908:13:10;-1:-1:-1;;;;;7908:29:10;;:31;;;;;-1:-1:-1;;;7908:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7908:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7908:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7908:31:10;:60;;;-1:-1:-1;;;;;7908:60:10;;7949:10;7908:60;;;;;;;;;;;;-1:-1:-1;;;;;7908:40:10;;;;;;:60;;;;;:31;;:60;;;;;;;;-1:-1:-1;7908:40:10;:60;;;5:2:-1;;;;30:1;27;20:12;5:2;7908:60:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7908:60:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7908:60:10;7900:69;;;;;;;;7979:77;;;;;;;;;;;;;;;;;;;;;;8001:10;;7979:77;;;;;;;;;;6896:1167;;;;;;;;:::o;2325:390::-;2426:18;564:7;;2426:18;;-1:-1:-1;;;;;564:7:10;550:10;:21;542:30;;;;;;2391:19;;691:5;;;;:15;;;;;;;;;683:24;;;;;;2447:13;;;;;;;;;-1:-1:-1;;;;;2447:13:10;-1:-1:-1;;;;;2447:29:10;;:31;;;;;-1:-1:-1;;;2447:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2447:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2447:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2447:31:10;;-1:-1:-1;2503:1:10;;-1:-1:-1;2488:158:10;2510:12;2506:16;;:1;:16;;;2488:158;;;2549:13;;:30;;;-1:-1:-1;;;;;2549:30:10;;;;;;;;;;;-1:-1:-1;;;;;2549:13:10;;;;:27;;:30;;;;;;;;;;;;;;;:13;;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;2549:30:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2549:30:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2549:30:10;2589:7;;;2598:13;;:30;;;-1:-1:-1;;;;;2598:30:10;;;;;;;;;;;-1:-1:-1;;;;;2549:39:10;;;;;;2589:7;;;;2598:13;;;:27;;:30;;;;;2549;;2598;;;;;;;;;;;:13;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;2598:30:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2598:30:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2598:30:10;:46;;;;;;2639:4;2598:46;;;;;;-1:-1:-1;;;;;2598:40:10;;;;;;:46;;;;;:30;;:46;;;;;;;;-1:-1:-1;2598:40:10;:46;;;5:2:-1;;;;30:1;27;20:12;5:2;2598:46:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2598:46:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2598:46:10;2549:96;;;-1:-1:-1;;;2549:96:10;;;;;;-1:-1:-1;;;;;2549:96:10;;;;;;;;;;;;;;;;;;;;2598:46;;2549:96;;;;;;;-1:-1:-1;2549:96:10;;;;5:2:-1;;;;30:1;27;20:12;5:2;2549:96:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2549:96:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2549:96:10;2541:105;;;;;;;;2524:3;;;;;2488:158;;;2656:5;:27;;-1:-1:-1;;2656:27:10;2664:19;2656:27;;;2693:15;;;;-1:-1:-1;;2693:15:10;582:1;2325:390;;:::o;5130:1297::-;5278:11;;;5240:19;;691:5;;;;:15;;;;;;;;;683:24;;;;;;5386:11;;:66;;;;;;5409:4;5386:66;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5386:11:10;;;;:22;;:66;;;;;;;;;;;;;;;:11;;:66;;;5:2:-1;;;;30:1;27;20:12;5:2;5386:66:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5386:66:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5386:66:10;;-1:-1:-1;5517:33:10;5386:66;5517:13;:33::i;:::-;5505:45;;5569:18;:22;;;;5592:4;5569:28;;;;;-1:-1:-1;;;5569:28:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5569:28:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5569:28:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5569:28:10;;-1:-1:-1;5663:1:10;5654:10;;:33;;;;;5678:9;5668:6;:19;;5654:33;5646:42;;;;;;;;5782:13;;:46;;;-1:-1:-1;;;;;5782:46:10;;;;;;;;;;;-1:-1:-1;;;;;5782:13:10;;;;:27;;:46;;;;;;;;;;;;;;;:13;;:46;;;5:2:-1;;;;30:1;27;20:12;5:2;5782:46:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5782:46:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5782:46:10;:96;;;-1:-1:-1;;;;;5782:96:10;;5842:10;5782:96;;;;5854:4;5782:96;;;;;;;;;;;;-1:-1:-1;;;;;5782:59:10;;;;;;:96;;;;;:46;;:96;;;;;;;;-1:-1:-1;5782:59:10;:96;;;5:2:-1;;;;30:1;27;20:12;5:2;5782:96:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5782:96:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5782:96:10;5774:105;;;;;;;;5918:13;;:49;;;;;;;;;;;;;;-1:-1:-1;;;;;5918:13:10;;;;:29;;:49;;;;;:13;;:49;;;;;;;;:13;;:49;;;5:2:-1;;;;30:1;27;20:12;5:2;5918:49:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5918:49:10;;;;6022:13;;;;;;;;;-1:-1:-1;;;;;6022:13:10;-1:-1:-1;;;;;6022:29:10;;:31;;;;;-1:-1:-1;;;6022:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6022:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6022:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6022:31:10;:60;;;-1:-1:-1;;;;;6022:60:10;;6063:10;6022:60;;;;;;;;;;;;-1:-1:-1;;;;;6022:40:10;;;;;;:60;;;;;:31;;:60;;;;;;;;-1:-1:-1;6022:40:10;:60;;;5:2:-1;;;;30:1;27;20:12;5:2;6022:60:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6022:60:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6022:60:10;6014:69;;;;;;;;6197:1;6171:27;;;6163:36;;;;;;6251:20;:39;;;;;;;;;;;;;;;;;;;;:43;;;;6299:17;6251:67;;;;;-1:-1:-1;;;6251:67:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6251:67:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6251:67:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6251:67:10;6209:20;:39;;;;;;;;;;;;;;;;;;;;;;:109;;;;6328:92;;;;;;;;;;;;;;;;;;;;;;;;;;;6345:10;;6328:92;;;;;;;;;;5130:1297;;;;;;;;:::o;2820:288::-;2894:9;564:7;;-1:-1:-1;;;;;564:7:10;550:10;:21;542:30;;;;;;2926:13;;;;;;;;;-1:-1:-1;;;;;2926:13:10;-1:-1:-1;;;;;2926:29:10;;:31;;;;;-1:-1:-1;;;2926:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2926:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2926:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2926:31:10;:47;;;;;;2968:4;2926:47;;;;;;-1:-1:-1;;;;;2926:41:10;;;;;;:47;;;;;:31;;:47;;;;;;;;-1:-1:-1;2926:41:10;:47;;;5:2:-1;;;;30:1;27;20:12;5:2;2926:47:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2926:47:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2926:47:10;3016:13;;:31;;;;;;;;2926:47;;-1:-1:-1;;;;;;3016:13:10;;;;:29;;:31;;;;;2926:47;;3016:31;;;;;;;;:13;;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;3016:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3016:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3016:31:10;3057:7;;;3016:55;;;-1:-1:-1;;;;;3016:55:10;;-1:-1:-1;;;;;3057:7:10;;;3016:55;;;;;;;;;;;;:40;;;;;;;:55;;;;;:31;;:55;;;;;;;;;;;;:40;:55;;;5:2:-1;;;;30:1;27;20:12;5:2;3016:55:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3016:55:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3016:55:10;3008:64;;;;;;;;3082:19;;;;;;;;;;;;;;;;;2820:288;:::o;803:26:9:-;;;;:::o;951:33::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;951:33:9;:::o;8217:163:10:-;8358:3;;8312:4;;410:7;;8358:3;;;8339:34;8358:3;8339:22;;:34;;8217:163;-1:-1:-1;;8217:163:10:o;990:19:9:-;;;;;;:::o;1670:533:10:-;564:7;;-1:-1:-1;;;;;564:7:10;550:10;:21;542:30;;;;;;1748:20;;691:5;;;;:15;;;;;;;;;683:24;;;;;;1894:13;;;;;;;;;-1:-1:-1;;;;;1894:13:10;-1:-1:-1;;;;;1894:29:10;;:31;;;;;-1:-1:-1;;;1894:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1894:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1894:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1894:31:10;:72;;;-1:-1:-1;;;;;1894:72:10;;1939:10;1894:72;;;;1951:4;1894:72;;;;;;;;;;;;-1:-1:-1;;;;;1894:44:10;;;;;;:72;;;;;:31;;:72;;;;;;;;-1:-1:-1;1894:44:10;:72;;;5:2:-1;;;;30:1;27;20:12;5:2;1894:72:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1894:72:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1894:72:10;:156;;;;;1986:13;;;;;;;;;-1:-1:-1;;;;;1986:13:10;-1:-1:-1;;;;;1986:29:10;;:31;;;;;-1:-1:-1;;;1986:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1986:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1986:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1986:31:10;2026:13;;1986:64;;;-1:-1:-1;;;;;1986:64:10;;-1:-1:-1;;;;;2026:13:10;;;1986:64;;;;;;;;;;;;:39;;;;;;;:64;;;;;:31;;:64;;;;;;;2026:13;1986:39;:64;;;5:2:-1;;;;30:1;27;20:12;5:2;1986:64:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1986:64:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1986:64:10;1894:156;1883:168;;;;;;;;2061:13;;:38;;;;;;;;;;;;;;-1:-1:-1;;;;;2061:13:10;;;;:28;;:38;;;;;:13;;:38;;;;;;;;:13;;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;2061:38:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;2109:7:10;:18;;;-1:-1:-1;2137:5:10;:27;;-1:-1:-1;;2137:27:10;2145:19;2137:27;;;2174:22;;;;;;;;;;;;;;;;;;582:1;1670:533;:::o;926:19:9:-;;;;:::o;903:17::-;;;;;;;;;:::o;835:26::-;;;-1:-1:-1;;;;;835:26:9;;:::o;3435:1360:10:-;3580:9;;;3542:19;;691:5;;;;:15;;;;;;;;;683:24;;;;;;3677:11;;:64;;;;;;3698:4;3677:64;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3677:11:10;;;;:20;;:64;;;;;;;;;;;;;;;:11;;:64;;;5:2:-1;;;;30:1;27;20:12;5:2;3677:64:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3677:64:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3677:64:10;;-1:-1:-1;3807:31:10;3677:64;3807:13;:31::i;:::-;3795:43;;3855:16;:20;;;;3876:4;3855:26;;;;;-1:-1:-1;;;3855:26:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3855:26:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3855:26:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3855:26:10;;-1:-1:-1;3952:1:10;3945:8;;:27;;;;;3965:7;3957:4;:15;;3945:27;3937:36;;;;;;;;4062:13;;;;;;;;;-1:-1:-1;;;;;4062:13:10;-1:-1:-1;;;;;4062:29:10;;:31;;;;;-1:-1:-1;;;4062:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4062:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4062:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4062:31:10;:68;;;-1:-1:-1;;;;;4062:68:10;;4107:10;4062:68;;;;4119:4;4062:68;;;;;;;;;;;;-1:-1:-1;;;;;4062:44:10;;;;;;:68;;;;;:31;;:68;;;;;;;;-1:-1:-1;4062:44:10;:68;;;5:2:-1;;;;30:1;27;20:12;5:2;4062:68:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4062:68:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4062:68:10;:160;;;;;4150:13;;;;;;;;;-1:-1:-1;;;;;4150:13:10;-1:-1:-1;;;;;4150:29:10;;:31;;;;;-1:-1:-1;;;4150:31:10;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4150:31:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4150:31:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4150:31:10;4190:13;;4150:72;;;-1:-1:-1;;;;;4150:72:10;;-1:-1:-1;;;;;4190:13:10;;;4150:72;;;;;;;;;;;;:39;;;;;;;:72;;;;;:31;;:72;;;;;;;4190:13;4150:39;:72;;;5:2:-1;;;;30:1;27;20:12;5:2;4150:72:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4150:72:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4150:72:10;4062:160;4051:172;;;;;;;;4261:13;;:46;;;;;;;;;;;;;;-1:-1:-1;;;;;4261:13:10;;;;:28;;:46;;;;;:13;;:46;;;;;;;;:13;;:46;;;5:2:-1;;;;30:1;27;20:12;5:2;4261:46:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;4369:13:10;;:46;;;-1:-1:-1;;;;;4369:46:10;;;;;;;;;;;-1:-1:-1;;;;;4369:13:10;;;;-1:-1:-1;4369:27:10;;-1:-1:-1;4369:46:10;;;;;;;;;;;;;;;:13;;:46;;;5:2:-1;;;;30:1;27;20:12;5:2;4369:46:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4369:46:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4369:46:10;:86;;;-1:-1:-1;;;;;4369:86:10;;4425:10;4369:86;;;;;;;;;;;;-1:-1:-1;;;;;4369:55:10;;;;;;:86;;;;;:46;;:86;;;;;;;;-1:-1:-1;4369:55:10;:86;;;5:2:-1;;;;30:1;27;20:12;5:2;4369:86:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4369:86:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4369:86:10;4361:95;;;;;;;;4563:1;4537:27;;;4529:36;;;;;;4617:20;:39;;;;;;;;;;;;;;;;;;;;:43;;;;4665:17;4617:67;;;;;-1:-1:-1;;;4617:67:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4617:67:10;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4617:67:10;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4617:67:10;4575:20;:39;;;;;;;;;;;;;;;;;;;;;;:109;;;;4694:94;;;;;;;;;;;;;;;;;;;;;;;;;;;4715:10;;4694:94;;;;;;;;;;3435:1360;;;;;;;;:::o;375:42::-;410:7;375:42;:::o",
  "source": "pragma solidity ^0.4.15;\nimport \"../Markets/Market.sol\";\nimport \"../Tokens/Token.sol\";\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\n/// @title Market factory contract - Allows to create market contracts\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract StandardMarket is Market {\n    using Math for *;\n\n    /*\n     *  Constants\n     */\n    uint24 public constant FEE_RANGE = 1000000; // 100%\n\n    /*\n     *  Modifiers\n     */\n    modifier isCreator() {\n        // Only creator is allowed to proceed\n        require(msg.sender == creator);\n        _;\n    }\n\n    modifier atStage(Stages _stage) {\n        // Contract has to be in given stage\n        require(stage == _stage);\n        _;\n    }\n\n    /*\n     *  Public functions\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    function StandardMarket(address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)\n        public\n    {\n        // Validate inputs\n        require(address(_eventContract) != 0 && address(_marketMaker) != 0 && _fee < FEE_RANGE);\n        creator = _creator;\n        createdAtBlock = block.number;\n        eventContract = _eventContract;\n        netOutcomeTokensSold = new int[](eventContract.getOutcomeCount());\n        fee = _fee;\n        marketMaker = _marketMaker;\n        stage = Stages.MarketCreated;\n    }\n\n    /// @dev Allows to fund the market with collateral tokens converting them into outcome tokens\n    /// @param _funding Funding amount\n    function fund(uint _funding)\n        public\n        isCreator\n        atStage(Stages.MarketCreated)\n    {\n        // Request collateral tokens and allow event contract to transfer them to buy all outcomes\n        require(   eventContract.collateralToken().transferFrom(msg.sender, this, _funding)\n                && eventContract.collateralToken().approve(eventContract, _funding));\n        eventContract.buyAllOutcomes(_funding);\n        funding = _funding;\n        stage = Stages.MarketFunded;\n        MarketFunding(funding);\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        isCreator\n        atStage(Stages.MarketFunded)\n    {\n        uint8 outcomeCount = eventContract.getOutcomeCount();\n        for (uint8 i = 0; i < outcomeCount; i++)\n            require(eventContract.outcomeTokens(i).transfer(creator, eventContract.outcomeTokens(i).balanceOf(this)));\n        stage = Stages.MarketClosed;\n        MarketClosing();\n    }\n\n    /// @dev Allows market creator to withdraw fees generated by trades\n    /// @return Fee amount\n    function withdrawFees()\n        public\n        isCreator\n        returns (uint fees)\n    {\n        fees = eventContract.collateralToken().balanceOf(this);\n        // Transfer fees\n        require(eventContract.collateralToken().transfer(creator, fees));\n        FeeWithdrawal(fees);\n    }\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        atStage(Stages.MarketFunded)\n        returns (uint cost)\n    {\n        // Calculate cost to buy outcome tokens\n        uint outcomeTokenCost = marketMaker.calcCost(this, outcomeTokenIndex, outcomeTokenCount);\n        // Calculate fees charged by market\n        uint fees = calcMarketFee(outcomeTokenCost);\n        cost = outcomeTokenCost.add(fees);\n        // Check cost doesn't exceed max cost\n        require(cost > 0 && cost <= maxCost);\n        // Transfer tokens to markets contract and buy all outcomes\n        require(   eventContract.collateralToken().transferFrom(msg.sender, this, cost)\n                && eventContract.collateralToken().approve(eventContract, outcomeTokenCost));\n        // Buy all outcomes\n        eventContract.buyAllOutcomes(outcomeTokenCost);\n        // Transfer outcome tokens to buyer\n        require(eventContract.outcomeTokens(outcomeTokenIndex).transfer(msg.sender, outcomeTokenCount));\n        // Add outcome token count to market maker net balance\n        require(int(outcomeTokenCount) >= 0);\n        netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].add(int(outcomeTokenCount));\n        OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, outcomeTokenCost, fees);\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        atStage(Stages.MarketFunded)\n        returns (uint profit)\n    {\n        // Calculate profit for selling outcome tokens\n        uint outcomeTokenProfit = marketMaker.calcProfit(this, outcomeTokenIndex, outcomeTokenCount);\n        // Calculate fee charged by market\n        uint fees = calcMarketFee(outcomeTokenProfit);\n        profit = outcomeTokenProfit.sub(fees);\n        // Check profit is not too low\n        require(profit > 0 && profit >= minProfit);\n        // Transfer outcome tokens to markets contract to sell all outcomes\n        require(eventContract.outcomeTokens(outcomeTokenIndex).transferFrom(msg.sender, this, outcomeTokenCount));\n        // Sell all outcomes\n        eventContract.sellAllOutcomes(outcomeTokenProfit);\n        // Transfer profit to seller\n        require(eventContract.collateralToken().transfer(msg.sender, profit));\n        // Subtract outcome token count from market maker net balance\n        require(int(outcomeTokenCount) >= 0);\n        netOutcomeTokensSold[outcomeTokenIndex] = netOutcomeTokensSold[outcomeTokenIndex].sub(int(outcomeTokenCount));\n        OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, outcomeTokenProfit, fees);\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        // Buy all outcomes\n        require(   eventContract.collateralToken().transferFrom(msg.sender, this, outcomeTokenCount)\n                && eventContract.collateralToken().approve(eventContract, outcomeTokenCount));\n        eventContract.buyAllOutcomes(outcomeTokenCount);\n        // Short sell selected outcome\n        eventContract.outcomeTokens(outcomeTokenIndex).approve(this, outcomeTokenCount);\n        uint profit = this.sell(outcomeTokenIndex, outcomeTokenCount, minProfit);\n        cost = outcomeTokenCount - profit;\n        // Transfer outcome tokens to buyer\n        uint8 outcomeCount = eventContract.getOutcomeCount();\n        for (uint8 i = 0; i < outcomeCount; i++)\n            if (i != outcomeTokenIndex)\n                require(eventContract.outcomeTokens(i).transfer(msg.sender, outcomeTokenCount));\n        // Send change back to buyer\n        require(eventContract.collateralToken().transfer(msg.sender, profit));\n        OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);\n    }\n\n    /// @dev Calculates fee to be paid to market maker\n    /// @param outcomeTokenCost Cost for buying outcome tokens\n    /// @return Fee for trade\n    function calcMarketFee(uint outcomeTokenCost)\n        public\n        constant\n        returns (uint)\n    {\n        return outcomeTokenCost * fee / FEE_RANGE;\n    }\n}\n",
  "sourcePath": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol",
  "ast": {
    "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol",
    "exportedSymbols": {
      "StandardMarket": [
        2964
      ]
    },
    "id": 2965,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2376,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".15"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:10"
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/Market.sol",
        "file": "../Markets/Market.sol",
        "id": 2377,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 2375,
        "src": "25:31:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol",
        "file": "../Tokens/Token.sol",
        "id": 2378,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 3361,
        "src": "57:29:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Events/Event.sol",
        "file": "../Events/Event.sol",
        "id": 2379,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 1681,
        "src": "87:29:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/MarketMakers/MarketMaker.sol",
        "file": "../MarketMakers/MarketMaker.sol",
        "id": 2380,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 2252,
        "src": "117:41:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2381,
              "name": "Market",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2374,
              "src": "306:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Market_$2374",
                "typeString": "contract Market"
              }
            },
            "id": 2382,
            "nodeType": "InheritanceSpecifier",
            "src": "306:6:10"
          }
        ],
        "contractDependencies": [
          2374
        ],
        "contractKind": "contract",
        "documentation": "@title Market factory contract - Allows to create market contracts\n @author Stefan George - <stefan@gnosis.pm>",
        "fullyImplemented": true,
        "id": 2964,
        "linearizedBaseContracts": [
          2964,
          2374
        ],
        "name": "StandardMarket",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 2384,
            "libraryName": {
              "contractScope": null,
              "id": 2383,
              "name": "Math",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4611,
              "src": "325:4:10",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Math_$4611",
                "typeString": "library Math"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "319:17:10",
            "typeName": null
          },
          {
            "constant": true,
            "id": 2387,
            "name": "FEE_RANGE",
            "nodeType": "VariableDeclaration",
            "scope": 2964,
            "src": "375:42:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint24",
              "typeString": "uint24"
            },
            "typeName": {
              "id": 2385,
              "name": "uint24",
              "nodeType": "ElementaryTypeName",
              "src": "375:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint24",
                "typeString": "uint24"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "31303030303030",
              "id": 2386,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "410:7:10",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1000000"
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 2397,
              "nodeType": "Block",
              "src": "486:104:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2393,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2390,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9180,
                            "src": "550:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 2391,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "550:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2392,
                          "name": "creator",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2301,
                          "src": "564:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "550:21:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2389,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "542:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2394,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "542:30:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2395,
                  "nodeType": "ExpressionStatement",
                  "src": "542:30:10"
                },
                {
                  "id": 2396,
                  "nodeType": "PlaceholderStatement",
                  "src": "582:1:10"
                }
              ]
            },
            "documentation": null,
            "id": 2398,
            "name": "isCreator",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2388,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "483:2:10"
            },
            "src": "465:125:10",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2409,
              "nodeType": "Block",
              "src": "628:97:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_enum$_Stages_$2320",
                          "typeString": "enum Market.Stages"
                        },
                        "id": 2405,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2403,
                          "name": "stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2316,
                          "src": "691:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2320",
                            "typeString": "enum Market.Stages"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2404,
                          "name": "_stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2400,
                          "src": "700:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2320",
                            "typeString": "enum Market.Stages"
                          }
                        },
                        "src": "691:15:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2402,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "683:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2406,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "683:24:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2407,
                  "nodeType": "ExpressionStatement",
                  "src": "683:24:10"
                },
                {
                  "id": 2408,
                  "nodeType": "PlaceholderStatement",
                  "src": "717:1:10"
                }
              ]
            },
            "documentation": null,
            "id": 2410,
            "name": "atStage",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2401,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2400,
                  "name": "_stage",
                  "nodeType": "VariableDeclaration",
                  "scope": 2410,
                  "src": "613:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_Stages_$2320",
                    "typeString": "enum Market.Stages"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2399,
                    "name": "Stages",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2320,
                    "src": "613:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "612:15:10"
            },
            "src": "596:129:10",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2475,
              "nodeType": "Block",
              "src": "1120:407:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2436,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2432,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2426,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2423,
                                  "name": "_eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2414,
                                  "src": "1173:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2422,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1165:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2424,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1165:23:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2425,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1192:1:10",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "1165:28:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2431,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2428,
                                  "name": "_marketMaker",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2416,
                                  "src": "1205:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                                    "typeString": "contract MarketMaker"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                                    "typeString": "contract MarketMaker"
                                  }
                                ],
                                "id": 2427,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1197:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2429,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1197:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2430,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1222:1:10",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "1197:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "1165:58:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint24",
                            "typeString": "uint24"
                          },
                          "id": 2435,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2433,
                            "name": "_fee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2418,
                            "src": "1227:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2434,
                            "name": "FEE_RANGE",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2387,
                            "src": "1234:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "src": "1227:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1165:78:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2421,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "1157:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2437,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1157:87:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2438,
                  "nodeType": "ExpressionStatement",
                  "src": "1157:87:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2439,
                      "name": "creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2301,
                      "src": "1254:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2440,
                      "name": "_creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2412,
                      "src": "1264:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1254:18:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2442,
                  "nodeType": "ExpressionStatement",
                  "src": "1254:18:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2446,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2443,
                      "name": "createdAtBlock",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2303,
                      "src": "1282:14:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2444,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9170,
                        "src": "1299:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 2445,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1299:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1282:29:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2447,
                  "nodeType": "ExpressionStatement",
                  "src": "1282:29:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2450,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2448,
                      "name": "eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2305,
                      "src": "1321:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$1680",
                        "typeString": "contract Event"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2449,
                      "name": "_eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2414,
                      "src": "1337:14:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$1680",
                        "typeString": "contract Event"
                      }
                    },
                    "src": "1321:30:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$1680",
                      "typeString": "contract Event"
                    }
                  },
                  "id": 2451,
                  "nodeType": "ExpressionStatement",
                  "src": "1321:30:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2460,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2452,
                      "name": "netOutcomeTokensSold",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2314,
                      "src": "1361:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                        "typeString": "int256[] storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2456,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "1394:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2457,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getOutcomeCount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1619,
                            "src": "1394:29:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                              "typeString": "function () view external returns (uint8)"
                            }
                          },
                          "id": 2458,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1394:31:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2455,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "1384:9:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$",
                          "typeString": "function (uint256) pure returns (int256[] memory)"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 2453,
                            "name": "int",
                            "nodeType": "ElementaryTypeName",
                            "src": "1388:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 2454,
                          "length": null,
                          "nodeType": "ArrayTypeName",
                          "src": "1388:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        }
                      },
                      "id": 2459,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1384:42:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                        "typeString": "int256[] memory"
                      }
                    },
                    "src": "1361:65:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                      "typeString": "int256[] storage ref"
                    }
                  },
                  "id": 2461,
                  "nodeType": "ExpressionStatement",
                  "src": "1361:65:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2464,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2462,
                      "name": "fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2309,
                      "src": "1436:3:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2463,
                      "name": "_fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2418,
                      "src": "1442:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "1436:10:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "id": 2465,
                  "nodeType": "ExpressionStatement",
                  "src": "1436:10:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2468,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2466,
                      "name": "marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2307,
                      "src": "1456:11:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$2251",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2467,
                      "name": "_marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2416,
                      "src": "1470:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$2251",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "src": "1456:26:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$2251",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "id": 2469,
                  "nodeType": "ExpressionStatement",
                  "src": "1456:26:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2473,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2470,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "1492:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2471,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "1500:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2472,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketCreated",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1500:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "1492:28:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2474,
                  "nodeType": "ExpressionStatement",
                  "src": "1492:28:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2476,
            "implemented": true,
            "isConstructor": true,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "StandardMarket",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2419,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2412,
                  "name": "_creator",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1022:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2411,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1022:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2414,
                  "name": "_eventContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1040:20:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Event_$1680",
                    "typeString": "contract Event"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2413,
                    "name": "Event",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1680,
                    "src": "1040:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$1680",
                      "typeString": "contract Event"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2416,
                  "name": "_marketMaker",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1062:24:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                    "typeString": "contract MarketMaker"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2415,
                    "name": "MarketMaker",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2251,
                    "src": "1062:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$2251",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2418,
                  "name": "_fee",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1088:11:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 2417,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "1088:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1021:79:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2420,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1120:0:10"
            },
            "scope": 2964,
            "src": "998:529:10",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2526,
              "nodeType": "Block",
              "src": "1774:429:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2504,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2492,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "1939:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2493,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1939:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2494,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "1951:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2495,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2478,
                              "src": "1957:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2488,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "1894:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2489,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "1894:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1894:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2491,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "1894:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2496,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1894:72:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2501,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "2026:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2502,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2478,
                              "src": "2041:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2497,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "1986:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2498,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "1986:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2499,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1986:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2500,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "1986:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2503,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1986:64:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1894:156:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2487,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "1883:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2505,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1883:168:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2506,
                  "nodeType": "ExpressionStatement",
                  "src": "1883:168:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2510,
                        "name": "_funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2478,
                        "src": "2090:8:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2507,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "2061:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2509,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "2061:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2511,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2061:38:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2512,
                  "nodeType": "ExpressionStatement",
                  "src": "2061:38:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2515,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2513,
                      "name": "funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2311,
                      "src": "2109:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2514,
                      "name": "_funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2478,
                      "src": "2119:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2109:18:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2516,
                  "nodeType": "ExpressionStatement",
                  "src": "2109:18:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2520,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2517,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "2137:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2518,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "2145:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2519,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketFunded",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2145:19:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "2137:27:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2521,
                  "nodeType": "ExpressionStatement",
                  "src": "2137:27:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2523,
                        "name": "funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2311,
                        "src": "2188:7:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2522,
                      "name": "MarketFunding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2259,
                      "src": "2174:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2174:22:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2525,
                  "nodeType": "ExpressionStatement",
                  "src": "2174:22:10"
                }
              ]
            },
            "documentation": "@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount",
            "id": 2527,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2481,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2480,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "1722:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1722:9:10"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2483,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "1748:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2484,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketCreated",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "1748:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2485,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2482,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "1740:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1740:29:10"
              }
            ],
            "name": "fund",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2479,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2478,
                  "name": "_funding",
                  "nodeType": "VariableDeclaration",
                  "scope": 2527,
                  "src": "1684:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2477,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1684:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1683:15:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2486,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1774:0:10"
            },
            "scope": 2964,
            "src": "1670:533:10",
            "stateMutability": "nonpayable",
            "superFunction": 2325,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2578,
              "nodeType": "Block",
              "src": "2416:299:10",
              "statements": [
                {
                  "assignments": [
                    2537
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2537,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2579,
                      "src": "2426:18:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2536,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2426:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2541,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2538,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "2447:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2539,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1619,
                      "src": "2447:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2540,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2447:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2426:52:10"
                },
                {
                  "body": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2558,
                              "name": "creator",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2301,
                              "src": "2589:7:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2564,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9243,
                                  "src": "2639:4:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2561,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2543,
                                      "src": "2626:1:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2559,
                                      "name": "eventContract",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2305,
                                      "src": "2598:13:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Event_$1680",
                                        "typeString": "contract Event"
                                      }
                                    },
                                    "id": 2560,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "outcomeTokens",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1431,
                                    "src": "2598:27:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                      "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                    }
                                  },
                                  "id": 2562,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2598:30:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                    "typeString": "contract OutcomeToken"
                                  }
                                },
                                "id": 2563,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balanceOf",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3282,
                                "src": "2598:40:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                  "typeString": "function (address) view external returns (uint256)"
                                }
                              },
                              "id": 2565,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2598:46:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2555,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2543,
                                  "src": "2577:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2553,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "2549:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2554,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "outcomeTokens",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1431,
                                "src": "2549:27:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                }
                              },
                              "id": 2556,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2549:30:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                "typeString": "contract OutcomeToken"
                              }
                            },
                            "id": 2557,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3156,
                            "src": "2549:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2549:96:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 2552,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          9183,
                          9184
                        ],
                        "referencedDeclaration": 9183,
                        "src": "2541:7:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                          "typeString": "function (bool) pure"
                        }
                      },
                      "id": 2567,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2541:105:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2568,
                    "nodeType": "ExpressionStatement",
                    "src": "2541:105:10"
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2548,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2546,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2543,
                      "src": "2506:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2547,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2537,
                      "src": "2510:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "2506:16:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2569,
                  "initializationExpression": {
                    "assignments": [
                      2543
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2543,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2579,
                        "src": "2493:7:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2542,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "2493:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2545,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2544,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2503:1:10",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2493:11:10"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2550,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "2524:3:10",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2549,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2543,
                        "src": "2524:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2551,
                    "nodeType": "ExpressionStatement",
                    "src": "2524:3:10"
                  },
                  "nodeType": "ForStatement",
                  "src": "2488:158:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2573,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2570,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "2656:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2571,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "2664:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2572,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketClosed",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2664:19:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "2656:27:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2574,
                  "nodeType": "ExpressionStatement",
                  "src": "2656:27:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 2575,
                      "name": "MarketClosing",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2261,
                      "src": "2693:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 2576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2693:15:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2577,
                  "nodeType": "ExpressionStatement",
                  "src": "2693:15:10"
                }
              ]
            },
            "documentation": "@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator",
            "id": 2579,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2530,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2529,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "2365:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2365:9:10"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2532,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "2391:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2533,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2391:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2534,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2531,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "2383:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2383:28:10"
              }
            ],
            "name": "close",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2528,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2339:2:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2535,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2416:0:10"
            },
            "scope": 2964,
            "src": "2325:390:10",
            "stateMutability": "nonpayable",
            "superFunction": 2328,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2609,
              "nodeType": "Block",
              "src": "2909:199:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2586,
                      "name": "fees",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2584,
                      "src": "2919:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2591,
                          "name": "this",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9243,
                          "src": "2968:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_StandardMarket_$2964",
                            "typeString": "contract StandardMarket"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_StandardMarket_$2964",
                            "typeString": "contract StandardMarket"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2587,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "2926:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2588,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "collateralToken",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1422,
                            "src": "2926:29:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                              "typeString": "function () view external returns (contract Token)"
                            }
                          },
                          "id": 2589,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2926:31:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Token_$3360",
                            "typeString": "contract Token"
                          }
                        },
                        "id": 2590,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balanceOf",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3345,
                        "src": "2926:41:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                          "typeString": "function (address) view external returns (uint256)"
                        }
                      },
                      "id": 2592,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2926:47:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2919:54:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2594,
                  "nodeType": "ExpressionStatement",
                  "src": "2919:54:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2600,
                            "name": "creator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2301,
                            "src": "3057:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2601,
                            "name": "fees",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2584,
                            "src": "3066:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2596,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "3016:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2597,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "3016:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2598,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3016:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2599,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "3016:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2602,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3016:55:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2595,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "3008:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2603,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3008:64:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2604,
                  "nodeType": "ExpressionStatement",
                  "src": "3008:64:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2606,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2584,
                        "src": "3096:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2605,
                      "name": "FeeWithdrawal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2265,
                      "src": "3082:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2607,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3082:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2608,
                  "nodeType": "ExpressionStatement",
                  "src": "3082:19:10"
                }
              ]
            },
            "documentation": "@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount",
            "id": 2610,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2582,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2581,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "2867:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2867:9:10"
              }
            ],
            "name": "withdrawFees",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2580,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2841:2:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2585,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2584,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 2610,
                  "src": "2894:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2583,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2894:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2893:11:10"
            },
            "scope": 2964,
            "src": "2820:288:10",
            "stateMutability": "nonpayable",
            "superFunction": 2333,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2725,
              "nodeType": "Block",
              "src": "3595:1200:10",
              "statements": [
                {
                  "assignments": [
                    2626
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2626,
                      "name": "outcomeTokenCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2726,
                      "src": "3653:21:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2625,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3653:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2633,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2629,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "3698:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2630,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "3704:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2631,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "3723:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2627,
                        "name": "marketMaker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2307,
                        "src": "3677:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_MarketMaker_$2251",
                          "typeString": "contract MarketMaker"
                        }
                      },
                      "id": 2628,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "calcCost",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2230,
                      "src": "3677:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2374_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (contract Market,uint8,uint256) view external returns (uint256)"
                      }
                    },
                    "id": 2632,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3677:64:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3653:88:10"
                },
                {
                  "assignments": [
                    2635
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2635,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2726,
                      "src": "3795:9:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2634,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3795:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2639,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2637,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "3821:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2636,
                      "name": "calcMarketFee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2963
                      ],
                      "referencedDeclaration": 2963,
                      "src": "3807:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) view returns (uint256)"
                      }
                    },
                    "id": 2638,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3807:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3795:43:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2645,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2640,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2623,
                      "src": "3848:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2643,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2635,
                          "src": "3876:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2641,
                          "name": "outcomeTokenCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2626,
                          "src": "3855:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2642,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4417,
                        "src": "3855:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) view returns (uint256)"
                        }
                      },
                      "id": 2644,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3855:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3848:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2646,
                  "nodeType": "ExpressionStatement",
                  "src": "3848:33:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2654,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2650,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2648,
                            "name": "cost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2623,
                            "src": "3945:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2649,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3952:1:10",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3945:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2653,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2651,
                            "name": "cost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2623,
                            "src": "3957:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2652,
                            "name": "maxCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2616,
                            "src": "3965:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3957:15:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3945:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2647,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "3937:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2655,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3937:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2656,
                  "nodeType": "ExpressionStatement",
                  "src": "3937:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2674,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2662,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "4107:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4107:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2664,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "4119:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2665,
                              "name": "cost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2623,
                              "src": "4125:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2658,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "4062:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2659,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "4062:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2660,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4062:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2661,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "4062:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2666,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4062:68:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2671,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "4190:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2672,
                              "name": "outcomeTokenCost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2626,
                              "src": "4205:16:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2667,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "4150:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2668,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "4150:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2669,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4150:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2670,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "4150:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2673,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4150:72:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4062:160:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2657,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4051:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2675,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4051:172:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2676,
                  "nodeType": "ExpressionStatement",
                  "src": "4051:172:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2680,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "4290:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2677,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "4261:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2679,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "4261:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2681,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4261:46:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2682,
                  "nodeType": "ExpressionStatement",
                  "src": "4261:46:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2689,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "4425:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2690,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4425:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2691,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2614,
                            "src": "4437:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2686,
                                "name": "outcomeTokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2612,
                                "src": "4397:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2684,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "4369:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2685,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "outcomeTokens",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1431,
                              "src": "4369:27:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                              }
                            },
                            "id": 2687,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4369:46:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                              "typeString": "contract OutcomeToken"
                            }
                          },
                          "id": 2688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3156,
                          "src": "4369:55:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2692,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4369:86:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2683,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4361:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2693,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4361:95:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2694,
                  "nodeType": "ExpressionStatement",
                  "src": "4361:95:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 2700,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2697,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2614,
                              "src": "4541:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4537:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4537:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 2699,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4563:1:10",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4537:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2695,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4529:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2701,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4529:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2702,
                  "nodeType": "ExpressionStatement",
                  "src": "4529:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2714,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2703,
                        "name": "netOutcomeTokensSold",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2314,
                        "src": "4575:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                          "typeString": "int256[] storage ref"
                        }
                      },
                      "id": 2705,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2704,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "4596:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "4575:39:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2711,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2614,
                              "src": "4665:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2710,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4661:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2712,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4661:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 2706,
                            "name": "netOutcomeTokensSold",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2314,
                            "src": "4617:20:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                              "typeString": "int256[] storage ref"
                            }
                          },
                          "id": 2708,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 2707,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2612,
                            "src": "4638:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4617:39:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2709,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4568,
                        "src": "4617:43:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) view returns (int256)"
                        }
                      },
                      "id": 2713,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4617:67:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "4575:109:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2715,
                  "nodeType": "ExpressionStatement",
                  "src": "4575:109:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2717,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "4715:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2718,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4715:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2719,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "4727:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2720,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4746:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2721,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "4765:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2722,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2635,
                        "src": "4783:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2716,
                      "name": "OutcomeTokenPurchase",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2277,
                      "src": "4694:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256,uint256)"
                      }
                    },
                    "id": 2723,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4694:94:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2724,
                  "nodeType": "ExpressionStatement",
                  "src": "4694:94:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2726,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2619,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "3542:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2620,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "3542:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2621,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2618,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "3534:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3534:28:10"
              }
            ],
            "name": "buy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2617,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2612,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3448:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2611,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3448:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2614,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3473:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2613,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3473:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2616,
                  "name": "maxCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3497:12:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2615,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3497:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3447:63:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2624,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2623,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3580:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2622,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3580:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3579:11:10"
            },
            "scope": 2964,
            "src": "3435:1360:10",
            "stateMutability": "nonpayable",
            "superFunction": 2344,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2833,
              "nodeType": "Block",
              "src": "5295:1132:10",
              "statements": [
                {
                  "assignments": [
                    2742
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2742,
                      "name": "outcomeTokenProfit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2834,
                      "src": "5360:23:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2741,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5360:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2749,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2745,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "5409:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2746,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "5415:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2747,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2730,
                        "src": "5434:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2743,
                        "name": "marketMaker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2307,
                        "src": "5386:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_MarketMaker_$2251",
                          "typeString": "contract MarketMaker"
                        }
                      },
                      "id": 2744,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "calcProfit",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2241,
                      "src": "5386:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2374_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (contract Market,uint8,uint256) view external returns (uint256)"
                      }
                    },
                    "id": 2748,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5386:66:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5360:92:10"
                },
                {
                  "assignments": [
                    2751
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2751,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2834,
                      "src": "5505:9:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2750,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5505:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2755,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2753,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5531:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2752,
                      "name": "calcMarketFee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2963
                      ],
                      "referencedDeclaration": 2963,
                      "src": "5517:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) view returns (uint256)"
                      }
                    },
                    "id": 2754,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5517:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5505:45:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2761,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2756,
                      "name": "profit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2739,
                      "src": "5560:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2759,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2751,
                          "src": "5592:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2757,
                          "name": "outcomeTokenProfit",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2742,
                          "src": "5569:18:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2758,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4438,
                        "src": "5569:22:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) view returns (uint256)"
                        }
                      },
                      "id": 2760,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5569:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5560:37:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2762,
                  "nodeType": "ExpressionStatement",
                  "src": "5560:37:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2770,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2766,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2764,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "5654:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2765,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5663:1:10",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5654:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2767,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "5668:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2768,
                            "name": "minProfit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2732,
                            "src": "5678:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5668:19:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5654:33:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2763,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "5646:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2771,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5646:42:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2772,
                  "nodeType": "ExpressionStatement",
                  "src": "5646:42:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2779,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "5842:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2780,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5842:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2781,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9243,
                            "src": "5854:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_StandardMarket_$2964",
                              "typeString": "contract StandardMarket"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2782,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2730,
                            "src": "5860:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_contract$_StandardMarket_$2964",
                              "typeString": "contract StandardMarket"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2776,
                                "name": "outcomeTokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2728,
                                "src": "5810:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2774,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "5782:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2775,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "outcomeTokens",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1431,
                              "src": "5782:27:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                              }
                            },
                            "id": 2777,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5782:46:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                              "typeString": "contract OutcomeToken"
                            }
                          },
                          "id": 2778,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transferFrom",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3226,
                          "src": "5782:59:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2783,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5782:96:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2773,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "5774:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2784,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5774:105:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2785,
                  "nodeType": "ExpressionStatement",
                  "src": "5774:105:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2789,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5948:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2786,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "5918:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2788,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sellAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1581,
                      "src": "5918:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2790,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5918:49:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2791,
                  "nodeType": "ExpressionStatement",
                  "src": "5918:49:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2797,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "6063:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2798,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "6063:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2799,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "6075:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2793,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "6022:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2794,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "6022:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2795,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6022:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "6022:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2800,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6022:60:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2792,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "6014:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2801,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6014:69:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2802,
                  "nodeType": "ExpressionStatement",
                  "src": "6014:69:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 2808,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2805,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2730,
                              "src": "6175:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2804,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "6171:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6171:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 2807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6197:1:10",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6171:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2803,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "6163:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2809,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6163:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2810,
                  "nodeType": "ExpressionStatement",
                  "src": "6163:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2822,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2811,
                        "name": "netOutcomeTokensSold",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2314,
                        "src": "6209:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                          "typeString": "int256[] storage ref"
                        }
                      },
                      "id": 2813,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2812,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "6230:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "6209:39:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2819,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2730,
                              "src": "6299:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2818,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "6295:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2820,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6295:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 2814,
                            "name": "netOutcomeTokensSold",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2314,
                            "src": "6251:20:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                              "typeString": "int256[] storage ref"
                            }
                          },
                          "id": 2816,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 2815,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2728,
                            "src": "6272:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "6251:39:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2817,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4589,
                        "src": "6251:43:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) view returns (int256)"
                        }
                      },
                      "id": 2821,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6251:67:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "6209:109:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2823,
                  "nodeType": "ExpressionStatement",
                  "src": "6209:109:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2825,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "6345:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2826,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6345:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2827,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "6357:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2828,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2730,
                        "src": "6376:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2829,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "6395:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2830,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2751,
                        "src": "6415:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2824,
                      "name": "OutcomeTokenSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2289,
                      "src": "6328:16:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256,uint256)"
                      }
                    },
                    "id": 2831,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6328:92:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2832,
                  "nodeType": "ExpressionStatement",
                  "src": "6328:92:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2834,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2735,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "5240:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "5240:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2737,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2734,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "5232:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "5232:28:10"
              }
            ],
            "name": "sell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2733,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2728,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5144:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2727,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5144:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2730,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5169:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2729,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5169:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2732,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5193:14:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2731,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5193:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5143:65:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2740,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2739,
                  "name": "profit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5278:11:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2738,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5278:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5277:13:10"
            },
            "scope": 2964,
            "src": "5130:1297:10",
            "stateMutability": "nonpayable",
            "superFunction": 2355,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2948,
              "nodeType": "Block",
              "src": "7027:1036:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2862,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2850,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "7121:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2851,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "7121:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2852,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "7133:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2853,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2838,
                              "src": "7139:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2846,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "7076:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2847,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "7076:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2848,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7076:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2849,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "7076:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2854,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7076:81:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2859,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "7217:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2860,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2838,
                              "src": "7232:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2855,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "7177:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2856,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "7177:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2857,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7177:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2858,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "7177:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7177:73:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "7076:174:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2845,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "7065:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7065:186:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2864,
                  "nodeType": "ExpressionStatement",
                  "src": "7065:186:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2868,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7290:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2865,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "7261:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2867,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "7261:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2869,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7261:47:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2870,
                  "nodeType": "ExpressionStatement",
                  "src": "7261:47:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2877,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "7412:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2878,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7418:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2874,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2836,
                            "src": "7385:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2871,
                            "name": "eventContract",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2305,
                            "src": "7357:13:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Event_$1680",
                              "typeString": "contract Event"
                            }
                          },
                          "id": 2873,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "outcomeTokens",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1431,
                          "src": "7357:27:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                            "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                          }
                        },
                        "id": 2875,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7357:46:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                          "typeString": "contract OutcomeToken"
                        }
                      },
                      "id": 2876,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3254,
                      "src": "7357:54:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 2879,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7357:79:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2880,
                  "nodeType": "ExpressionStatement",
                  "src": "7357:79:10"
                },
                {
                  "assignments": [
                    2882
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2882,
                      "name": "profit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2949,
                      "src": "7446:11:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2881,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7446:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2889,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2885,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "7470:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2886,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7489:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2887,
                        "name": "minProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2840,
                        "src": "7508:9:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2883,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "7460:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      "id": 2884,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sell",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2834,
                      "src": "7460:9:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint8,uint256,uint256) external returns (uint256)"
                      }
                    },
                    "id": 2888,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7460:58:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7446:72:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2894,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2890,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2843,
                      "src": "7528:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2893,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2891,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7535:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2892,
                        "name": "profit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2882,
                        "src": "7555:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7535:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7528:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2895,
                  "nodeType": "ExpressionStatement",
                  "src": "7528:33:10"
                },
                {
                  "assignments": [
                    2897
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2897,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2949,
                      "src": "7615:18:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2896,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "7615:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2901,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2898,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "7636:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2899,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1619,
                      "src": "7636:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7636:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7615:52:10"
                },
                {
                  "body": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 2914,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2912,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2903,
                        "src": "7734:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2913,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "7739:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "src": "7734:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 2927,
                    "nodeType": "IfStatement",
                    "src": "7730:123:10",
                    "trueBody": {
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2921,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9180,
                                  "src": "7822:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 2922,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "7822:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "id": 2923,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2838,
                                "src": "7834:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 2918,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2903,
                                    "src": "7810:1:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2916,
                                    "name": "eventContract",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2305,
                                    "src": "7782:13:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Event_$1680",
                                      "typeString": "contract Event"
                                    }
                                  },
                                  "id": 2917,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "outcomeTokens",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1431,
                                  "src": "7782:27:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                    "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                  }
                                },
                                "id": 2919,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7782:30:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                  "typeString": "contract OutcomeToken"
                                }
                              },
                              "id": 2920,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "transfer",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3156,
                              "src": "7782:39:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                "typeString": "function (address,uint256) external returns (bool)"
                              }
                            },
                            "id": 2924,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7782:70:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "id": 2915,
                          "name": "require",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            9183,
                            9184
                          ],
                          "referencedDeclaration": 9183,
                          "src": "7774:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                            "typeString": "function (bool) pure"
                          }
                        },
                        "id": 2925,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7774:79:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_tuple$__$",
                          "typeString": "tuple()"
                        }
                      },
                      "id": 2926,
                      "nodeType": "ExpressionStatement",
                      "src": "7774:79:10"
                    }
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2908,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2906,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2903,
                      "src": "7695:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2907,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2897,
                      "src": "7699:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "7695:16:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2928,
                  "initializationExpression": {
                    "assignments": [
                      2903
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2903,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2949,
                        "src": "7682:7:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2902,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "7682:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2905,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2904,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7692:1:10",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "7682:11:10"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2910,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "7713:3:10",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2909,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2903,
                        "src": "7713:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2911,
                    "nodeType": "ExpressionStatement",
                    "src": "7713:3:10"
                  },
                  "nodeType": "ForStatement",
                  "src": "7677:176:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2934,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "7949:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2935,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "7949:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2936,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2882,
                            "src": "7961:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2930,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "7908:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2931,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "7908:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2932,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7908:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2933,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "7908:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2937,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7908:60:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2929,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "7900:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2938,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7900:69:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2939,
                  "nodeType": "ExpressionStatement",
                  "src": "7900:69:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2941,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "8001:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2942,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8001:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2943,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "8013:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2944,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "8032:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2945,
                        "name": "cost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2843,
                        "src": "8051:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2940,
                      "name": "OutcomeTokenShortSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2299,
                      "src": "7979:21:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256)"
                      }
                    },
                    "id": 2946,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7979:77:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2947,
                  "nodeType": "ExpressionStatement",
                  "src": "7979:77:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2949,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "shortSell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2841,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2836,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6915:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2835,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6915:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2838,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6940:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2837,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6940:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2840,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6964:14:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2839,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6914:65:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2844,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2843,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "7012:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2842,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "7012:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7011:11:10"
            },
            "scope": 2964,
            "src": "6896:1167:10",
            "stateMutability": "nonpayable",
            "superFunction": 2366,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2962,
              "nodeType": "Block",
              "src": "8322:58:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2960,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2958,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2956,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2951,
                        "src": "8339:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "*",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2957,
                        "name": "fee",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2309,
                        "src": "8358:3:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint24",
                          "typeString": "uint24"
                        }
                      },
                      "src": "8339:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2959,
                      "name": "FEE_RANGE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2387,
                      "src": "8364:9:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "8339:34:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 2955,
                  "id": 2961,
                  "nodeType": "Return",
                  "src": "8332:41:10"
                }
              ]
            },
            "documentation": "@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade",
            "id": 2963,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "calcMarketFee",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2952,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2951,
                  "name": "outcomeTokenCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2963,
                  "src": "8240:21:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2950,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8240:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8239:23:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2955,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2954,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2963,
                  "src": "8312:4:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2953,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8312:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8311:6:10"
            },
            "scope": 2964,
            "src": "8217:163:10",
            "stateMutability": "view",
            "superFunction": 2373,
            "visibility": "public"
          }
        ],
        "scope": 2965,
        "src": "279:8103:10"
      }
    ],
    "src": "0:8383:10"
  },
  "legacyAST": {
    "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/StandardMarket.sol",
    "exportedSymbols": {
      "StandardMarket": [
        2964
      ]
    },
    "id": 2965,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2376,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".15"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:10"
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Markets/Market.sol",
        "file": "../Markets/Market.sol",
        "id": 2377,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 2375,
        "src": "25:31:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol",
        "file": "../Tokens/Token.sol",
        "id": 2378,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 3361,
        "src": "57:29:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/Events/Event.sol",
        "file": "../Events/Event.sol",
        "id": 2379,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 1681,
        "src": "87:29:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@gnosis.pm/pm-contracts/contracts/MarketMakers/MarketMaker.sol",
        "file": "../MarketMakers/MarketMaker.sol",
        "id": 2380,
        "nodeType": "ImportDirective",
        "scope": 2965,
        "sourceUnit": 2252,
        "src": "117:41:10",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2381,
              "name": "Market",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2374,
              "src": "306:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Market_$2374",
                "typeString": "contract Market"
              }
            },
            "id": 2382,
            "nodeType": "InheritanceSpecifier",
            "src": "306:6:10"
          }
        ],
        "contractDependencies": [
          2374
        ],
        "contractKind": "contract",
        "documentation": "@title Market factory contract - Allows to create market contracts\n @author Stefan George - <stefan@gnosis.pm>",
        "fullyImplemented": true,
        "id": 2964,
        "linearizedBaseContracts": [
          2964,
          2374
        ],
        "name": "StandardMarket",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 2384,
            "libraryName": {
              "contractScope": null,
              "id": 2383,
              "name": "Math",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4611,
              "src": "325:4:10",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Math_$4611",
                "typeString": "library Math"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "319:17:10",
            "typeName": null
          },
          {
            "constant": true,
            "id": 2387,
            "name": "FEE_RANGE",
            "nodeType": "VariableDeclaration",
            "scope": 2964,
            "src": "375:42:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint24",
              "typeString": "uint24"
            },
            "typeName": {
              "id": 2385,
              "name": "uint24",
              "nodeType": "ElementaryTypeName",
              "src": "375:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint24",
                "typeString": "uint24"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "31303030303030",
              "id": 2386,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "410:7:10",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1000000"
            },
            "visibility": "public"
          },
          {
            "body": {
              "id": 2397,
              "nodeType": "Block",
              "src": "486:104:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2393,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2390,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9180,
                            "src": "550:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 2391,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "550:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2392,
                          "name": "creator",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2301,
                          "src": "564:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "550:21:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2389,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "542:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2394,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "542:30:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2395,
                  "nodeType": "ExpressionStatement",
                  "src": "542:30:10"
                },
                {
                  "id": 2396,
                  "nodeType": "PlaceholderStatement",
                  "src": "582:1:10"
                }
              ]
            },
            "documentation": null,
            "id": 2398,
            "name": "isCreator",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2388,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "483:2:10"
            },
            "src": "465:125:10",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2409,
              "nodeType": "Block",
              "src": "628:97:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_enum$_Stages_$2320",
                          "typeString": "enum Market.Stages"
                        },
                        "id": 2405,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2403,
                          "name": "stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2316,
                          "src": "691:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2320",
                            "typeString": "enum Market.Stages"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2404,
                          "name": "_stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2400,
                          "src": "700:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2320",
                            "typeString": "enum Market.Stages"
                          }
                        },
                        "src": "691:15:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2402,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "683:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2406,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "683:24:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2407,
                  "nodeType": "ExpressionStatement",
                  "src": "683:24:10"
                },
                {
                  "id": 2408,
                  "nodeType": "PlaceholderStatement",
                  "src": "717:1:10"
                }
              ]
            },
            "documentation": null,
            "id": 2410,
            "name": "atStage",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2401,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2400,
                  "name": "_stage",
                  "nodeType": "VariableDeclaration",
                  "scope": 2410,
                  "src": "613:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_Stages_$2320",
                    "typeString": "enum Market.Stages"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2399,
                    "name": "Stages",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2320,
                    "src": "613:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "612:15:10"
            },
            "src": "596:129:10",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2475,
              "nodeType": "Block",
              "src": "1120:407:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2436,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2432,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2426,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2423,
                                  "name": "_eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2414,
                                  "src": "1173:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2422,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1165:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2424,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1165:23:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2425,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1192:1:10",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "1165:28:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2431,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2428,
                                  "name": "_marketMaker",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2416,
                                  "src": "1205:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                                    "typeString": "contract MarketMaker"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                                    "typeString": "contract MarketMaker"
                                  }
                                ],
                                "id": 2427,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1197:7:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2429,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1197:21:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 2430,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1222:1:10",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            "src": "1197:26:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "1165:58:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint24",
                            "typeString": "uint24"
                          },
                          "id": 2435,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2433,
                            "name": "_fee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2418,
                            "src": "1227:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2434,
                            "name": "FEE_RANGE",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2387,
                            "src": "1234:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "src": "1227:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1165:78:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2421,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "1157:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2437,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1157:87:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2438,
                  "nodeType": "ExpressionStatement",
                  "src": "1157:87:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2441,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2439,
                      "name": "creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2301,
                      "src": "1254:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2440,
                      "name": "_creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2412,
                      "src": "1264:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1254:18:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2442,
                  "nodeType": "ExpressionStatement",
                  "src": "1254:18:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2446,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2443,
                      "name": "createdAtBlock",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2303,
                      "src": "1282:14:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2444,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9170,
                        "src": "1299:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 2445,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1299:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1282:29:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2447,
                  "nodeType": "ExpressionStatement",
                  "src": "1282:29:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2450,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2448,
                      "name": "eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2305,
                      "src": "1321:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$1680",
                        "typeString": "contract Event"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2449,
                      "name": "_eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2414,
                      "src": "1337:14:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$1680",
                        "typeString": "contract Event"
                      }
                    },
                    "src": "1321:30:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$1680",
                      "typeString": "contract Event"
                    }
                  },
                  "id": 2451,
                  "nodeType": "ExpressionStatement",
                  "src": "1321:30:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2460,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2452,
                      "name": "netOutcomeTokensSold",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2314,
                      "src": "1361:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                        "typeString": "int256[] storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2456,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "1394:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2457,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getOutcomeCount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1619,
                            "src": "1394:29:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                              "typeString": "function () view external returns (uint8)"
                            }
                          },
                          "id": 2458,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1394:31:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2455,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "1384:9:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_int256_$dyn_memory_$",
                          "typeString": "function (uint256) pure returns (int256[] memory)"
                        },
                        "typeName": {
                          "baseType": {
                            "id": 2453,
                            "name": "int",
                            "nodeType": "ElementaryTypeName",
                            "src": "1388:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 2454,
                          "length": null,
                          "nodeType": "ArrayTypeName",
                          "src": "1388:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        }
                      },
                      "id": 2459,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1384:42:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                        "typeString": "int256[] memory"
                      }
                    },
                    "src": "1361:65:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                      "typeString": "int256[] storage ref"
                    }
                  },
                  "id": 2461,
                  "nodeType": "ExpressionStatement",
                  "src": "1361:65:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2464,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2462,
                      "name": "fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2309,
                      "src": "1436:3:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2463,
                      "name": "_fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2418,
                      "src": "1442:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "1436:10:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "id": 2465,
                  "nodeType": "ExpressionStatement",
                  "src": "1436:10:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2468,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2466,
                      "name": "marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2307,
                      "src": "1456:11:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$2251",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2467,
                      "name": "_marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2416,
                      "src": "1470:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$2251",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "src": "1456:26:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$2251",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "id": 2469,
                  "nodeType": "ExpressionStatement",
                  "src": "1456:26:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2473,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2470,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "1492:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2471,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "1500:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2472,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketCreated",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1500:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "1492:28:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2474,
                  "nodeType": "ExpressionStatement",
                  "src": "1492:28:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2476,
            "implemented": true,
            "isConstructor": true,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "StandardMarket",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2419,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2412,
                  "name": "_creator",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1022:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2411,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1022:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2414,
                  "name": "_eventContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1040:20:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Event_$1680",
                    "typeString": "contract Event"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2413,
                    "name": "Event",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1680,
                    "src": "1040:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$1680",
                      "typeString": "contract Event"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2416,
                  "name": "_marketMaker",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1062:24:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_MarketMaker_$2251",
                    "typeString": "contract MarketMaker"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2415,
                    "name": "MarketMaker",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2251,
                    "src": "1062:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$2251",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2418,
                  "name": "_fee",
                  "nodeType": "VariableDeclaration",
                  "scope": 2476,
                  "src": "1088:11:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 2417,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "1088:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1021:79:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2420,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1120:0:10"
            },
            "scope": 2964,
            "src": "998:529:10",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2526,
              "nodeType": "Block",
              "src": "1774:429:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2504,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2492,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "1939:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2493,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1939:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2494,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "1951:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2495,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2478,
                              "src": "1957:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2488,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "1894:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2489,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "1894:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1894:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2491,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "1894:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2496,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1894:72:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2501,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "2026:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2502,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2478,
                              "src": "2041:8:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2497,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "1986:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2498,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "1986:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2499,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1986:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2500,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "1986:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2503,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1986:64:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1894:156:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2487,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "1883:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2505,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1883:168:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2506,
                  "nodeType": "ExpressionStatement",
                  "src": "1883:168:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2510,
                        "name": "_funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2478,
                        "src": "2090:8:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2507,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "2061:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2509,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "2061:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2511,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2061:38:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2512,
                  "nodeType": "ExpressionStatement",
                  "src": "2061:38:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2515,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2513,
                      "name": "funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2311,
                      "src": "2109:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2514,
                      "name": "_funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2478,
                      "src": "2119:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2109:18:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2516,
                  "nodeType": "ExpressionStatement",
                  "src": "2109:18:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2520,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2517,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "2137:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2518,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "2145:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2519,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketFunded",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2145:19:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "2137:27:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2521,
                  "nodeType": "ExpressionStatement",
                  "src": "2137:27:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2523,
                        "name": "funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2311,
                        "src": "2188:7:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2522,
                      "name": "MarketFunding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2259,
                      "src": "2174:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2174:22:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2525,
                  "nodeType": "ExpressionStatement",
                  "src": "2174:22:10"
                }
              ]
            },
            "documentation": "@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount",
            "id": 2527,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2481,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2480,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "1722:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1722:9:10"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2483,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "1748:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2484,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketCreated",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "1748:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2485,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2482,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "1740:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1740:29:10"
              }
            ],
            "name": "fund",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2479,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2478,
                  "name": "_funding",
                  "nodeType": "VariableDeclaration",
                  "scope": 2527,
                  "src": "1684:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2477,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1684:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1683:15:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2486,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1774:0:10"
            },
            "scope": 2964,
            "src": "1670:533:10",
            "stateMutability": "nonpayable",
            "superFunction": 2325,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2578,
              "nodeType": "Block",
              "src": "2416:299:10",
              "statements": [
                {
                  "assignments": [
                    2537
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2537,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2579,
                      "src": "2426:18:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2536,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2426:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2541,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2538,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "2447:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2539,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1619,
                      "src": "2447:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2540,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2447:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2426:52:10"
                },
                {
                  "body": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2558,
                              "name": "creator",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2301,
                              "src": "2589:7:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2564,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9243,
                                  "src": "2639:4:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2561,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2543,
                                      "src": "2626:1:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2559,
                                      "name": "eventContract",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2305,
                                      "src": "2598:13:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Event_$1680",
                                        "typeString": "contract Event"
                                      }
                                    },
                                    "id": 2560,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "outcomeTokens",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1431,
                                    "src": "2598:27:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                      "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                    }
                                  },
                                  "id": 2562,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2598:30:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                    "typeString": "contract OutcomeToken"
                                  }
                                },
                                "id": 2563,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balanceOf",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3282,
                                "src": "2598:40:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                  "typeString": "function (address) view external returns (uint256)"
                                }
                              },
                              "id": 2565,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2598:46:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2555,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2543,
                                  "src": "2577:1:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2553,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "2549:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2554,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "outcomeTokens",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1431,
                                "src": "2549:27:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                }
                              },
                              "id": 2556,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2549:30:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                "typeString": "contract OutcomeToken"
                              }
                            },
                            "id": 2557,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3156,
                            "src": "2549:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2549:96:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 2552,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          9183,
                          9184
                        ],
                        "referencedDeclaration": 9183,
                        "src": "2541:7:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                          "typeString": "function (bool) pure"
                        }
                      },
                      "id": 2567,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2541:105:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2568,
                    "nodeType": "ExpressionStatement",
                    "src": "2541:105:10"
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2548,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2546,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2543,
                      "src": "2506:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2547,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2537,
                      "src": "2510:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "2506:16:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2569,
                  "initializationExpression": {
                    "assignments": [
                      2543
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2543,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2579,
                        "src": "2493:7:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2542,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "2493:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2545,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2544,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2503:1:10",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2493:11:10"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2550,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "2524:3:10",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2549,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2543,
                        "src": "2524:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2551,
                    "nodeType": "ExpressionStatement",
                    "src": "2524:3:10"
                  },
                  "nodeType": "ForStatement",
                  "src": "2488:158:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2573,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2570,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2316,
                      "src": "2656:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2571,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2320,
                        "src": "2664:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                          "typeString": "type(enum Market.Stages)"
                        }
                      },
                      "id": 2572,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketClosed",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2664:19:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2320",
                        "typeString": "enum Market.Stages"
                      }
                    },
                    "src": "2656:27:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  },
                  "id": 2574,
                  "nodeType": "ExpressionStatement",
                  "src": "2656:27:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 2575,
                      "name": "MarketClosing",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2261,
                      "src": "2693:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 2576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2693:15:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2577,
                  "nodeType": "ExpressionStatement",
                  "src": "2693:15:10"
                }
              ]
            },
            "documentation": "@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator",
            "id": 2579,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2530,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2529,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "2365:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2365:9:10"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2532,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "2391:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2533,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2391:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2534,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2531,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "2383:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2383:28:10"
              }
            ],
            "name": "close",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2528,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2339:2:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2535,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2416:0:10"
            },
            "scope": 2964,
            "src": "2325:390:10",
            "stateMutability": "nonpayable",
            "superFunction": 2328,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2609,
              "nodeType": "Block",
              "src": "2909:199:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2586,
                      "name": "fees",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2584,
                      "src": "2919:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2591,
                          "name": "this",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9243,
                          "src": "2968:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_StandardMarket_$2964",
                            "typeString": "contract StandardMarket"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_StandardMarket_$2964",
                            "typeString": "contract StandardMarket"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2587,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "2926:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2588,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "collateralToken",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1422,
                            "src": "2926:29:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                              "typeString": "function () view external returns (contract Token)"
                            }
                          },
                          "id": 2589,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2926:31:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_Token_$3360",
                            "typeString": "contract Token"
                          }
                        },
                        "id": 2590,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balanceOf",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 3345,
                        "src": "2926:41:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                          "typeString": "function (address) view external returns (uint256)"
                        }
                      },
                      "id": 2592,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2926:47:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2919:54:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2594,
                  "nodeType": "ExpressionStatement",
                  "src": "2919:54:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2600,
                            "name": "creator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2301,
                            "src": "3057:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2601,
                            "name": "fees",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2584,
                            "src": "3066:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2596,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "3016:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2597,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "3016:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2598,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3016:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2599,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "3016:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2602,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3016:55:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2595,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "3008:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2603,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3008:64:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2604,
                  "nodeType": "ExpressionStatement",
                  "src": "3008:64:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2606,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2584,
                        "src": "3096:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2605,
                      "name": "FeeWithdrawal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2265,
                      "src": "3082:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2607,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3082:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2608,
                  "nodeType": "ExpressionStatement",
                  "src": "3082:19:10"
                }
              ]
            },
            "documentation": "@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount",
            "id": 2610,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": null,
                "id": 2582,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2581,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2398,
                  "src": "2867:9:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2867:9:10"
              }
            ],
            "name": "withdrawFees",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2580,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2841:2:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2585,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2584,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 2610,
                  "src": "2894:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2583,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2894:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2893:11:10"
            },
            "scope": 2964,
            "src": "2820:288:10",
            "stateMutability": "nonpayable",
            "superFunction": 2333,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2725,
              "nodeType": "Block",
              "src": "3595:1200:10",
              "statements": [
                {
                  "assignments": [
                    2626
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2626,
                      "name": "outcomeTokenCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2726,
                      "src": "3653:21:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2625,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3653:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2633,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2629,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "3698:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2630,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "3704:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2631,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "3723:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2627,
                        "name": "marketMaker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2307,
                        "src": "3677:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_MarketMaker_$2251",
                          "typeString": "contract MarketMaker"
                        }
                      },
                      "id": 2628,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "calcCost",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2230,
                      "src": "3677:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2374_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (contract Market,uint8,uint256) view external returns (uint256)"
                      }
                    },
                    "id": 2632,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3677:64:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3653:88:10"
                },
                {
                  "assignments": [
                    2635
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2635,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2726,
                      "src": "3795:9:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2634,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3795:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2639,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2637,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "3821:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2636,
                      "name": "calcMarketFee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2963
                      ],
                      "referencedDeclaration": 2963,
                      "src": "3807:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) view returns (uint256)"
                      }
                    },
                    "id": 2638,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3807:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3795:43:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2645,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2640,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2623,
                      "src": "3848:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2643,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2635,
                          "src": "3876:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2641,
                          "name": "outcomeTokenCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2626,
                          "src": "3855:16:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2642,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4417,
                        "src": "3855:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) view returns (uint256)"
                        }
                      },
                      "id": 2644,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3855:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3848:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2646,
                  "nodeType": "ExpressionStatement",
                  "src": "3848:33:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2654,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2650,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2648,
                            "name": "cost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2623,
                            "src": "3945:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2649,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3952:1:10",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3945:8:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2653,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2651,
                            "name": "cost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2623,
                            "src": "3957:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2652,
                            "name": "maxCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2616,
                            "src": "3965:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3957:15:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3945:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2647,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "3937:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2655,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3937:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2656,
                  "nodeType": "ExpressionStatement",
                  "src": "3937:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2674,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2662,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "4107:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4107:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2664,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "4119:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2665,
                              "name": "cost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2623,
                              "src": "4125:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2658,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "4062:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2659,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "4062:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2660,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4062:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2661,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "4062:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2666,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4062:68:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2671,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "4190:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2672,
                              "name": "outcomeTokenCost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2626,
                              "src": "4205:16:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2667,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "4150:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2668,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "4150:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2669,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4150:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2670,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "4150:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2673,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4150:72:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4062:160:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2657,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4051:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2675,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4051:172:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2676,
                  "nodeType": "ExpressionStatement",
                  "src": "4051:172:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2680,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "4290:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2677,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "4261:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2679,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "4261:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2681,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4261:46:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2682,
                  "nodeType": "ExpressionStatement",
                  "src": "4261:46:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2689,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "4425:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2690,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4425:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2691,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2614,
                            "src": "4437:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2686,
                                "name": "outcomeTokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2612,
                                "src": "4397:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2684,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "4369:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2685,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "outcomeTokens",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1431,
                              "src": "4369:27:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                              }
                            },
                            "id": 2687,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4369:46:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                              "typeString": "contract OutcomeToken"
                            }
                          },
                          "id": 2688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3156,
                          "src": "4369:55:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2692,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4369:86:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2683,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4361:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2693,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4361:95:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2694,
                  "nodeType": "ExpressionStatement",
                  "src": "4361:95:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 2700,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2697,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2614,
                              "src": "4541:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4537:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4537:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 2699,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4563:1:10",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4537:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2695,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "4529:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2701,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4529:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2702,
                  "nodeType": "ExpressionStatement",
                  "src": "4529:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2714,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2703,
                        "name": "netOutcomeTokensSold",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2314,
                        "src": "4575:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                          "typeString": "int256[] storage ref"
                        }
                      },
                      "id": 2705,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2704,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "4596:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "4575:39:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2711,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2614,
                              "src": "4665:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2710,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "4661:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2712,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4661:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 2706,
                            "name": "netOutcomeTokensSold",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2314,
                            "src": "4617:20:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                              "typeString": "int256[] storage ref"
                            }
                          },
                          "id": 2708,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 2707,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2612,
                            "src": "4638:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4617:39:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2709,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4568,
                        "src": "4617:43:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) view returns (int256)"
                        }
                      },
                      "id": 2713,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4617:67:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "4575:109:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2715,
                  "nodeType": "ExpressionStatement",
                  "src": "4575:109:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2717,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "4715:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2718,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4715:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2719,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2612,
                        "src": "4727:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2720,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4746:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2721,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2626,
                        "src": "4765:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2722,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2635,
                        "src": "4783:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2716,
                      "name": "OutcomeTokenPurchase",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2277,
                      "src": "4694:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256,uint256)"
                      }
                    },
                    "id": 2723,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4694:94:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2724,
                  "nodeType": "ExpressionStatement",
                  "src": "4694:94:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2726,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2619,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "3542:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2620,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "3542:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2621,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2618,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "3534:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3534:28:10"
              }
            ],
            "name": "buy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2617,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2612,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3448:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2611,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3448:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2614,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3473:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2613,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3473:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2616,
                  "name": "maxCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3497:12:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2615,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3497:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3447:63:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2624,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2623,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2726,
                  "src": "3580:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2622,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3580:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3579:11:10"
            },
            "scope": 2964,
            "src": "3435:1360:10",
            "stateMutability": "nonpayable",
            "superFunction": 2344,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2833,
              "nodeType": "Block",
              "src": "5295:1132:10",
              "statements": [
                {
                  "assignments": [
                    2742
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2742,
                      "name": "outcomeTokenProfit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2834,
                      "src": "5360:23:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2741,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5360:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2749,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2745,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "5409:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2746,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "5415:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2747,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2730,
                        "src": "5434:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2743,
                        "name": "marketMaker",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2307,
                        "src": "5386:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_MarketMaker_$2251",
                          "typeString": "contract MarketMaker"
                        }
                      },
                      "id": 2744,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "calcProfit",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2241,
                      "src": "5386:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2374_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (contract Market,uint8,uint256) view external returns (uint256)"
                      }
                    },
                    "id": 2748,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5386:66:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5360:92:10"
                },
                {
                  "assignments": [
                    2751
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2751,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2834,
                      "src": "5505:9:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2750,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5505:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2755,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2753,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5531:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2752,
                      "name": "calcMarketFee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2963
                      ],
                      "referencedDeclaration": 2963,
                      "src": "5517:13:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint256) view returns (uint256)"
                      }
                    },
                    "id": 2754,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5517:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5505:45:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2761,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2756,
                      "name": "profit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2739,
                      "src": "5560:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2759,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2751,
                          "src": "5592:4:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2757,
                          "name": "outcomeTokenProfit",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2742,
                          "src": "5569:18:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2758,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4438,
                        "src": "5569:22:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) view returns (uint256)"
                        }
                      },
                      "id": 2760,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5569:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5560:37:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2762,
                  "nodeType": "ExpressionStatement",
                  "src": "5560:37:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2770,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2766,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2764,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "5654:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2765,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5663:1:10",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5654:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 2769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2767,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "5668:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2768,
                            "name": "minProfit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2732,
                            "src": "5678:9:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "5668:19:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5654:33:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2763,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "5646:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2771,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5646:42:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2772,
                  "nodeType": "ExpressionStatement",
                  "src": "5646:42:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2779,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "5842:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2780,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5842:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2781,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9243,
                            "src": "5854:4:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_StandardMarket_$2964",
                              "typeString": "contract StandardMarket"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2782,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2730,
                            "src": "5860:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_contract$_StandardMarket_$2964",
                              "typeString": "contract StandardMarket"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2776,
                                "name": "outcomeTokenIndex",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2728,
                                "src": "5810:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2774,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "5782:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2775,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "outcomeTokens",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1431,
                              "src": "5782:27:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                              }
                            },
                            "id": 2777,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5782:46:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                              "typeString": "contract OutcomeToken"
                            }
                          },
                          "id": 2778,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transferFrom",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3226,
                          "src": "5782:59:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2783,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5782:96:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2773,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "5774:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2784,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5774:105:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2785,
                  "nodeType": "ExpressionStatement",
                  "src": "5774:105:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2789,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5948:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2786,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "5918:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2788,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sellAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1581,
                      "src": "5918:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2790,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5918:49:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2791,
                  "nodeType": "ExpressionStatement",
                  "src": "5918:49:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2797,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "6063:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2798,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "6063:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2799,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2739,
                            "src": "6075:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2793,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "6022:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2794,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "6022:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2795,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6022:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "6022:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2800,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6022:60:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2792,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "6014:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2801,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6014:69:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2802,
                  "nodeType": "ExpressionStatement",
                  "src": "6014:69:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 2808,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2805,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2730,
                              "src": "6175:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2804,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "6171:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6171:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 2807,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6197:1:10",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "6171:27:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2803,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "6163:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2809,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6163:36:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2810,
                  "nodeType": "ExpressionStatement",
                  "src": "6163:36:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2822,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2811,
                        "name": "netOutcomeTokensSold",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2314,
                        "src": "6209:20:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                          "typeString": "int256[] storage ref"
                        }
                      },
                      "id": 2813,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2812,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "6230:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "6209:39:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2819,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2730,
                              "src": "6299:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2818,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "6295:3:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2820,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6295:22:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 2814,
                            "name": "netOutcomeTokensSold",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2314,
                            "src": "6251:20:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                              "typeString": "int256[] storage ref"
                            }
                          },
                          "id": 2816,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 2815,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2728,
                            "src": "6272:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "6251:39:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2817,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 4589,
                        "src": "6251:43:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_delegatecall_view$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) view returns (int256)"
                        }
                      },
                      "id": 2821,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6251:67:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "6209:109:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2823,
                  "nodeType": "ExpressionStatement",
                  "src": "6209:109:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2825,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "6345:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2826,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6345:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2827,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2728,
                        "src": "6357:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2828,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2730,
                        "src": "6376:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2829,
                        "name": "outcomeTokenProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "6395:18:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2830,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2751,
                        "src": "6415:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2824,
                      "name": "OutcomeTokenSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2289,
                      "src": "6328:16:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256,uint256)"
                      }
                    },
                    "id": 2831,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6328:92:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2832,
                  "nodeType": "ExpressionStatement",
                  "src": "6328:92:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2834,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2735,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2320,
                      "src": "5240:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2320_$",
                        "typeString": "type(enum Market.Stages)"
                      }
                    },
                    "id": 2736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "5240:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2320",
                      "typeString": "enum Market.Stages"
                    }
                  }
                ],
                "id": 2737,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2734,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2410,
                  "src": "5232:7:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2320_$",
                    "typeString": "modifier (enum Market.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "5232:28:10"
              }
            ],
            "name": "sell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2733,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2728,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5144:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2727,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5144:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2730,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5169:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2729,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5169:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2732,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5193:14:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2731,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5193:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5143:65:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2740,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2739,
                  "name": "profit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2834,
                  "src": "5278:11:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2738,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5278:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5277:13:10"
            },
            "scope": 2964,
            "src": "5130:1297:10",
            "stateMutability": "nonpayable",
            "superFunction": 2355,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2948,
              "nodeType": "Block",
              "src": "7027:1036:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2862,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2850,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 9180,
                                "src": "7121:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2851,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "7121:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2852,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9243,
                              "src": "7133:4:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2853,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2838,
                              "src": "7139:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$2964",
                                "typeString": "contract StandardMarket"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2846,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "7076:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2847,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "7076:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2848,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7076:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2849,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3329,
                            "src": "7076:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2854,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7076:81:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2859,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2305,
                              "src": "7217:13:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2860,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2838,
                              "src": "7232:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_Event_$1680",
                                "typeString": "contract Event"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2855,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2305,
                                  "src": "7177:13:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$1680",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2856,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1422,
                                "src": "7177:29:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                  "typeString": "function () view external returns (contract Token)"
                                }
                              },
                              "id": 2857,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7177:31:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Token_$3360",
                                "typeString": "contract Token"
                              }
                            },
                            "id": 2858,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3338,
                            "src": "7177:39:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2861,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7177:73:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "7076:174:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2845,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "7065:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7065:186:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2864,
                  "nodeType": "ExpressionStatement",
                  "src": "7065:186:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2868,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7290:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2865,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "7261:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2867,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1539,
                      "src": "7261:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2869,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7261:47:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2870,
                  "nodeType": "ExpressionStatement",
                  "src": "7261:47:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2877,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "7412:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2878,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7418:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2874,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2836,
                            "src": "7385:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2871,
                            "name": "eventContract",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2305,
                            "src": "7357:13:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Event_$1680",
                              "typeString": "contract Event"
                            }
                          },
                          "id": 2873,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "outcomeTokens",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1431,
                          "src": "7357:27:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                            "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                          }
                        },
                        "id": 2875,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7357:46:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                          "typeString": "contract OutcomeToken"
                        }
                      },
                      "id": 2876,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3254,
                      "src": "7357:54:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 2879,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7357:79:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2880,
                  "nodeType": "ExpressionStatement",
                  "src": "7357:79:10"
                },
                {
                  "assignments": [
                    2882
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2882,
                      "name": "profit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2949,
                      "src": "7446:11:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2881,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7446:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2889,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2885,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "7470:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2886,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7489:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2887,
                        "name": "minProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2840,
                        "src": "7508:9:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2883,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9243,
                        "src": "7460:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$2964",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      "id": 2884,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sell",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2834,
                      "src": "7460:9:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint8,uint256,uint256) external returns (uint256)"
                      }
                    },
                    "id": 2888,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7460:58:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7446:72:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2894,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2890,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2843,
                      "src": "7528:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2893,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2891,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "7535:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2892,
                        "name": "profit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2882,
                        "src": "7555:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7535:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7528:33:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2895,
                  "nodeType": "ExpressionStatement",
                  "src": "7528:33:10"
                },
                {
                  "assignments": [
                    2897
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2897,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2949,
                      "src": "7615:18:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2896,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "7615:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2901,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2898,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2305,
                        "src": "7636:13:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$1680",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2899,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1619,
                      "src": "7636:29:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7636:31:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7615:52:10"
                },
                {
                  "body": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 2914,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2912,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2903,
                        "src": "7734:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2913,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "7739:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "src": "7734:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 2927,
                    "nodeType": "IfStatement",
                    "src": "7730:123:10",
                    "trueBody": {
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2921,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9180,
                                  "src": "7822:3:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 2922,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "7822:10:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "id": 2923,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2838,
                                "src": "7834:17:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 2918,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2903,
                                    "src": "7810:1:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2916,
                                    "name": "eventContract",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2305,
                                    "src": "7782:13:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Event_$1680",
                                      "typeString": "contract Event"
                                    }
                                  },
                                  "id": 2917,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "outcomeTokens",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 1431,
                                  "src": "7782:27:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$3085_$",
                                    "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                  }
                                },
                                "id": 2919,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7782:30:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_OutcomeToken_$3085",
                                  "typeString": "contract OutcomeToken"
                                }
                              },
                              "id": 2920,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "transfer",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 3156,
                              "src": "7782:39:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                "typeString": "function (address,uint256) external returns (bool)"
                              }
                            },
                            "id": 2924,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7782:70:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "id": 2915,
                          "name": "require",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            9183,
                            9184
                          ],
                          "referencedDeclaration": 9183,
                          "src": "7774:7:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                            "typeString": "function (bool) pure"
                          }
                        },
                        "id": 2925,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7774:79:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_tuple$__$",
                          "typeString": "tuple()"
                        }
                      },
                      "id": 2926,
                      "nodeType": "ExpressionStatement",
                      "src": "7774:79:10"
                    }
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2908,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2906,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2903,
                      "src": "7695:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2907,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2897,
                      "src": "7699:12:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "7695:16:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2928,
                  "initializationExpression": {
                    "assignments": [
                      2903
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2903,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2949,
                        "src": "7682:7:10",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2902,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "7682:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2905,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2904,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7692:1:10",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "7682:11:10"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2910,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "7713:3:10",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2909,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2903,
                        "src": "7713:1:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2911,
                    "nodeType": "ExpressionStatement",
                    "src": "7713:3:10"
                  },
                  "nodeType": "ForStatement",
                  "src": "7677:176:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2934,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 9180,
                              "src": "7949:3:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2935,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "7949:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2936,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2882,
                            "src": "7961:6:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2930,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2305,
                                "src": "7908:13:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$1680",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2931,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1422,
                              "src": "7908:29:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_Token_$3360_$",
                                "typeString": "function () view external returns (contract Token)"
                              }
                            },
                            "id": 2932,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7908:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Token_$3360",
                              "typeString": "contract Token"
                            }
                          },
                          "id": 2933,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 3318,
                          "src": "7908:40:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2937,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7908:60:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2929,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        9183,
                        9184
                      ],
                      "referencedDeclaration": 9183,
                      "src": "7900:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2938,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7900:69:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2939,
                  "nodeType": "ExpressionStatement",
                  "src": "7900:69:10"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2941,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9180,
                          "src": "8001:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2942,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8001:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2943,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "8013:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2944,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2838,
                        "src": "8032:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2945,
                        "name": "cost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2843,
                        "src": "8051:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2940,
                      "name": "OutcomeTokenShortSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2299,
                      "src": "7979:21:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256)"
                      }
                    },
                    "id": 2946,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7979:77:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2947,
                  "nodeType": "ExpressionStatement",
                  "src": "7979:77:10"
                }
              ]
            },
            "documentation": "@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",
            "id": 2949,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "shortSell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2841,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2836,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6915:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2835,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6915:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2838,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6940:22:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2837,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6940:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2840,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "6964:14:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2839,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6914:65:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2844,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2843,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2949,
                  "src": "7012:9:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2842,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "7012:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7011:11:10"
            },
            "scope": 2964,
            "src": "6896:1167:10",
            "stateMutability": "nonpayable",
            "superFunction": 2366,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2962,
              "nodeType": "Block",
              "src": "8322:58:10",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2960,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2958,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2956,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2951,
                        "src": "8339:16:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "*",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2957,
                        "name": "fee",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2309,
                        "src": "8358:3:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint24",
                          "typeString": "uint24"
                        }
                      },
                      "src": "8339:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2959,
                      "name": "FEE_RANGE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2387,
                      "src": "8364:9:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "8339:34:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 2955,
                  "id": 2961,
                  "nodeType": "Return",
                  "src": "8332:41:10"
                }
              ]
            },
            "documentation": "@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade",
            "id": 2963,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "calcMarketFee",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2952,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2951,
                  "name": "outcomeTokenCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2963,
                  "src": "8240:21:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2950,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8240:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8239:23:10"
            },
            "payable": false,
            "returnParameters": {
              "id": 2955,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2954,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2963,
                  "src": "8312:4:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2953,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8312:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8311:6:10"
            },
            "scope": 2964,
            "src": "8217:163:10",
            "stateMutability": "view",
            "superFunction": 2373,
            "visibility": "public"
          }
        ],
        "scope": 2965,
        "src": "279:8103:10"
      }
    ],
    "src": "0:8383:10"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.0-beta.1",
  "updatedAt": "2018-10-27T21:23:29.096Z"
}