{
  "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": "masterCopy",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "stage",
      "outputs": [
        {
          "name": "",
          "type": "uint8"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "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"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "name": "funding",
          "type": "uint256"
        }
      ],
      "name": "MarketFunding",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [],
      "name": "MarketClosing",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "name": "fees",
          "type": "uint256"
        }
      ],
      "name": "FeeWithdrawal",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "buyer",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "indexed": false,
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "name": "outcomeTokenCost",
          "type": "uint256"
        },
        {
          "indexed": false,
          "name": "marketFees",
          "type": "uint256"
        }
      ],
      "name": "OutcomeTokenPurchase",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "seller",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "indexed": false,
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "name": "outcomeTokenProfit",
          "type": "uint256"
        },
        {
          "indexed": false,
          "name": "marketFees",
          "type": "uint256"
        }
      ],
      "name": "OutcomeTokenSale",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "buyer",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "outcomeTokenIndex",
          "type": "uint8"
        },
        {
          "indexed": false,
          "name": "outcomeTokenCount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "name": "cost",
          "type": "uint256"
        }
      ],
      "name": "OutcomeTokenShortSale",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "transactor",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "outcomeTokenAmounts",
          "type": "int256[]"
        },
        {
          "indexed": false,
          "name": "outcomeTokenNetCost",
          "type": "int256"
        },
        {
          "indexed": false,
          "name": "marketFees",
          "type": "uint256"
        }
      ],
      "name": "OutcomeTokenTrade",
      "type": "event"
    },
    {
      "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": false,
      "inputs": [
        {
          "name": "outcomeTokenAmounts",
          "type": "int256[]"
        },
        {
          "name": "collateralLimit",
          "type": "int256"
        }
      ],
      "name": "trade",
      "outputs": [
        {
          "name": "netCost",
          "type": "int256"
        }
      ],
      "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"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"creator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"outcomeTokenAmounts\",\"type\":\"int256[]\"},{\"name\":\"collateralLimit\",\"type\":\"int256\"}],\"name\":\"trade\",\"outputs\":[{\"name\":\"netCost\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"marketMaker\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"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\":false,\"inputs\":[],\"name\":\"close\",\"outputs\":[],\"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\":\"withdrawFees\",\"outputs\":[{\"name\":\"fees\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":\"masterCopy\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"outcomeTokenCost\",\"type\":\"uint256\"}],\"name\":\"calcMarketFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stage\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_funding\",\"type\":\"uint256\"}],\"name\":\"fund\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":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\":true,\"inputs\":[],\"name\":\"FEE_RANGE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint24\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"funding\",\"type\":\"uint256\"}],\"name\":\"MarketFunding\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MarketClosing\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"fees\",\"type\":\"uint256\"}],\"name\":\"FeeWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"outcomeTokenCost\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenPurchase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"seller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"outcomeTokenProfit\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenSale\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"cost\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenShortSale\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"transactor\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"outcomeTokenAmounts\",\"type\":\"int256[]\"},{\"indexed\":false,\"name\":\"outcomeTokenNetCost\",\"type\":\"int256\"},{\"indexed\":false,\"name\":\"marketFees\",\"type\":\"uint256\"}],\"name\":\"OutcomeTokenTrade\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Stefan George - <stefan@gnosis.pm>\",\"methods\":{\"buy(uint8,uint256,uint256)\":{\"details\":\"Allows to buy outcome tokens from market maker\",\"params\":{\"maxCost\":\"The maximum cost in collateral tokens to pay for outcome tokens\",\"outcomeTokenCount\":\"Amount of outcome tokens to buy\",\"outcomeTokenIndex\":\"Index of the outcome token to buy\"},\"return\":\"Cost in collateral tokens\"},\"calcMarketFee(uint256)\":{\"details\":\"Calculates fee to be paid to market maker\",\"params\":{\"outcomeTokenCost\":\"Cost for buying outcome tokens\"},\"return\":\"Fee for trade\"},\"close()\":{\"details\":\"Allows market creator to close the markets by transferring all remaining outcome tokens to the creator\"},\"fund(uint256)\":{\"details\":\"Allows to fund the market with collateral tokens converting them into outcome tokens\",\"params\":{\"_funding\":\"Funding amount\"}},\"sell(uint8,uint256,uint256)\":{\"details\":\"Allows to sell outcome tokens to market maker\",\"params\":{\"minProfit\":\"The minimum profit in collateral tokens to earn for outcome tokens\",\"outcomeTokenCount\":\"Amount of outcome tokens to sell\",\"outcomeTokenIndex\":\"Index of the outcome token to sell\"},\"return\":\"Profit in collateral tokens\"},\"shortSell(uint8,uint256,uint256)\":{\"details\":\"Buys all outcomes, then sells all shares of selected outcome which were bought, keeping      shares of all other outcome tokens.\",\"params\":{\"minProfit\":\"The minimum profit in collateral tokens to earn for short sold outcome tokens\",\"outcomeTokenCount\":\"Amount of outcome tokens to short sell\",\"outcomeTokenIndex\":\"Index of the outcome token to short sell\"},\"return\":\"Cost to short sell outcome in collateral tokens\"},\"trade(int256[],int256)\":{\"details\":\"Allows to trade outcome tokens and collateral with the market maker\",\"params\":{\"collateralLimit\":\"If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\",\"outcomeTokenAmounts\":\"Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\"},\"return\":\"If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.\"},\"withdrawFees()\":{\"details\":\"Allows market creator to withdraw fees generated by trades\",\"return\":\"Fee amount\"}},\"title\":\"Standard market contract - Backed implementation of standard markets\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol\":\"StandardMarket\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol\":{\"keccak256\":\"0xdcacfa25145426b5681ad7d8bafb3c117c92a37b7a0175d72a10b42f130fb8c1\",\"urls\":[\"bzzr://bd10fbdb82f0d50866442c9e95317b3176c8ee067def27d764529973fb36420a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol\":{\"keccak256\":\"0xa71f8ce92412033d0900d44c01f0702aefced87d860cf116c6a4d3efe86913cf\",\"urls\":[\"bzzr://63c5bf60b931bb032fcab23514a3db171b680b11d8c6c05ac8caa88752e3be41\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol\":{\"keccak256\":\"0x7bc1ebf0ea0f4cd9b6e9bfff6c6ac9088c253bcfca4e27f31e5845799f0278d8\",\"urls\":[\"bzzr://5e3f86d96ab269d284b34563501469d539cc436d62f070dd0abda2519d5e60c0\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol\":{\"keccak256\":\"0x527abf1b0997e2d38ce3c97f7ed647b9e913424828594287e2b068f2fb41ad4c\",\"urls\":[\"bzzr://16756e1b212fd40f21de50d99c8b7a5dde0acc2b0b047af8beead831a1274bd7\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol\":{\"keccak256\":\"0xf4d12f4a59c17e66dfa6791188f621a8914e2038a4e3f72d6fc9fb903ca8e18e\",\"urls\":[\"bzzr://a477ccd203e677cc904b1a4f8fcc85251c5b5e09c5c10eed27e01318584b16d1\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":{\"keccak256\":\"0x3d4c9ec14a60cf7577d366da5116e919a4331da8d6d993174f7d599f84ae74e0\",\"urls\":[\"bzzr://20f87450259a3af24ff1769faa9ab3b714d01921e9d8fa4efa75a0c277837a8a\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0xeab0e83a9ec9e7f052c0455a11577061ec6d1994db08dae429abd6faaabf6555\",\"urls\":[\"bzzr://b2c1273d4ec30e2f9e768eea8c510f8493a7359b03e01923d93eea86b57ec145\"]},\"openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol\":{\"keccak256\":\"0xb4b45cd5475c318722ac0f8d7e2b9e77fee6f4f36374c1110fe615d50fbc0650\",\"urls\":[\"bzzr://a90fb457269c8a03ec5b811c71acef08a2751a4d2019b0661328610f9357dae7\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b5061302f806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063a619486e116100a2578063cb4c86b711610071578063cb4c86b7146104a5578063ddca3f43146104c3578063e274fd24146104eb578063f6d956df14610535578063fbde47f61461058e57610116565b8063a619486e146103bf578063b001150914610409578063c040e6b81461044b578063ca1d209d1461047757610116565b806343d726d6116100e957806343d726d6146102de57806346280a80146102e8578063476343ee1461034157806359acb42c1461035f578063a157979c1461037d57610116565b806302d05d3f1461011b57806315bd7611146101655780631f21f9af1461023b57806328c05d3214610285575b600080fd5b6101236105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102256004803603604081101561017b57600080fd5b810190808035906020019064010000000081111561019857600080fd5b8201836020820111156101aa57600080fd5b803590602001918460208302840111640100000000831117156101cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291905050506105dc565b6040518082815260200191505060405180910390f35b61024361078b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102c86004803603606081101561029b57600080fd5b81019080803560ff16906020019092919080359060200190929190803590602001909291905050506107b1565b6040518082815260200191505060405180910390f35b6102e66111bb565b005b61032b600480360360608110156102fe57600080fd5b81019080803560ff1690602001909291908035906020019092919080359060200190929190505050611669565b6040518082815260200191505060405180910390f35b610349611893565b6040518082815260200191505060405180910390f35b610367611c14565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050611c1a565b6040518082815260200191505060405180910390f35b6103c7611c3b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104356004803603602081101561041f57600080fd5b8101908080359060200190929190505050611c60565b6040518082815260200191505060405180910390f35b610453611c93565b6040518082600281111561046357fe5b60ff16815260200191505060405180910390f35b6104a36004803603602081101561048d57600080fd5b8101908080359060200190929190505050611ca6565b005b6104ad612157565b6040518082815260200191505060405180910390f35b6104cb61215d565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b6104f3612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105786004803603606081101561054b57600080fd5b81019080803560ff1690602001909291908035906020019092919080359060200190929190505050612198565b6040518082815260200191505060405180910390f35b6105966123b0565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060018060028111156105ec57fe5b600760009054906101000a900460ff16600281111561060757fe5b1461061157600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561067b57600080fd5b505afa15801561068f573d6000803e3d6000fd5b505050506040513d60208110156106a557600080fd5b810190808051906020019092919050505090508060ff168551146106c857600080fd5b6000806106d68388886123b7565b8093508194508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8884846040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561076c578082015181840152602081019050610751565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d602081101561084557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561091057600080fd5b505af1158015610924573d6000803e3d6000fd5b505050506040513d602081101561093a57600080fd5b81019080805190602001909291905050508015610ad95750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ba57600080fd5b505afa1580156109ce573d6000803e3d6000fd5b505050506040513d60208110156109e457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a9d57600080fd5b505af1158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b81019080805190602001909291905050505b610ae257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610b5757600080fd5b505af1158015610b6b573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610be557600080fd5b505afa158015610bf9573d6000803e3d6000fd5b505050506040513d6020811015610c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ca657600080fd5b505af1158015610cba573d6000803e3d6000fd5b505050506040513d6020811015610cd057600080fd5b81019080805190602001909291905050505060003073ffffffffffffffffffffffffffffffffffffffff166346280a808686866040518463ffffffff1660e01b8152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015610d4d57600080fd5b505af1158015610d61573d6000803e3d6000fd5b505050506040513d6020811015610d7757600080fd5b8101908080519060200190929190505050905080840391506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b8101908080519060200190929190505050905060008090505b8160ff168160ff161015610fe0578660ff168160ff1614610fd357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610ecd57600080fd5b505afa158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f8e57600080fd5b505af1158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b8101908080519060200190929190505050610fd257600080fd5b5b8080600101915050610e3c565b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561104957600080fd5b505afa15801561105d573d6000803e3d6000fd5b505050506040513d602081101561107357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561110a57600080fd5b505af115801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b810190808051906020019092919050505061114e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88878786604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a250509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461121557600080fd5b600180600281111561122357fe5b600760009054906101000a900460ff16600281111561123e57fe5b1461124857600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d60208110156112dc57600080fd5b8101908080519060200190929190505050905060008090505b8160ff168160ff16101561161457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561137957600080fd5b505afa15801561138d573d6000803e3d6000fd5b505050506040513d60208110156113a357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d602081101561149257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561151f57600080fd5b505afa158015611533573d6000803e3d6000fd5b505050506040513d602081101561154957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115c357600080fd5b505af11580156115d7573d6000803e3d6000fd5b505050506040513d60208110156115ed57600080fd5b810190808051906020019092919050505061160757600080fd5b80806001019150506112f5565b506002600760006101000a81548160ff0219169083600281111561163457fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a15050565b6000600180600281111561167957fe5b600760009054906101000a900460ff16600281111561169457fe5b1461169e57600080fd5b600084600003131580156116b55750600083600003125b6116be57600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561172857600080fd5b505afa15801561173c573d6000803e3d6000fd5b505050506040513d602081101561175257600080fd5b8101908080519060200190929190505050905060008660ff161015801561177e57508060ff168660ff16105b61178757600080fd5b60608160ff166040519080825280602002602001820160405280156117bb5781602001602082028038833980820191505090505b50905085600003818860ff16815181106117d157fe5b60200260200101818152505060008060006117f085858a6000036123b7565b92509250925060008313158015611808575060008213155b61181157600080fd5b8260000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8560000385604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118ef57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561195757600080fd5b505afa15801561196b573d6000803e3d6000fd5b505050506040513d602081101561198157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d6020811015611a3857600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611ab357600080fd5b505afa158015611ac7573d6000803e3d6000fd5b505050506040513d6020811015611add57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611b9657600080fd5b505af1158015611baa573d6000803e3d6000fd5b505050506040513d6020811015611bc057600080fd5b8101908080519060200190929190505050611bda57600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b60025481565b60068181548110611c2757fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff16830281611c8b57fe5b049050919050565b600760009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d0057600080fd5b6000806002811115611d0e57fe5b600760009054906101000a900460ff166002811115611d2957fe5b14611d3357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9b57600080fd5b505afa158015611daf573d6000803e3d6000fd5b505050506040513d6020811015611dc557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611e9057600080fd5b505af1158015611ea4573d6000803e3d6000fd5b505050506040513d6020811015611eba57600080fd5b810190808051906020019092919050505080156120595750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3a57600080fd5b505afa158015611f4e573d6000803e3d6000fd5b505050506040513d6020811015611f6457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561201d57600080fd5b505af1158015612031573d6000803e3d6000fd5b505050506040513d602081101561204757600080fd5b81019080805190602001909291905050505b61206257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156120d757600080fd5b505af11580156120eb573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff0219169083600281111561211557fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060018060028111156121a857fe5b600760009054906101000a900460ff1660028111156121c357fe5b146121cd57600080fd5b600084121580156121de5750600083135b6121e757600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561225157600080fd5b505afa158015612265573d6000803e3d6000fd5b505050506040513d602081101561227b57600080fd5b8101908080519060200190929190505050905060008660ff16101580156122a757508060ff168660ff16105b6122b057600080fd5b60608160ff166040519080825280602002602001820160405280156122e45781602001602082028038833980820191505090505b50905085818860ff16815181106122f757fe5b602002602001018181525050600080600061231385858a6123b7565b9250925092506000831215801561232b575060008212155b61233457600080fd5b8296503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8585604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b620f424081565b6000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612480578082015181840152602081019050612465565b50505050905001935050505060206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b8101908080519060200190929190505050915060008212156124fd576124f682600003611c60565b9050612509565b61250682611c60565b90505b600081121561251757600080fd5b61252a8183612f5490919063ffffffff16565b92506000841415801561253d5750838313155b806125485750600084145b61255157600080fd5b600082131561291757600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b1580156125c257600080fd5b505afa1580156125d6573d6000803e3d6000fd5b505050506040513d60208110156125ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156126b757600080fd5b505af11580156126cb573d6000803e3d6000fd5b505050506040513d60208110156126e157600080fd5b810190808051906020019092919050505080156128805750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561276157600080fd5b505afa158015612775573d6000803e3d6000fd5b505050506040513d602081101561278b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284457600080fd5b505af1158015612858573d6000803e3d6000fd5b505050506040513d602081101561286e57600080fd5b81019080805190602001909291905050505b61288957600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128fe57600080fd5b505af1158015612912573d6000803e3d6000fd5b505050505b60008090505b8660ff168160ff161015612d36576000868260ff168151811061293c57fe5b602002602001015114612d29576000868260ff168151811061295a57fe5b60200260200101511215612b3557600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156129de57600080fd5b505afa1580156129f2573d6000803e3d6000fd5b505050506040513d6020811015612a0857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff1681518110612a4557fe5b60200260200101516000036040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612aec57600080fd5b505af1158015612b00573d6000803e3d6000fd5b505050506040513d6020811015612b1657600080fd5b8101908080519060200190929190505050612b3057600080fd5b612cc7565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612bab57600080fd5b505afa158015612bbf573d6000803e3d6000fd5b505050506040513d6020811015612bd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff1681518110612c1157fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c8257600080fd5b505af1158015612c96573d6000803e3d6000fd5b505050506040513d6020811015612cac57600080fd5b8101908080519060200190929190505050612cc657600080fd5b5b612d0a868260ff1681518110612cd957fe5b602002602001015160068360ff1681548110612cf157fe5b9060005260206000200154612f5490919063ffffffff16565b60068260ff1681548110612d1a57fe5b90600052602060002001819055505b808060010191505061291d565b506000821215612f4b57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd836000036040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612db857600080fd5b505af1158015612dcc573d6000803e3d6000fd5b505050506000831215612f4a57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015612e4157600080fd5b505afa158015612e55573d6000803e3d6000fd5b505050506040513d6020811015612e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856000036040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f0557600080fd5b505af1158015612f19573d6000803e3d6000fd5b505050506040513d6020811015612f2f57600080fd5b8101908080519060200190929190505050612f4957600080fd5b5b5b93509350939050565b600080828401905060008312158015612f6d5750838112155b80612f835750600083128015612f8257508381125b5b612fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612fe36021913960400191505060405180910390fd5b809150509291505056fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77a165627a7a72305820c8a69c680e527165394d310f65d13d21be9e48a7f579ec15fcf36b732fc47a900029",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063a619486e116100a2578063cb4c86b711610071578063cb4c86b7146104a5578063ddca3f43146104c3578063e274fd24146104eb578063f6d956df14610535578063fbde47f61461058e57610116565b8063a619486e146103bf578063b001150914610409578063c040e6b81461044b578063ca1d209d1461047757610116565b806343d726d6116100e957806343d726d6146102de57806346280a80146102e8578063476343ee1461034157806359acb42c1461035f578063a157979c1461037d57610116565b806302d05d3f1461011b57806315bd7611146101655780631f21f9af1461023b57806328c05d3214610285575b600080fd5b6101236105b6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102256004803603604081101561017b57600080fd5b810190808035906020019064010000000081111561019857600080fd5b8201836020820111156101aa57600080fd5b803590602001918460208302840111640100000000831117156101cc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291905050506105dc565b6040518082815260200191505060405180910390f35b61024361078b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102c86004803603606081101561029b57600080fd5b81019080803560ff16906020019092919080359060200190929190803590602001909291905050506107b1565b6040518082815260200191505060405180910390f35b6102e66111bb565b005b61032b600480360360608110156102fe57600080fd5b81019080803560ff1690602001909291908035906020019092919080359060200190929190505050611669565b6040518082815260200191505060405180910390f35b610349611893565b6040518082815260200191505060405180910390f35b610367611c14565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561039357600080fd5b8101908080359060200190929190505050611c1a565b6040518082815260200191505060405180910390f35b6103c7611c3b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104356004803603602081101561041f57600080fd5b8101908080359060200190929190505050611c60565b6040518082815260200191505060405180910390f35b610453611c93565b6040518082600281111561046357fe5b60ff16815260200191505060405180910390f35b6104a36004803603602081101561048d57600080fd5b8101908080359060200190929190505050611ca6565b005b6104ad612157565b6040518082815260200191505060405180910390f35b6104cb61215d565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b6104f3612172565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105786004803603606081101561054b57600080fd5b81019080803560ff1690602001909291908035906020019092919080359060200190929190505050612198565b6040518082815260200191505060405180910390f35b6105966123b0565b604051808262ffffff1662ffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060018060028111156105ec57fe5b600760009054906101000a900460ff16600281111561060757fe5b1461061157600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561067b57600080fd5b505afa15801561068f573d6000803e3d6000fd5b505050506040513d60208110156106a557600080fd5b810190808051906020019092919050505090508060ff168551146106c857600080fd5b6000806106d68388886123b7565b8093508194508297505050503373ffffffffffffffffffffffffffffffffffffffff167fa66fcf59f5b6e4cb46e5745fd40c7dfac01b0a81b2b5e55038d9ec959adf7eaa8884846040518080602001848152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561076c578082015181840152602081019050610751565b5050505090500194505050505060405180910390a25050505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d602081101561084557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561091057600080fd5b505af1158015610924573d6000803e3d6000fd5b505050506040513d602081101561093a57600080fd5b81019080805190602001909291905050508015610ad95750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b1580156109ba57600080fd5b505afa1580156109ce573d6000803e3d6000fd5b505050506040513d60208110156109e457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a9d57600080fd5b505af1158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b81019080805190602001909291905050505b610ae257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610b5757600080fd5b505af1158015610b6b573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610be557600080fd5b505afa158015610bf9573d6000803e3d6000fd5b505050506040513d6020811015610c0f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b330856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ca657600080fd5b505af1158015610cba573d6000803e3d6000fd5b505050506040513d6020811015610cd057600080fd5b81019080805190602001909291905050505060003073ffffffffffffffffffffffffffffffffffffffff166346280a808686866040518463ffffffff1660e01b8152600401808460ff1660ff1681526020018381526020018281526020019350505050602060405180830381600087803b158015610d4d57600080fd5b505af1158015610d61573d6000803e3d6000fd5b505050506040513d6020811015610d7757600080fd5b8101908080519060200190929190505050905080840391506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b8101908080519060200190929190505050905060008090505b8160ff168160ff161015610fe0578660ff168160ff1614610fd357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015610ecd57600080fd5b505afa158015610ee1573d6000803e3d6000fd5b505050506040513d6020811015610ef757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33886040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f8e57600080fd5b505af1158015610fa2573d6000803e3d6000fd5b505050506040513d6020811015610fb857600080fd5b8101908080519060200190929190505050610fd257600080fd5b5b8080600101915050610e3c565b50600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561104957600080fd5b505afa15801561105d573d6000803e3d6000fd5b505050506040513d602081101561107357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561110a57600080fd5b505af115801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b810190808051906020019092919050505061114e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f1dbdc4ff4d51949738d56e120b2be4edecc55d8d2150f1616ec5802abaae3f88878786604051808460ff1660ff168152602001838152602001828152602001935050505060405180910390a250509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461121557600080fd5b600180600281111561122357fe5b600760009054906101000a900460ff16600281111561123e57fe5b1461124857600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b1580156112b257600080fd5b505afa1580156112c6573d6000803e3d6000fd5b505050506040513d60208110156112dc57600080fd5b8101908080519060200190929190505050905060008090505b8160ff168160ff16101561161457600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561137957600080fd5b505afa15801561138d573d6000803e3d6000fd5b505050506040513d60208110156113a357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea856040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561146857600080fd5b505afa15801561147c573d6000803e3d6000fd5b505050506040513d602081101561149257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561151f57600080fd5b505afa158015611533573d6000803e3d6000fd5b505050506040513d602081101561154957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115c357600080fd5b505af11580156115d7573d6000803e3d6000fd5b505050506040513d60208110156115ed57600080fd5b810190808051906020019092919050505061160757600080fd5b80806001019150506112f5565b506002600760006101000a81548160ff0219169083600281111561163457fe5b02179055507fe7d85885f81486e8f4c99e50e056745493861b8b5d4f973dcf0c3c0f74a25e0760405160405180910390a15050565b6000600180600281111561167957fe5b600760009054906101000a900460ff16600281111561169457fe5b1461169e57600080fd5b600084600003131580156116b55750600083600003125b6116be57600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561172857600080fd5b505afa15801561173c573d6000803e3d6000fd5b505050506040513d602081101561175257600080fd5b8101908080519060200190929190505050905060008660ff161015801561177e57508060ff168660ff16105b61178757600080fd5b60608160ff166040519080825280602002602001820160405280156117bb5781602001602082028038833980820191505090505b50905085600003818860ff16815181106117d157fe5b60200260200101818152505060008060006117f085858a6000036123b7565b92509250925060008313158015611808575060008213155b61181157600080fd5b8260000396503373ffffffffffffffffffffffffffffffffffffffff167fab24ef3371efb2e0e3b02955e33b8ef03c14523e71f3bda87878a2386cc17b698b8b8560000385604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118ef57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561195757600080fd5b505afa15801561196b573d6000803e3d6000fd5b505050506040513d602081101561198157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0e57600080fd5b505afa158015611a22573d6000803e3d6000fd5b505050506040513d6020811015611a3857600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611ab357600080fd5b505afa158015611ac7573d6000803e3d6000fd5b505050506040513d6020811015611add57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611b9657600080fd5b505af1158015611baa573d6000803e3d6000fd5b505050506040513d6020811015611bc057600080fd5b8101908080519060200190929190505050611bda57600080fd5b7f706d7f48c702007c2fb0881cea5759732e64f52faee427d5ab030787cfb7d787816040518082815260200191505060405180910390a190565b60025481565b60068181548110611c2757fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620f424062ffffff16600460149054906101000a900462ffffff1662ffffff16830281611c8b57fe5b049050919050565b600760009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d0057600080fd5b6000806002811115611d0e57fe5b600760009054906101000a900460ff166002811115611d2957fe5b14611d3357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9b57600080fd5b505afa158015611daf573d6000803e3d6000fd5b505050506040513d6020811015611dc557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611e9057600080fd5b505af1158015611ea4573d6000803e3d6000fd5b505050506040513d6020811015611eba57600080fd5b810190808051906020019092919050505080156120595750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015611f3a57600080fd5b505afa158015611f4e573d6000803e3d6000fd5b505050506040513d6020811015611f6457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561201d57600080fd5b505af1158015612031573d6000803e3d6000fd5b505050506040513d602081101561204757600080fd5b81019080805190602001909291905050505b61206257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156120d757600080fd5b505af11580156120eb573d6000803e3d6000fd5b50505050816005819055506001600760006101000a81548160ff0219169083600281111561211557fe5b02179055507f8a2fe22ce705a4ac9c189969cef327affbdc477afdae4ae274c2f8ad021f91636005546040518082815260200191505060405180910390a15050565b60055481565b600460149054906101000a900462ffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060018060028111156121a857fe5b600760009054906101000a900460ff1660028111156121c357fe5b146121cd57600080fd5b600084121580156121de5750600083135b6121e757600080fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637dc8f0866040518163ffffffff1660e01b815260040160206040518083038186803b15801561225157600080fd5b505afa158015612265573d6000803e3d6000fd5b505050506040513d602081101561227b57600080fd5b8101908080519060200190929190505050905060008660ff16101580156122a757508060ff168660ff16105b6122b057600080fd5b60608160ff166040519080825280602002602001820160405280156122e45781602001602082028038833980820191505090505b50905085818860ff16815181106122f757fe5b602002602001018181525050600080600061231385858a6123b7565b9250925092506000831215801561232b575060008212155b61233457600080fd5b8296503373ffffffffffffffffffffffffffffffffffffffff167f7caea4a19892ce49b4daa2014d5599eed561dcd16ffabfac851a9737217ae4108b8b8585604051808560ff1660ff16815260200184815260200183815260200182815260200194505050505060405180910390a25050505050509392505050565b620f424081565b6000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338bf045230876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015612480578082015181840152602081019050612465565b50505050905001935050505060206040518083038186803b1580156124a457600080fd5b505afa1580156124b8573d6000803e3d6000fd5b505050506040513d60208110156124ce57600080fd5b8101908080519060200190929190505050915060008212156124fd576124f682600003611c60565b9050612509565b61250682611c60565b90505b600081121561251757600080fd5b61252a8183612f5490919063ffffffff16565b92506000841415801561253d5750838313155b806125485750600084145b61255157600080fd5b600082131561291757600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b1580156125c257600080fd5b505afa1580156125d6573d6000803e3d6000fd5b505050506040513d60208110156125ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156126b757600080fd5b505af11580156126cb573d6000803e3d6000fd5b505050506040513d60208110156126e157600080fd5b810190808051906020019092919050505080156128805750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b15801561276157600080fd5b505afa158015612775573d6000803e3d6000fd5b505050506040513d602081101561278b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561284457600080fd5b505af1158015612858573d6000803e3d6000fd5b505050506040513d602081101561286e57600080fd5b81019080805190602001909291905050505b61288957600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166328da850b836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156128fe57600080fd5b505af1158015612912573d6000803e3d6000fd5b505050505b60008090505b8660ff168160ff161015612d36576000868260ff168151811061293c57fe5b602002602001015114612d29576000868260ff168151811061295a57fe5b60200260200101511215612b3557600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156129de57600080fd5b505afa1580156129f2573d6000803e3d6000fd5b505050506040513d6020811015612a0857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330898560ff1681518110612a4557fe5b60200260200101516000036040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015612aec57600080fd5b505af1158015612b00573d6000803e3d6000fd5b505050506040513d6020811015612b1657600080fd5b8101908080519060200190929190505050612b3057600080fd5b612cc7565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638abe59ea826040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612bab57600080fd5b505afa158015612bbf573d6000803e3d6000fd5b505050506040513d6020811015612bd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33888460ff1681518110612c1157fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612c8257600080fd5b505af1158015612c96573d6000803e3d6000fd5b505050506040513d6020811015612cac57600080fd5b8101908080519060200190929190505050612cc657600080fd5b5b612d0a868260ff1681518110612cd957fe5b602002602001015160068360ff1681548110612cf157fe5b9060005260206000200154612f5490919063ffffffff16565b60068260ff1681548110612d1a57fe5b90600052602060002001819055505b808060010191505061291d565b506000821215612f4b57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636fb1edcd836000036040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612db857600080fd5b505af1158015612dcc573d6000803e3d6000fd5b505050506000831215612f4a57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b2016bd46040518163ffffffff1660e01b815260040160206040518083038186803b158015612e4157600080fd5b505afa158015612e55573d6000803e3d6000fd5b505050506040513d6020811015612e6b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856000036040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015612f0557600080fd5b505af1158015612f19573d6000803e3d6000fd5b505050506040513d6020811015612f2f57600080fd5b8101908080519060200190929190505050612f4957600080fd5b5b5b93509350939050565b600080828401905060008312158015612f6d5750838112155b80612f835750600083128015612f8257508381125b5b612fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612fe36021913960400191505060405180910390fd5b809150509291505056fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77a165627a7a72305820c8a69c680e527165394d310f65d13d21be9e48a7f579ec15fcf36b732fc47a900029",
  "sourceMap": "1162:9866:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1162:9866:9;;;;;;;",
  "deployedSourceMap": "1162:9866:9:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1162:9866:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;873:22:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;8061:542:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8061:542:9;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8061:542:9;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8061:542:9;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8061:542:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8061:542:9;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;965:30:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;6084:1199:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6084:1199:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2449:404;;;:::i;:::-;;4762:853;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4762:853:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2958:302;;;:::i;:::-;;;;;;;;;;;;;;;;;;;901:26:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1049:33;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1049:33:8;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;205:25:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;10867:159:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10867:159:9;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1088:19:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1771:556:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1771:556:9;;;;;;;;;;;;;;;;;:::i;:::-;;1024:19:8;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1001:17;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;933:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3587:840:9;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3587:840:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;329:42;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;873:22:8;;;;;;;;;;;;;:::o;8061:542:9:-;8200:11;8162:19;1563:6;1554:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1546:24;;;;;;8227:18;8248:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8248:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8248:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8248:31:9;;;;;;;;;;;;;;;;8227:52;;8327:12;8297:42;;:19;:26;:42;8289:51;;;;;;8351:23;8384:9;8442:61;8452:12;8466:19;8487:15;8442:9;:61::i;:::-;8403:100;;;;;;;;;;;;8537:10;8519:77;;;8549:19;8570;8591:4;8519:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;8519:77:9;;;;;;;;;;;;;;;;;;;1580:1;;;8061:542;;;;;:::o;965:30:8:-;;;;;;;;;;;;;:::o;6084:1199:9:-;6200:9;6264:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6264:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6264:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6264:31:9;;;;;;;;;;;;;;;;:44;;;6309:10;6329:4;6336:17;6264:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6264:90:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6264:90:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6264:90:9;;;;;;;;;;;;;;;;:192;;;;;6374:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6374:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6374:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6374:31:9;;;;;;;;;;;;;;;;:39;;;6422:13;;;;;;;;;;;6438:17;6374:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6374:82:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6374:82:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6374:82:9;;;;;;;;;;;;;;;;6264:192;6253:204;;;;;;6467:13;;;;;;;;;;;:28;;;6496:17;6467:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6467:47:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6467:47:9;;;;6563:13;;;;;;;;;;;:27;;;6591:17;6563:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6563:46:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6563:46:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6563:46:9;;;;;;;;;;;;;;;;:54;;;6626:4;6633:17;6563:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6563:88:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6563:88:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6563:88:9;;;;;;;;;;;;;;;;;6661:11;6675:4;:9;;;6685:17;6704;6723:9;6675:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6675:58:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6675:58:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6675:58:9;;;;;;;;;;;;;;;;6661:72;;6770:6;6750:17;:26;6743:33;;6830:18;6851:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6851:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6851:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6851:31:9;;;;;;;;;;;;;;;;6830:52;;6897:7;6907:1;6897:11;;6892:176;6914:12;6910:16;;:1;:16;;;6892:176;;;6954:17;6949:22;;:1;:22;;;6945:123;;6997:13;;;;;;;;;;;:27;;;7025:1;6997:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6997:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6997:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6997:30:9;;;;;;;;;;;;;;;;:39;;;7037:10;7049:17;6997:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6997:70:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6997:70:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6997:70:9;;;;;;;;;;;;;;;;6989:79;;;;;;6945:123;6928:3;;;;;;;6892:176;;;;7123:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7123:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7123:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7123:31:9;;;;;;;;;;;;;;;;:40;;;7164:10;7176:6;7123:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7123:60:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7123:60:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;7123:60:9;;;;;;;;;;;;;;;;7115:69;;;;;;7221:10;7199:77;;;7233:17;7252;7271:4;7199:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6084:1199;;;;;;;:::o;2449:404::-;1427:7;;;;;;;;;;;1413:21;;:10;:21;;;1405:30;;;;;;2515:19;1563:6;1554:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1546:24;;;;;;2550:18;2571:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2571:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2571:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2571:31:9;;;;;;;;;;;;;;;;2550:52;;2617:7;2627:1;2617:11;;2612:167;2634:12;2630:16;;:1;:16;;;2612:167;;;2673:13;;;;;;;;;;;:27;;;2701:1;2673:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2673:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2673:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2673:30:9;;;;;;;;;;;;;;;;:39;;;2713:7;;;;;;;;;;;2722:13;;;;;;;;;;;:27;;;2750:1;2722:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2722:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2722:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2722:30:9;;;;;;;;;;;;;;;;:40;;;2771:4;2722:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2722:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2722:55:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2722:55:9;;;;;;;;;;;;;;;;2673:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2673:105:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2673:105:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2673:105:9;;;;;;;;;;;;;;;;2665:114;;;;;;2648:3;;;;;;;2612:167;;;;2797:19;2789:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2831:15;;;;;;;;;;1580:1;1445;2449:404::o;4762:853::-;4910:11;4872:19;1563:6;1554:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1546:24;;;;;;4972:1;4950:17;4945:23;;:28;;:51;;;;;4995:1;4982:9;4977:15;;:19;4945:51;4937:60;;;;;;5007:18;5028:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5028:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5028:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5028:31:9;;;;;;;;;;;;;;;;5007:52;;5098:1;5077:17;:22;;;;:58;;;;;5123:12;5103:32;;:17;:32;;;5077:58;5069:67;;;;;;5146:32;5191:12;5181:23;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;5181:23:9;;;;5146:58;;5260:17;5255:23;;5214:19;5234:17;5214:38;;;;;;;;;;;;;;;:64;;;;;5289:11;5302:23;5327:9;5340:61;5350:12;5364:19;5390:9;5385:15;;5340:9;:61::i;:::-;5288:113;;;;;;5430:1;5419:7;:12;;:40;;;;;5458:1;5435:19;:24;;5419:40;5411:49;;;;;;5485:7;5484:8;;5470:23;;5525:10;5508:100;;;5537:17;5556;5581:19;5580:20;;5603:4;5508:100;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1580:1;;;;;4762:853;;;;;;:::o;2958:302::-;3032:9;1427:7;;;;;;;;;;;1413:21;;:10;:21;;;1405:30;;;;;;3064:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3064:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3064:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3064:31:9;;;;;;;;;;;;;;;;:41;;;3114:4;3064:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3064:56:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3064:56:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3064:56:9;;;;;;;;;;;;;;;;3057:63;;3163:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3163:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3163:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3163:31:9;;;;;;;;;;;;;;;;:40;;;3204:7;;;;;;;;;;;3213:4;3163:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3163:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3163:55:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3163:55:9;;;;;;;;;;;;;;;;3155:64;;;;;;3234:19;3248:4;3234:19;;;;;;;;;;;;;;;;;;2958:302;:::o;901:26:8:-;;;;:::o;1049:33::-;;;;;;;;;;;;;;;;;;;;;;;;;:::o;205:25:29:-;;;;;;;;;;;;;:::o;10867:159:9:-;10958:4;364:7;10985:34;;11004:3;;;;;;;;;;;10985:22;;:16;:22;:34;;;;;;10978:41;;10867:159;;;:::o;1088:19:8:-;;;;;;;;;;;;;:::o;1771:556:9:-;1427:7;;;;;;;;;;;1413:21;;:10;:21;;;1405:30;;;;;;1849:20;1563:6;1554:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1546:24;;;;;;1995:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1995:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1995:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1995:31:9;;;;;;;;;;;;;;;;:44;;;2040:10;2060:4;2067:8;1995:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1995:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1995:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1995:81:9;;;;;;;;;;;;;;;;:174;;;;;2096:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2096:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2096:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2096:31:9;;;;;;;;;;;;;;;;:39;;;2144:13;;;;;;;;;;;2160:8;2096:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2096:73:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2096:73:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2096:73:9;;;;;;;;;;;;;;;;1995:174;1984:186;;;;;;2180:13;;;;;;;;;;;:28;;;2209:8;2180:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2180:38:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2180:38:9;;;;2238:8;2228:7;:18;;;;2264:19;2256:5;;:27;;;;;;;;;;;;;;;;;;;;;;;;2298:22;2312:7;;2298:22;;;;;;;;;;;;;;;;;;1445:1;1771:556;:::o;1024:19:8:-;;;;:::o;1001:17::-;;;;;;;;;;;;;:::o;933:26::-;;;;;;;;;;;;;:::o;3587:840:9:-;3732:9;3694:19;1563:6;1554:15;;;;;;;;:5;;;;;;;;;;;:15;;;;;;;;;1546:24;;;;;;3791:1;3769:17;3765:27;;:47;;;;;3811:1;3800:7;3796:16;3765:47;3757:56;;;;;;3823:18;3844:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3844:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3844:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3844:31:9;;;;;;;;;;;;;;;;3823:52;;3914:1;3893:17;:22;;;;:58;;;;;3939:12;3919:32;;:17;:32;;;3893:58;3885:67;;;;;;3962:32;4007:12;3997:23;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;3997:23:9;;;;3962:58;;4075:17;4030:19;4050:17;4030:38;;;;;;;;;;;;;;;:63;;;;;4104:11;4117:23;4142:9;4155:58;4165:12;4179:19;4204:7;4155:9;:58::i;:::-;4103:110;;;;;;4242:1;4231:7;:12;;:40;;;;;4270:1;4247:19;:24;;4231:40;4223:49;;;;;;4294:7;4282:20;;4338:10;4317:103;;;4350:17;4369;4393:19;4415:4;4317:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1580:1;;;;;3587:840;;;;;;:::o;329:42::-;364:7;329:42;:::o;8609:2104::-;8736:11;8749:23;8774:9;8871:11;;;;;;;;;;;:23;;;8895:4;8901:19;8871:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;8871:50:9;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8871:50:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8871:50:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;8871:50:9;;;;;;;;;;;;;;;;8849:72;;8956:1;8934:19;:23;8931:162;;;8978:41;8998:19;8997:20;;8978:13;:41::i;:::-;8971:48;;8931:162;;;9053:40;9072:19;9053:13;:40::i;:::-;9046:47;;8931:162;9125:1;9116:4;9112:14;;9104:23;;;;;;9147:34;9175:4;9147:19;:23;;:34;;;;:::i;:::-;9137:44;;9233:1;9214:15;:20;;:50;;;;;9249:15;9238:7;:26;;9214:50;9213:88;;;;9300:1;9281:15;:20;9213:88;9192:119;;;;;;9347:1;9325:19;:23;9322:358;;;9389:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9389:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9389:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9389:31:9;;;;;;;;;;;;;;;;:44;;;9434:10;9454:4;9466:7;9389:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9389:86:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9389:86:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9389:86:9;;;;;;;;;;;;;;;;:196;;;;;9495:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9495:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9495:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9495:31:9;;;;;;;;;;;;;;;;:39;;;9543:13;;;;;;;;;;;9564:19;9495:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9495:90:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9495:90:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9495:90:9;;;;;;;;;;;;;;;;9389:196;9364:235;;;;;;9614:13;;;;;;;;;;;:28;;;9648:19;9614:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9614:55:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9614:55:9;;;;9322:358;9695:7;9705:1;9695:11;;9690:544;9712:12;9708:16;;:1;:16;;;9690:544;;;9774:1;9748:19;9768:1;9748:22;;;;;;;;;;;;;;;;:27;9745:479;;9823:1;9798:19;9818:1;9798:22;;;;;;;;;;;;;;;;:26;9795:319;;;9856:13;;;;;;;;;;;:27;;;9884:1;9856:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9856:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9856:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9856:30:9;;;;;;;;;;;;;;;;:43;;;9900:10;9920:4;9933:19;9953:1;9933:22;;;;;;;;;;;;;;;;9932:23;;9856:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9856:101:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9856:101:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9856:101:9;;;;;;;;;;;;;;;;9848:110;;;;;;9795:319;;;10013:13;;;;;;;;;;;:27;;;10041:1;10013:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10013:30:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10013:30:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10013:30:9;;;;;;;;;;;;;;;;:39;;;10053:10;10070:19;10090:1;10070:22;;;;;;;;;;;;;;;;10013:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10013:81:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10013:81:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10013:81:9;;;;;;;;;;;;;;;;10005:90;;;;;;9795:319;10158:51;10186:19;10206:1;10186:22;;;;;;;;;;;;;;;;10158:20;10179:1;10158:23;;;;;;;;;;;;;;;;;;:27;;:51;;;;:::i;:::-;10132:20;10153:1;10132:23;;;;;;;;;;;;;;;;;:77;;;;9745:479;9726:3;;;;;;;9690:544;;;;10269:1;10247:19;:23;10244:463;;;10500:13;;;;;;;;;;;:29;;;10536:19;10535:20;;10500:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10500:57:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10500:57:9;;;;10584:1;10574:7;:11;10571:126;;;10613:13;;;;;;;;;;;:29;;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10613:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10613:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10613:31:9;;;;;;;;;;;;;;;;:40;;;10654:10;10672:7;10671:8;;10613:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10613:68:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10613:68:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10613:68:9;;;;;;;;;;;;;;;;10605:77;;;;;;10571:126;10244:463;8609:2104;;;;;;;:::o;1614:210:31:-;1670:6;1688:8;1703:1;1699;:5;1688:16;;1728:1;1723;:6;;:16;;;;;1738:1;1733;:6;;1723:16;1722:38;;;;1749:1;1745;:5;:14;;;;;1758:1;1754;:5;1745:14;1722:38;1714:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1816:1;1809:8;;;1614:210;;;;:::o",
  "source": "pragma solidity ^0.5.0;\nimport \"../Markets/Market.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol\";\nimport \"../Events/Event.sol\";\nimport \"../MarketMakers/MarketMaker.sol\";\n\n\ncontract StandardMarketData {\n    /*\n     *  Constants\n     */\n    uint24 public constant FEE_RANGE = 1000000; // 100%\n}\n\ncontract StandardMarketProxy is Proxy, MarketData, StandardMarketData {\n    constructor(address proxy, address _creator, Event _eventContract, MarketMaker _marketMaker, uint24 _fee)\n        Proxy(proxy)\n        public\n    {\n        // Validate inputs\n        require(address(_eventContract) != address(0) && address(_marketMaker) != address(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\n/// @title Standard market contract - Backed implementation of standard markets\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract StandardMarket is Proxied, Market, StandardMarketData {\n    using SignedSafeMath for int;\n    using SafeMath for uint;\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 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, address(this), _funding)\n                && eventContract.collateralToken().approve(address(eventContract), _funding));\n        eventContract.buyAllOutcomes(_funding);\n        funding = _funding;\n        stage = Stages.MarketFunded;\n        emit 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(address(this))));\n        stage = Stages.MarketClosed;\n        emit 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(address(this));\n        // Transfer fees\n        require(eventContract.collateralToken().transfer(creator, fees));\n        emit 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        require(int(outcomeTokenCount) >= 0 && int(maxCost) > 0);\n        uint8 outcomeCount = eventContract.getOutcomeCount();\n        require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n        int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n        outcomeTokenAmounts[outcomeTokenIndex] = int(outcomeTokenCount);\n        (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, int(maxCost));\n        require(netCost >= 0 && outcomeTokenNetCost >= 0);\n        cost = uint(netCost);\n        emit OutcomeTokenPurchase(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(outcomeTokenNetCost), 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        require(-int(outcomeTokenCount) <= 0 && -int(minProfit) < 0);\n        uint8 outcomeCount = eventContract.getOutcomeCount();\n        require(outcomeTokenIndex >= 0 && outcomeTokenIndex < outcomeCount);\n        int[] memory outcomeTokenAmounts = new int[](outcomeCount);\n        outcomeTokenAmounts[outcomeTokenIndex] = -int(outcomeTokenCount);\n        (int netCost, int outcomeTokenNetCost, uint fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, -int(minProfit));\n        require(netCost <= 0 && outcomeTokenNetCost <= 0);\n        profit = uint(-netCost);\n        emit OutcomeTokenSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, uint(-outcomeTokenNetCost), 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, address(this), outcomeTokenCount)\n                && eventContract.collateralToken().approve(address(eventContract), outcomeTokenCount));\n        eventContract.buyAllOutcomes(outcomeTokenCount);\n        // Short sell selected outcome\n        eventContract.outcomeTokens(outcomeTokenIndex).approve(address(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        emit OutcomeTokenShortSale(msg.sender, outcomeTokenIndex, outcomeTokenCount, cost);\n    }\n\n    /// @dev Allows to trade outcome tokens and collateral with the market maker\n    /// @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n    /// @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n    /// @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.\n    function trade(int[] memory outcomeTokenAmounts, int collateralLimit)\n        public\n        atStage(Stages.MarketFunded)\n        returns (int netCost)\n    {\n        uint8 outcomeCount = eventContract.getOutcomeCount();\n        require(outcomeTokenAmounts.length == outcomeCount);\n\n        int outcomeTokenNetCost;\n        uint fees;\n        (netCost, outcomeTokenNetCost, fees) = tradeImpl(outcomeCount, outcomeTokenAmounts, collateralLimit);\n\n        emit OutcomeTokenTrade(msg.sender, outcomeTokenAmounts, outcomeTokenNetCost, fees);\n    }\n\n    function tradeImpl(uint8 outcomeCount, int[] memory outcomeTokenAmounts, int collateralLimit)\n        private\n        returns (int netCost, int outcomeTokenNetCost, uint fees)\n    {\n        // Calculate net cost for executing trade\n        outcomeTokenNetCost = marketMaker.calcNetCost(this, outcomeTokenAmounts);\n        if(outcomeTokenNetCost < 0)\n            fees = calcMarketFee(uint(-outcomeTokenNetCost));\n        else\n            fees = calcMarketFee(uint(outcomeTokenNetCost));\n\n        require(int(fees) >= 0);\n        netCost = outcomeTokenNetCost.add(int(fees));\n\n        require(\n            (collateralLimit != 0 && netCost <= collateralLimit) ||\n            collateralLimit == 0\n        );\n\n        if(outcomeTokenNetCost > 0) {\n            require(\n                eventContract.collateralToken().transferFrom(msg.sender, address(this), uint(netCost)) &&\n                eventContract.collateralToken().approve(address(eventContract), uint(outcomeTokenNetCost))\n            );\n\n            eventContract.buyAllOutcomes(uint(outcomeTokenNetCost));\n        }\n\n        for (uint8 i = 0; i < outcomeCount; i++) {\n            if(outcomeTokenAmounts[i] != 0) {\n                if(outcomeTokenAmounts[i] < 0) {\n                    require(eventContract.outcomeTokens(i).transferFrom(msg.sender, address(this), uint(-outcomeTokenAmounts[i])));\n                } else {\n                    require(eventContract.outcomeTokens(i).transfer(msg.sender, uint(outcomeTokenAmounts[i])));\n                }\n\n                netOutcomeTokensSold[i] = netOutcomeTokensSold[i].add(outcomeTokenAmounts[i]);\n            }\n        }\n\n        if(outcomeTokenNetCost < 0) {\n            // This is safe since\n            // 0x8000000000000000000000000000000000000000000000000000000000000000 ==\n            // uint(-int(-0x8000000000000000000000000000000000000000000000000000000000000000))\n            eventContract.sellAllOutcomes(uint(-outcomeTokenNetCost));\n            if(netCost < 0) {\n                require(eventContract.collateralToken().transfer(msg.sender, uint(-netCost)));\n            }\n        }\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        view\n        returns (uint)\n    {\n        return outcomeTokenCost * fee / FEE_RANGE;\n    }\n}\n",
  "sourcePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol",
  "ast": {
    "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol",
    "exportedSymbols": {
      "StandardMarket": [
        3199
      ],
      "StandardMarketData": [
        2307
      ],
      "StandardMarketProxy": [
        2389
      ]
    },
    "id": 3200,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2298,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:9"
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol",
        "file": "../Markets/Market.sol",
        "id": 2299,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 2297,
        "src": "24:31:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 2300,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 7779,
        "src": "56:63:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol",
        "file": "openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol",
        "id": 2301,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 7249,
        "src": "120:67:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol",
        "file": "../Events/Event.sol",
        "id": 2302,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 393,
        "src": "188:29:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol",
        "file": "../MarketMakers/MarketMaker.sol",
        "id": 2303,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 1607,
        "src": "218:41:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2307,
        "linearizedBaseContracts": [
          2307
        ],
        "name": "StandardMarketData",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 2306,
            "name": "FEE_RANGE",
            "nodeType": "VariableDeclaration",
            "scope": 2307,
            "src": "329:42:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint24",
              "typeString": "uint24"
            },
            "typeName": {
              "id": 2304,
              "name": "uint24",
              "nodeType": "ElementaryTypeName",
              "src": "329:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_uint24",
                "typeString": "uint24"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "31303030303030",
              "id": 2305,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "364:7:9",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1000000"
            },
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "262:120:9"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2308,
              "name": "Proxy",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6828,
              "src": "416:5:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Proxy_$6828",
                "typeString": "contract Proxy"
              }
            },
            "id": 2309,
            "nodeType": "InheritanceSpecifier",
            "src": "416:5:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2310,
              "name": "MarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2230,
              "src": "423:10:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_MarketData_$2230",
                "typeString": "contract MarketData"
              }
            },
            "id": 2311,
            "nodeType": "InheritanceSpecifier",
            "src": "423:10:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2312,
              "name": "StandardMarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2307,
              "src": "435:18:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StandardMarketData_$2307",
                "typeString": "contract StandardMarketData"
              }
            },
            "id": 2313,
            "nodeType": "InheritanceSpecifier",
            "src": "435:18:9"
          }
        ],
        "contractDependencies": [
          2230,
          2307,
          6798,
          6828
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2389,
        "linearizedBaseContracts": [
          2389,
          2307,
          2230,
          6828,
          6798
        ],
        "name": "StandardMarketProxy",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 2387,
              "nodeType": "Block",
              "src": "606:425:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2348,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2344,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2336,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2331,
                                  "name": "_eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2319,
                                  "src": "659:14:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2330,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "651:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2332,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "651:23:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 2334,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "686:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 2333,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "678:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2335,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "678:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "src": "651:37:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2343,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2338,
                                  "name": "_marketMaker",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2321,
                                  "src": "700:12:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                                    "typeString": "contract MarketMaker"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                                    "typeString": "contract MarketMaker"
                                  }
                                ],
                                "id": 2337,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "692:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2339,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "692:21:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 2341,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "725:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 2340,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "717:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2342,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "717:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "src": "692:35:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "651:76:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint24",
                            "typeString": "uint24"
                          },
                          "id": 2347,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2345,
                            "name": "_fee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2323,
                            "src": "731:4:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2346,
                            "name": "FEE_RANGE",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2306,
                            "src": "738:9:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "src": "731:16:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "651:96:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2329,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "643:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2349,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "643:105:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2350,
                  "nodeType": "ExpressionStatement",
                  "src": "643:105:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2353,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2351,
                      "name": "creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2210,
                      "src": "758:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2352,
                      "name": "_creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2317,
                      "src": "768:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "758:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2354,
                  "nodeType": "ExpressionStatement",
                  "src": "758:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2358,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2355,
                      "name": "createdAtBlock",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2212,
                      "src": "786:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2356,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7910,
                        "src": "803:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 2357,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "803:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "786:29:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2359,
                  "nodeType": "ExpressionStatement",
                  "src": "786:29:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2362,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2360,
                      "name": "eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2214,
                      "src": "825:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$392",
                        "typeString": "contract Event"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2361,
                      "name": "_eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2319,
                      "src": "841:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$392",
                        "typeString": "contract Event"
                      }
                    },
                    "src": "825:30:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$392",
                      "typeString": "contract Event"
                    }
                  },
                  "id": 2363,
                  "nodeType": "ExpressionStatement",
                  "src": "825:30:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2372,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2364,
                      "name": "netOutcomeTokensSold",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2223,
                      "src": "865:20:9",
                      "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": 2368,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "898:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2369,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getOutcomeCount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 331,
                            "src": "898:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                              "typeString": "function () view external returns (uint8)"
                            }
                          },
                          "id": 2370,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "898:31:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2367,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "888:9:9",
                        "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": 2365,
                            "name": "int",
                            "nodeType": "ElementaryTypeName",
                            "src": "892:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 2366,
                          "length": null,
                          "nodeType": "ArrayTypeName",
                          "src": "892:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        }
                      },
                      "id": 2371,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "888:42:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                        "typeString": "int256[] memory"
                      }
                    },
                    "src": "865:65:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                      "typeString": "int256[] storage ref"
                    }
                  },
                  "id": 2373,
                  "nodeType": "ExpressionStatement",
                  "src": "865:65:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2376,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2374,
                      "name": "fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2218,
                      "src": "940:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2375,
                      "name": "_fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2323,
                      "src": "946:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "940:10:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "id": 2377,
                  "nodeType": "ExpressionStatement",
                  "src": "940:10:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2380,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2378,
                      "name": "marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2216,
                      "src": "960:11:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$1606",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2379,
                      "name": "_marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2321,
                      "src": "974:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$1606",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "src": "960:26:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$1606",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "id": 2381,
                  "nodeType": "ExpressionStatement",
                  "src": "960:26:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2385,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2382,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "996:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2383,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "1004:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2384,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketCreated",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1004:20:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "996:28:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2386,
                  "nodeType": "ExpressionStatement",
                  "src": "996:28:9"
                }
              ]
            },
            "documentation": null,
            "id": 2388,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 2326,
                    "name": "proxy",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2315,
                    "src": "580:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 2327,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2325,
                  "name": "Proxy",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 6828,
                  "src": "574:5:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_Proxy_$6828_$",
                    "typeString": "type(contract Proxy)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "574:12:9"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2324,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2315,
                  "name": "proxy",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "472:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2314,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "472:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2317,
                  "name": "_creator",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "487:16:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2316,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "487:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2319,
                  "name": "_eventContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "505:20:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Event_$392",
                    "typeString": "contract Event"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2318,
                    "name": "Event",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 392,
                    "src": "505:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$392",
                      "typeString": "contract Event"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2321,
                  "name": "_marketMaker",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "527:24:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                    "typeString": "contract MarketMaker"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2320,
                    "name": "MarketMaker",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1606,
                    "src": "527:11:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$1606",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2323,
                  "name": "_fee",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "553:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 2322,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "553:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "471:94:9"
            },
            "returnParameters": {
              "id": 2328,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "606:0:9"
            },
            "scope": 2389,
            "src": "460:571:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "384:649:9"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2390,
              "name": "Proxied",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6798,
              "src": "1189:7:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Proxied_$6798",
                "typeString": "contract Proxied"
              }
            },
            "id": 2391,
            "nodeType": "InheritanceSpecifier",
            "src": "1189:7:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2392,
              "name": "Market",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2296,
              "src": "1198:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Market_$2296",
                "typeString": "contract Market"
              }
            },
            "id": 2393,
            "nodeType": "InheritanceSpecifier",
            "src": "1198:6:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2394,
              "name": "StandardMarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2307,
              "src": "1206:18:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StandardMarketData_$2307",
                "typeString": "contract StandardMarketData"
              }
            },
            "id": 2395,
            "nodeType": "InheritanceSpecifier",
            "src": "1206:18:9"
          }
        ],
        "contractDependencies": [
          2230,
          2296,
          2307,
          6798
        ],
        "contractKind": "contract",
        "documentation": "@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - <stefan@gnosis.pm>",
        "fullyImplemented": true,
        "id": 3199,
        "linearizedBaseContracts": [
          3199,
          2307,
          2296,
          2230,
          6798
        ],
        "name": "StandardMarket",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 2398,
            "libraryName": {
              "contractScope": null,
              "id": 2396,
              "name": "SignedSafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 7248,
              "src": "1237:14:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SignedSafeMath_$7248",
                "typeString": "library SignedSafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1231:29:9",
            "typeName": {
              "id": 2397,
              "name": "int",
              "nodeType": "ElementaryTypeName",
              "src": "1256:3:9",
              "typeDescriptions": {
                "typeIdentifier": "t_int256",
                "typeString": "int256"
              }
            }
          },
          {
            "id": 2401,
            "libraryName": {
              "contractScope": null,
              "id": 2399,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 7381,
              "src": "1271:8:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$7381",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1265:24:9",
            "typeName": {
              "id": 2400,
              "name": "uint",
              "nodeType": "ElementaryTypeName",
              "src": "1284:4:9",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "body": {
              "id": 2411,
              "nodeType": "Block",
              "src": "1349:104:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2407,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2404,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7920,
                            "src": "1413:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 2405,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1413:10:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2406,
                          "name": "creator",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2210,
                          "src": "1427:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1413:21:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2403,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1405:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2408,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1405:30:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2409,
                  "nodeType": "ExpressionStatement",
                  "src": "1405:30:9"
                },
                {
                  "id": 2410,
                  "nodeType": "PlaceholderStatement",
                  "src": "1445:1:9"
                }
              ]
            },
            "documentation": null,
            "id": 2412,
            "name": "isCreator",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2402,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1346:2:9"
            },
            "src": "1328:125:9",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2423,
              "nodeType": "Block",
              "src": "1491:97:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_enum$_Stages_$2229",
                          "typeString": "enum MarketData.Stages"
                        },
                        "id": 2419,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2417,
                          "name": "stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2225,
                          "src": "1554:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2229",
                            "typeString": "enum MarketData.Stages"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2418,
                          "name": "_stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2414,
                          "src": "1563:6:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2229",
                            "typeString": "enum MarketData.Stages"
                          }
                        },
                        "src": "1554:15:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2416,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1546:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2420,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1546:24:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2421,
                  "nodeType": "ExpressionStatement",
                  "src": "1546:24:9"
                },
                {
                  "id": 2422,
                  "nodeType": "PlaceholderStatement",
                  "src": "1580:1:9"
                }
              ]
            },
            "documentation": null,
            "id": 2424,
            "name": "atStage",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2415,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2414,
                  "name": "_stage",
                  "nodeType": "VariableDeclaration",
                  "scope": 2424,
                  "src": "1476:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_Stages_$2229",
                    "typeString": "enum MarketData.Stages"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2413,
                    "name": "Stages",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2229,
                    "src": "1476:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1475:15:9"
            },
            "src": "1459:129:9",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2478,
              "nodeType": "Block",
              "src": "1875:452:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2456,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2440,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7920,
                                "src": "2040:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2441,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "2040:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2443,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7982,
                                  "src": "2060:4:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "id": 2442,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2052:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2444,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2052:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2445,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2426,
                              "src": "2067:8:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2436,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "1995:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2437,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "1995:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2438,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1995:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2439,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7511,
                            "src": "1995:44:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2446,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1995:81:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2452,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2144:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2451,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2136:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2453,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2136:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2454,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2426,
                              "src": "2160:8:9",
                              "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": 2447,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2096:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2448,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "2096:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2449,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2096:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2450,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7476,
                            "src": "2096:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2455,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2096:73:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1995:174:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2435,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1984:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2457,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1984:186:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2458,
                  "nodeType": "ExpressionStatement",
                  "src": "1984:186:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2462,
                        "name": "_funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2426,
                        "src": "2209:8:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2459,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "2180:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2461,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 251,
                      "src": "2180:28:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2463,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2180:38:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2464,
                  "nodeType": "ExpressionStatement",
                  "src": "2180:38:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2467,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2465,
                      "name": "funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2220,
                      "src": "2228:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2466,
                      "name": "_funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2426,
                      "src": "2238:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2228:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2468,
                  "nodeType": "ExpressionStatement",
                  "src": "2228:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2472,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2469,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "2256:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2470,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "2264:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2471,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketFunded",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2264:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "2256:27:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2473,
                  "nodeType": "ExpressionStatement",
                  "src": "2256:27:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2475,
                        "name": "funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2220,
                        "src": "2312:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2474,
                      "name": "MarketFunding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2157,
                      "src": "2298:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2476,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2298:22:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2477,
                  "nodeType": "EmitStatement",
                  "src": "2293:27:9"
                }
              ]
            },
            "documentation": "@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount",
            "id": 2479,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2429,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2428,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "1823:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1823:9:9"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2431,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "1849:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2432,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketCreated",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "1849:20:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2433,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2430,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "1841:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1841:29:9"
              }
            ],
            "name": "fund",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2427,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2426,
                  "name": "_funding",
                  "nodeType": "VariableDeclaration",
                  "scope": 2479,
                  "src": "1785:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2425,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1785:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1784:15:9"
            },
            "returnParameters": {
              "id": 2434,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1875:0:9"
            },
            "scope": 3199,
            "src": "1771:556:9",
            "stateMutability": "nonpayable",
            "superFunction": 2237,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2532,
              "nodeType": "Block",
              "src": "2540:313:9",
              "statements": [
                {
                  "assignments": [
                    2489
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2489,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2532,
                      "src": "2550:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2488,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2550:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2493,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2490,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "2571:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2491,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "2571:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2492,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2571:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2550:52:9"
                },
                {
                  "body": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2510,
                              "name": "creator",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2210,
                              "src": "2713:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2517,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7982,
                                      "src": "2771:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                        "typeString": "contract StandardMarket"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                        "typeString": "contract StandardMarket"
                                      }
                                    ],
                                    "id": 2516,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2763:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": "address"
                                  },
                                  "id": 2518,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2763:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2513,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2495,
                                      "src": "2750:1:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2511,
                                      "name": "eventContract",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2214,
                                      "src": "2722:13:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Event_$392",
                                        "typeString": "contract Event"
                                      }
                                    },
                                    "id": 2512,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "outcomeTokens",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 203,
                                    "src": "2722:27:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                      "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                    }
                                  },
                                  "id": 2514,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2722:30:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                    "typeString": "contract OutcomeToken"
                                  }
                                },
                                "id": 2515,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balanceOf",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 7422,
                                "src": "2722:40:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                  "typeString": "function (address) view external returns (uint256)"
                                }
                              },
                              "id": 2519,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2722:55:9",
                              "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": 2507,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2495,
                                  "src": "2701:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2505,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2673:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2506,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "outcomeTokens",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 203,
                                "src": "2673:27:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                }
                              },
                              "id": 2508,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2673:30:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                "typeString": "contract OutcomeToken"
                              }
                            },
                            "id": 2509,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7441,
                            "src": "2673:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2520,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2673:105:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 2504,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          7923,
                          7924
                        ],
                        "referencedDeclaration": 7923,
                        "src": "2665:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                          "typeString": "function (bool) pure"
                        }
                      },
                      "id": 2521,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2665:114:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2522,
                    "nodeType": "ExpressionStatement",
                    "src": "2665:114:9"
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2500,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2498,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2495,
                      "src": "2630:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2499,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2489,
                      "src": "2634:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "2630:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2523,
                  "initializationExpression": {
                    "assignments": [
                      2495
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2495,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2523,
                        "src": "2617:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2494,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "2617:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2497,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2496,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2627:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2617:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2502,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "2648:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2501,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2495,
                        "src": "2648:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2503,
                    "nodeType": "ExpressionStatement",
                    "src": "2648:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "2612:167:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2527,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2524,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "2789:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2525,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "2797:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2526,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketClosed",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2797:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "2789:27:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2528,
                  "nodeType": "ExpressionStatement",
                  "src": "2789:27:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 2529,
                      "name": "MarketClosing",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2159,
                      "src": "2831:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 2530,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2831:15:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2531,
                  "nodeType": "EmitStatement",
                  "src": "2826:20:9"
                }
              ]
            },
            "documentation": "@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator",
            "id": 2533,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2482,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2481,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "2489:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2489:9:9"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2484,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "2515:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2485,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2515:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2486,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2483,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "2507:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2507:28:9"
              }
            ],
            "name": "close",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2480,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2463:2:9"
            },
            "returnParameters": {
              "id": 2487,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2540:0:9"
            },
            "scope": 3199,
            "src": "2449:404:9",
            "stateMutability": "nonpayable",
            "superFunction": 2240,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2565,
              "nodeType": "Block",
              "src": "3047:213:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2549,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2540,
                      "name": "fees",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2538,
                      "src": "3057:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2546,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7982,
                              "src": "3114:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                "typeString": "contract StandardMarket"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                "typeString": "contract StandardMarket"
                              }
                            ],
                            "id": 2545,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "3106:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 2547,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3106:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2541,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "3064:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2542,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "collateralToken",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 194,
                            "src": "3064:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                              "typeString": "function () view external returns (contract ERC20)"
                            }
                          },
                          "id": 2543,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3064:31:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ERC20_$7778",
                            "typeString": "contract ERC20"
                          }
                        },
                        "id": 2544,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balanceOf",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 7422,
                        "src": "3064:41:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                          "typeString": "function (address) view external returns (uint256)"
                        }
                      },
                      "id": 2548,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3064:56:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3057:63:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2550,
                  "nodeType": "ExpressionStatement",
                  "src": "3057:63:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2556,
                            "name": "creator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2210,
                            "src": "3204:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2557,
                            "name": "fees",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2538,
                            "src": "3213:4:9",
                            "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": 2552,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2214,
                                "src": "3163:13:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$392",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2553,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 194,
                              "src": "3163:29:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                "typeString": "function () view external returns (contract ERC20)"
                              }
                            },
                            "id": 2554,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3163:31:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7778",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 2555,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7441,
                          "src": "3163:40:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2558,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3163:55:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2551,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3155:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2559,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3155:64:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2560,
                  "nodeType": "ExpressionStatement",
                  "src": "3155:64:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2562,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2538,
                        "src": "3248:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2561,
                      "name": "FeeWithdrawal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2163,
                      "src": "3234:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2563,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3234:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2564,
                  "nodeType": "EmitStatement",
                  "src": "3229:24:9"
                }
              ]
            },
            "documentation": "@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount",
            "id": 2566,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2536,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2535,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "3005:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3005:9:9"
              }
            ],
            "name": "withdrawFees",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2534,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2979:2:9"
            },
            "returnParameters": {
              "id": 2539,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2538,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 2566,
                  "src": "3032:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2537,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3032:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3031:11:9"
            },
            "scope": 3199,
            "src": "2958:302:9",
            "stateMutability": "nonpayable",
            "superFunction": 2245,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2670,
              "nodeType": "Block",
              "src": "3747:680:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2592,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2586,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2583,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2570,
                                "src": "3769:17:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 2582,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3765:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": "int"
                            },
                            "id": 2584,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3765:22:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2585,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3791:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3765:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2591,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2588,
                                "name": "maxCost",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2572,
                                "src": "3800:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 2587,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3796:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": "int"
                            },
                            "id": 2589,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3796:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2590,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3811:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3796:16:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3765:47:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2581,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3757:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3757:56:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2594,
                  "nodeType": "ExpressionStatement",
                  "src": "3757:56:9"
                },
                {
                  "assignments": [
                    2596
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2596,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "3823:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2595,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "3823:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2600,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2597,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "3844:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2598,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "3844:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2599,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3844:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3823:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2608,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2604,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2602,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2568,
                            "src": "3893:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2603,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3914:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3893:22:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2607,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2605,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2568,
                            "src": "3919:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2606,
                            "name": "outcomeCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2596,
                            "src": "3939:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "3919:32:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3893:58:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2601,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3885:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2609,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3885:67:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2610,
                  "nodeType": "ExpressionStatement",
                  "src": "3885:67:9"
                },
                {
                  "assignments": [
                    2614
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2614,
                      "name": "outcomeTokenAmounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "3962:32:9",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                        "typeString": "int256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2612,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "3962:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2613,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "3962:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2620,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2618,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2596,
                        "src": "4007:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2617,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "3997:9:9",
                      "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": 2615,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "4001:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2616,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "4001:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      }
                    },
                    "id": 2619,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3997:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                      "typeString": "int256[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3962:58:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2627,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2621,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4030:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      "id": 2623,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2622,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2568,
                        "src": "4050:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "4030:38:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2625,
                          "name": "outcomeTokenCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2570,
                          "src": "4075:17:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 2624,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4071:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_int256_$",
                          "typeString": "type(int256)"
                        },
                        "typeName": "int"
                      },
                      "id": 2626,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4071:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "4030:63:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2628,
                  "nodeType": "ExpressionStatement",
                  "src": "4030:63:9"
                },
                {
                  "assignments": [
                    2630,
                    2632,
                    2634
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2630,
                      "name": "netCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4104:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2629,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "4104:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2632,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4117:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2631,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "4117:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2634,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4142:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2633,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "4142:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2642,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2636,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2596,
                        "src": "4165:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2637,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4179:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2639,
                            "name": "maxCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2572,
                            "src": "4204:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2638,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4200:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_int256_$",
                            "typeString": "type(int256)"
                          },
                          "typeName": "int"
                        },
                        "id": 2640,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4200:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 2635,
                      "name": "tradeImpl",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3184,
                      "src": "4155:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                      }
                    },
                    "id": 2641,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4155:58:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                      "typeString": "tuple(int256,int256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4103:110:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2650,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2646,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2644,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2630,
                            "src": "4231:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2645,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4242:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4231:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2649,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2647,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2632,
                            "src": "4247:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2648,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4270:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4247:24:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4231:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2643,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "4223:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2651,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4223:49:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2652,
                  "nodeType": "ExpressionStatement",
                  "src": "4223:49:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2657,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2653,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2579,
                      "src": "4282:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2655,
                          "name": "netCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2630,
                          "src": "4294:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2654,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4289:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint256_$",
                          "typeString": "type(uint256)"
                        },
                        "typeName": "uint"
                      },
                      "id": 2656,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4289:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4282:20:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2658,
                  "nodeType": "ExpressionStatement",
                  "src": "4282:20:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2660,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "4338:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2661,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4338:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2662,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2568,
                        "src": "4350:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2663,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2570,
                        "src": "4369:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2665,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2632,
                            "src": "4393:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          ],
                          "id": 2664,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4388:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_uint256_$",
                            "typeString": "type(uint256)"
                          },
                          "typeName": "uint"
                        },
                        "id": 2666,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4388:25:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2667,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2634,
                        "src": "4415:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2659,
                      "name": "OutcomeTokenPurchase",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2175,
                      "src": "4317:20:9",
                      "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": 2668,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4317:103:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2669,
                  "nodeType": "EmitStatement",
                  "src": "4312:108:9"
                }
              ]
            },
            "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": 2671,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2575,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "3694:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "3694:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2577,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2574,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "3686:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3686:28:9"
              }
            ],
            "name": "buy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2573,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2568,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3600:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2567,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3600:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2570,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3625:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2569,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3625:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2572,
                  "name": "maxCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3649:12:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2571,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3649:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3599:63:9"
            },
            "returnParameters": {
              "id": 2580,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2579,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3732:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2578,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3732:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3731:11:9"
            },
            "scope": 3199,
            "src": "3587:840:9",
            "stateMutability": "nonpayable",
            "superFunction": 2256,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2781,
              "nodeType": "Block",
              "src": "4927:688:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2699,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2692,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2690,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "4945:23:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2688,
                                  "name": "outcomeTokenCount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2675,
                                  "src": "4950:17:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 2687,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4946:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_int256_$",
                                  "typeString": "type(int256)"
                                },
                                "typeName": "int"
                              },
                              "id": 2689,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4946:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2691,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4972:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4945:28:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "4977:15:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2694,
                                  "name": "minProfit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2677,
                                  "src": "4982:9:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 2693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4978:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_int256_$",
                                  "typeString": "type(int256)"
                                },
                                "typeName": "int"
                              },
                              "id": 2695,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4978:14:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2697,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4995:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4977:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4945:51:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2686,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "4937:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2700,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4937:60:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2701,
                  "nodeType": "ExpressionStatement",
                  "src": "4937:60:9"
                },
                {
                  "assignments": [
                    2703
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2703,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5007:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2702,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "5007:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2707,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2704,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "5028:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2705,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "5028:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2706,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5028:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5007:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2715,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2711,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2709,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2673,
                            "src": "5077:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2710,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5098:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5077:22:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2714,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2712,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2673,
                            "src": "5103:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2713,
                            "name": "outcomeCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2703,
                            "src": "5123:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "5103:32:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5077:58:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2708,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "5069:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2716,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5069:67:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2717,
                  "nodeType": "ExpressionStatement",
                  "src": "5069:67:9"
                },
                {
                  "assignments": [
                    2721
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2721,
                      "name": "outcomeTokenAmounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5146:32:9",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                        "typeString": "int256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2719,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "5146:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2720,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "5146:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2727,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2725,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2703,
                        "src": "5191:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2724,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "5181:9:9",
                      "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": 2722,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "5185:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2723,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "5185:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      }
                    },
                    "id": 2726,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5181:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                      "typeString": "int256[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5146:58:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2735,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2728,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2721,
                        "src": "5214:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      "id": 2730,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2729,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2673,
                        "src": "5234:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5214:38:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2734,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "-",
                      "prefix": true,
                      "src": "5255:23:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2732,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2675,
                            "src": "5260:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2731,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5256:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_int256_$",
                            "typeString": "type(int256)"
                          },
                          "typeName": "int"
                        },
                        "id": 2733,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5256:22:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "5214:64:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2736,
                  "nodeType": "ExpressionStatement",
                  "src": "5214:64:9"
                },
                {
                  "assignments": [
                    2738,
                    2740,
                    2742
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2738,
                      "name": "netCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5289:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2737,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "5289:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2740,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5302:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2739,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "5302:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2742,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5327:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2741,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5327:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2751,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2744,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2703,
                        "src": "5350:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2745,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2721,
                        "src": "5364:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2749,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "-",
                        "prefix": true,
                        "src": "5385:15:9",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2747,
                              "name": "minProfit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2677,
                              "src": "5390:9:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2746,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "5386:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2748,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5386:14:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 2743,
                      "name": "tradeImpl",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3184,
                      "src": "5340:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                      }
                    },
                    "id": 2750,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5340:61:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                      "typeString": "tuple(int256,int256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5288:113:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2759,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2755,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2753,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2738,
                            "src": "5419:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2754,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5430:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5419:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2756,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2740,
                            "src": "5435:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2757,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5458:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5435:24:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5419:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2752,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "5411:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2760,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5411:49:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2761,
                  "nodeType": "ExpressionStatement",
                  "src": "5411:49:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2767,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2762,
                      "name": "profit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2684,
                      "src": "5470:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2765,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "-",
                          "prefix": true,
                          "src": "5484:8:9",
                          "subExpression": {
                            "argumentTypes": null,
                            "id": 2764,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2738,
                            "src": "5485:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2763,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "5479:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint256_$",
                          "typeString": "type(uint256)"
                        },
                        "typeName": "uint"
                      },
                      "id": 2766,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5479:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5470:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2768,
                  "nodeType": "ExpressionStatement",
                  "src": "5470:23:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2770,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "5525:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5525:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2772,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2673,
                        "src": "5537:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2773,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2675,
                        "src": "5556:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2776,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "5580:20:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "id": 2775,
                              "name": "outcomeTokenNetCost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2740,
                              "src": "5581:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          ],
                          "id": 2774,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5575:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_uint256_$",
                            "typeString": "type(uint256)"
                          },
                          "typeName": "uint"
                        },
                        "id": 2777,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5575:26:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2778,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5603:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2769,
                      "name": "OutcomeTokenSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2187,
                      "src": "5508:16:9",
                      "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": 2779,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5508:100:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2780,
                  "nodeType": "EmitStatement",
                  "src": "5503:105:9"
                }
              ]
            },
            "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": 2782,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2680,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "4872:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2681,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "4872:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2682,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2679,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "4864:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4864:28:9"
              }
            ],
            "name": "sell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2678,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2673,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4776:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2672,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4776:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2675,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4801:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2674,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4801:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2677,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4825:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2676,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4825:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4775:65:9"
            },
            "returnParameters": {
              "id": 2685,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2684,
                  "name": "profit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4910:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2683,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4910:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4909:13:9"
            },
            "scope": 3199,
            "src": "4762:853:9",
            "stateMutability": "nonpayable",
            "superFunction": 2267,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2902,
              "nodeType": "Block",
              "src": "6215:1068:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2814,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2798,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7920,
                                "src": "6309:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2799,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "6309:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2801,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7982,
                                  "src": "6329:4:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "id": 2800,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "6321:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2802,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6321:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2803,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2786,
                              "src": "6336:17:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2794,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6264:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2795,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "6264:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2796,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6264:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2797,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7511,
                            "src": "6264:44:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2804,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6264:90:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2810,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6422:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2809,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "6414:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6414:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2812,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2786,
                              "src": "6438:17:9",
                              "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": 2805,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6374:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2806,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "6374:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2807,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6374:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2808,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7476,
                            "src": "6374:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6374:82:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6264:192:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2793,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "6253:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2815,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6253:204:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2816,
                  "nodeType": "ExpressionStatement",
                  "src": "6253:204:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2820,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6496:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2817,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "6467:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2819,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 251,
                      "src": "6467:28:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2821,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6467:47:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2822,
                  "nodeType": "ExpressionStatement",
                  "src": "6467:47:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2830,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7982,
                            "src": "6626:4:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_StandardMarket_$3199",
                              "typeString": "contract StandardMarket"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_StandardMarket_$3199",
                              "typeString": "contract StandardMarket"
                            }
                          ],
                          "id": 2829,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "6618:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 2831,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6618:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2832,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6633:17:9",
                        "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": 2826,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2784,
                            "src": "6591:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2823,
                            "name": "eventContract",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2214,
                            "src": "6563:13:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Event_$392",
                              "typeString": "contract Event"
                            }
                          },
                          "id": 2825,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "outcomeTokens",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 203,
                          "src": "6563:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                            "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                          }
                        },
                        "id": 2827,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6563:46:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                          "typeString": "contract OutcomeToken"
                        }
                      },
                      "id": 2828,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 7476,
                      "src": "6563:54:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 2833,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6563:88:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2834,
                  "nodeType": "ExpressionStatement",
                  "src": "6563:88:9"
                },
                {
                  "assignments": [
                    2836
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2836,
                      "name": "profit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2902,
                      "src": "6661:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2835,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "6661:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2843,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2839,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "6685:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2840,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6704:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2841,
                        "name": "minProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2788,
                        "src": "6723:9:9",
                        "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": 2837,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7982,
                        "src": "6675:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      "id": 2838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sell",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2782,
                      "src": "6675:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint8,uint256,uint256) external returns (uint256)"
                      }
                    },
                    "id": 2842,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6675:58:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6661:72:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2848,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2844,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2791,
                      "src": "6743:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2847,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2845,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6750:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2846,
                        "name": "profit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "6770:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "6750:26:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6743:33:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2849,
                  "nodeType": "ExpressionStatement",
                  "src": "6743:33:9"
                },
                {
                  "assignments": [
                    2851
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2851,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2902,
                      "src": "6830:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2850,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "6830:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2855,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2852,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "6851:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2853,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "6851:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2854,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6851:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6830:52:9"
                },
                {
                  "body": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 2868,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2866,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2857,
                        "src": "6949:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2867,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "6954:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "src": "6949:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 2881,
                    "nodeType": "IfStatement",
                    "src": "6945:123:9",
                    "trueBody": {
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2875,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7920,
                                  "src": "7037:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 2876,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "7037:10:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "id": 2877,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2786,
                                "src": "7049:17:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 2872,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2857,
                                    "src": "7025:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2870,
                                    "name": "eventContract",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2214,
                                    "src": "6997:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Event_$392",
                                      "typeString": "contract Event"
                                    }
                                  },
                                  "id": 2871,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "outcomeTokens",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 203,
                                  "src": "6997:27:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                    "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                  }
                                },
                                "id": 2873,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6997:30:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                  "typeString": "contract OutcomeToken"
                                }
                              },
                              "id": 2874,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "transfer",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 7441,
                              "src": "6997:39:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                "typeString": "function (address,uint256) external returns (bool)"
                              }
                            },
                            "id": 2878,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6997:70:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "id": 2869,
                          "name": "require",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            7923,
                            7924
                          ],
                          "referencedDeclaration": 7923,
                          "src": "6989:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                            "typeString": "function (bool) pure"
                          }
                        },
                        "id": 2879,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6989:79:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_tuple$__$",
                          "typeString": "tuple()"
                        }
                      },
                      "id": 2880,
                      "nodeType": "ExpressionStatement",
                      "src": "6989:79:9"
                    }
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2862,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2860,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2857,
                      "src": "6910:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2861,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2851,
                      "src": "6914:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "6910:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2882,
                  "initializationExpression": {
                    "assignments": [
                      2857
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2857,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2882,
                        "src": "6897:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2856,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "6897:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2859,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2858,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6907:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "6897:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2864,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "6928:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2863,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2857,
                        "src": "6928:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2865,
                    "nodeType": "ExpressionStatement",
                    "src": "6928:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "6892:176:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2888,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7920,
                              "src": "7164:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2889,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "7164:10:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2890,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2836,
                            "src": "7176:6:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2884,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2214,
                                "src": "7123:13:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$392",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2885,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 194,
                              "src": "7123:29:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                "typeString": "function () view external returns (contract ERC20)"
                              }
                            },
                            "id": 2886,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7123:31:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7778",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 2887,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7441,
                          "src": "7123:40:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2891,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7123:60:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2883,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "7115:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2892,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7115:69:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2893,
                  "nodeType": "ExpressionStatement",
                  "src": "7115:69:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2895,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "7221:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2896,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "7221:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2897,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "7233:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2898,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "7252:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2899,
                        "name": "cost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2791,
                        "src": "7271:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2894,
                      "name": "OutcomeTokenShortSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2197,
                      "src": "7199:21:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256)"
                      }
                    },
                    "id": 2900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7199:77:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2901,
                  "nodeType": "EmitStatement",
                  "src": "7194:82:9"
                }
              ]
            },
            "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": 2903,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "shortSell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2789,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2784,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6103:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2783,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6103:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2786,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6128:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2785,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6128:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2788,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6152:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2787,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6152:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6102:65:9"
            },
            "returnParameters": {
              "id": 2792,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2791,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6200:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2790,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6200:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6199:11:9"
            },
            "scope": 3199,
            "src": "6084:1199:9",
            "stateMutability": "nonpayable",
            "superFunction": 2278,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2955,
              "nodeType": "Block",
              "src": "8217:386:9",
              "statements": [
                {
                  "assignments": [
                    2918
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2918,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8227:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2917,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "8227:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2922,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2919,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "8248:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2920,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "8248:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8248:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8227:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 2927,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2924,
                            "name": "outcomeTokenAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2906,
                            "src": "8297:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "id": 2925,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "8297:26:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2926,
                          "name": "outcomeCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2918,
                          "src": "8327:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "8297:42:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2923,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "8289:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2928,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8289:51:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2929,
                  "nodeType": "ExpressionStatement",
                  "src": "8289:51:9"
                },
                {
                  "assignments": [
                    2931
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2931,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8351:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2930,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "8351:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2932,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8351:23:9"
                },
                {
                  "assignments": [
                    2934
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2934,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8384:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2933,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "8384:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2935,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8384:9:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2945,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "id": 2936,
                          "name": "netCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2915,
                          "src": "8404:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2937,
                          "name": "outcomeTokenNetCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2931,
                          "src": "8413:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2938,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2934,
                          "src": "8434:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 2939,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "8403:36:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "tuple(int256,int256,uint256)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2941,
                          "name": "outcomeCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2918,
                          "src": "8452:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2942,
                          "name": "outcomeTokenAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2906,
                          "src": "8466:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2943,
                          "name": "collateralLimit",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2908,
                          "src": "8487:15:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          },
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2940,
                        "name": "tradeImpl",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3184,
                        "src": "8442:9:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                          "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                        }
                      },
                      "id": 2944,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8442:61:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "tuple(int256,int256,uint256)"
                      }
                    },
                    "src": "8403:100:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2946,
                  "nodeType": "ExpressionStatement",
                  "src": "8403:100:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2948,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "8537:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2949,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8537:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2950,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2906,
                        "src": "8549:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2951,
                        "name": "outcomeTokenNetCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2931,
                        "src": "8570:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2952,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2934,
                        "src": "8591:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2947,
                      "name": "OutcomeTokenTrade",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2208,
                      "src": "8519:17:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,int256[] memory,int256,uint256)"
                      }
                    },
                    "id": 2953,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8519:77:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2954,
                  "nodeType": "EmitStatement",
                  "src": "8514:82:9"
                }
              ]
            },
            "documentation": "@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.",
            "id": 2956,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2911,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "8162:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2912,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "8162:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2913,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2910,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "8154:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "8154:28:9"
              }
            ],
            "name": "trade",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2909,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2906,
                  "name": "outcomeTokenAmounts",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8076:32:9",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                    "typeString": "int256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2904,
                      "name": "int",
                      "nodeType": "ElementaryTypeName",
                      "src": "8076:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "id": 2905,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "8076:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                      "typeString": "int256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2908,
                  "name": "collateralLimit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8110:19:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2907,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8110:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8075:55:9"
            },
            "returnParameters": {
              "id": 2916,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2915,
                  "name": "netCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8200:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2914,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8200:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8199:13:9"
            },
            "scope": 3199,
            "src": "8061:542:9",
            "stateMutability": "nonpayable",
            "superFunction": 2288,
            "visibility": "public"
          },
          {
            "body": {
              "id": 3183,
              "nodeType": "Block",
              "src": "8789:1924:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2978,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2972,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "8849:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2975,
                          "name": "this",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7982,
                          "src": "8895:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_StandardMarket_$3199",
                            "typeString": "contract StandardMarket"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2976,
                          "name": "outcomeTokenAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2961,
                          "src": "8901:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_StandardMarket_$3199",
                            "typeString": "contract StandardMarket"
                          },
                          {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2973,
                          "name": "marketMaker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2216,
                          "src": "8871:11:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_MarketMaker_$1606",
                            "typeString": "contract MarketMaker"
                          }
                        },
                        "id": 2974,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "calcNetCost",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1596,
                        "src": "8871:23:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2296_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$",
                          "typeString": "function (contract Market,int256[] memory) view external returns (int256)"
                        }
                      },
                      "id": 2977,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8871:50:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "8849:72:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2979,
                  "nodeType": "ExpressionStatement",
                  "src": "8849:72:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 2982,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2980,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "8934:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2981,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "8956:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "8934:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2998,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2992,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2970,
                        "src": "9046:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2995,
                                "name": "outcomeTokenNetCost",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2968,
                                "src": "9072:19:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 2994,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "9067:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": "uint"
                            },
                            "id": 2996,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9067:25:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2993,
                          "name": "calcMarketFee",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            3198
                          ],
                          "referencedDeclaration": 3198,
                          "src": "9053:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256) view returns (uint256)"
                          }
                        },
                        "id": 2997,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9053:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9046:47:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2999,
                    "nodeType": "ExpressionStatement",
                    "src": "9046:47:9"
                  },
                  "id": 3000,
                  "nodeType": "IfStatement",
                  "src": "8931:162:9",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2990,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2983,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2970,
                        "src": "8971:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2987,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "8997:20:9",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 2986,
                                  "name": "outcomeTokenNetCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2968,
                                  "src": "8998:19:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 2985,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "8992:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": "uint"
                            },
                            "id": 2988,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8992:26:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2984,
                          "name": "calcMarketFee",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            3198
                          ],
                          "referencedDeclaration": 3198,
                          "src": "8978:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256) view returns (uint256)"
                          }
                        },
                        "id": 2989,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8978:41:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "8971:48:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2991,
                    "nodeType": "ExpressionStatement",
                    "src": "8971:48:9"
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 3006,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 3003,
                              "name": "fees",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2970,
                              "src": "9116:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3002,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9112:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 3004,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9112:9:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 3005,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9125:1:9",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "9112:14:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 3001,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "9104:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 3007,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9104:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3008,
                  "nodeType": "ExpressionStatement",
                  "src": "9104:23:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 3016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 3009,
                      "name": "netCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2966,
                      "src": "9137:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 3013,
                              "name": "fees",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2970,
                              "src": "9175:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3012,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9171:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 3014,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9171:9:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 3010,
                          "name": "outcomeTokenNetCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2968,
                          "src": "9147:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3011,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 7247,
                        "src": "9147:23:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) pure returns (int256)"
                        }
                      },
                      "id": 3015,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9147:34:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "9137:44:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 3017,
                  "nodeType": "ExpressionStatement",
                  "src": "9137:44:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 3030,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3025,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3021,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 3019,
                                  "name": "collateralLimit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2963,
                                  "src": "9214:15:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "!=",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 3020,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9233:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9214:20:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3024,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 3022,
                                  "name": "netCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2966,
                                  "src": "9238:7:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "id": 3023,
                                  "name": "collateralLimit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2963,
                                  "src": "9249:15:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9238:26:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9214:50:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "id": 3026,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "9213:52:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3029,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 3027,
                            "name": "collateralLimit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2963,
                            "src": "9281:15:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3028,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9300:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "9281:20:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "9213:88:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 3018,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "9192:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 3031,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9192:119:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3032,
                  "nodeType": "ExpressionStatement",
                  "src": "9192:119:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 3035,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3033,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "9325:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3034,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9347:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "9325:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 3073,
                  "nodeType": "IfStatement",
                  "src": "9322:358:9",
                  "trueBody": {
                    "id": 3072,
                    "nodeType": "Block",
                    "src": "9350:330:9",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3061,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3041,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7920,
                                      "src": "9434:3:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 3042,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "9434:10:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3044,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7982,
                                        "src": "9454:4:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                          "typeString": "contract StandardMarket"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                          "typeString": "contract StandardMarket"
                                        }
                                      ],
                                      "id": 3043,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9446:7:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 3045,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9446:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3047,
                                        "name": "netCost",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2966,
                                        "src": "9466:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 3046,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9461:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": "uint"
                                    },
                                    "id": 3048,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9461:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 3037,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9389:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      },
                                      "id": 3038,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "collateralToken",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 194,
                                      "src": "9389:29:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                        "typeString": "function () view external returns (contract ERC20)"
                                      }
                                    },
                                    "id": 3039,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9389:31:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ERC20_$7778",
                                      "typeString": "contract ERC20"
                                    }
                                  },
                                  "id": 3040,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "transferFrom",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 7511,
                                  "src": "9389:44:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (address,address,uint256) external returns (bool)"
                                  }
                                },
                                "id": 3049,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9389:86:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3055,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9543:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      ],
                                      "id": 3054,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9535:7:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 3056,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9535:22:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3058,
                                        "name": "outcomeTokenNetCost",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2968,
                                        "src": "9564:19:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 3057,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9559:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": "uint"
                                    },
                                    "id": 3059,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9559:25:9",
                                    "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": 3050,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9495:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      },
                                      "id": 3051,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "collateralToken",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 194,
                                      "src": "9495:29:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                        "typeString": "function () view external returns (contract ERC20)"
                                      }
                                    },
                                    "id": 3052,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9495:31:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ERC20_$7778",
                                      "typeString": "contract ERC20"
                                    }
                                  },
                                  "id": 3053,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "approve",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 7476,
                                  "src": "9495:39:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (address,uint256) external returns (bool)"
                                  }
                                },
                                "id": 3060,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9495:90:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9389:196:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 3036,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              7923,
                              7924
                            ],
                            "referencedDeclaration": 7923,
                            "src": "9364:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                              "typeString": "function (bool) pure"
                            }
                          },
                          "id": 3062,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9364:235:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3063,
                        "nodeType": "ExpressionStatement",
                        "src": "9364:235:9"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3068,
                                  "name": "outcomeTokenNetCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2968,
                                  "src": "9648:19:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 3067,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "9643:4:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": "uint"
                              },
                              "id": 3069,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9643:25:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 3064,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "9614:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 3066,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "buyAllOutcomes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 251,
                            "src": "9614:28:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256) external"
                            }
                          },
                          "id": 3070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9614:55:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3071,
                        "nodeType": "ExpressionStatement",
                        "src": "9614:55:9"
                      }
                    ]
                  }
                },
                {
                  "body": {
                    "id": 3148,
                    "nodeType": "Block",
                    "src": "9731:503:9",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3088,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 3084,
                              "name": "outcomeTokenAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2961,
                              "src": "9748:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                "typeString": "int256[] memory"
                              }
                            },
                            "id": 3086,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 3085,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3075,
                              "src": "9768:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "9748:22:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3087,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9774:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "9748:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 3147,
                        "nodeType": "IfStatement",
                        "src": "9745:479:9",
                        "trueBody": {
                          "id": 3146,
                          "nodeType": "Block",
                          "src": "9777:447:9",
                          "statements": [
                            {
                              "condition": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3093,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 3089,
                                    "name": "outcomeTokenAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2961,
                                    "src": "9798:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                      "typeString": "int256[] memory"
                                    }
                                  },
                                  "id": 3091,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 3090,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3075,
                                    "src": "9818:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "9798:22:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 3092,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9823:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9798:26:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 3131,
                                "nodeType": "Block",
                                "src": "9983:131:9",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "arguments": [
                                            {
                                              "argumentTypes": null,
                                              "expression": {
                                                "argumentTypes": null,
                                                "id": 3121,
                                                "name": "msg",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 7920,
                                                "src": "10053:3:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_magic_message",
                                                  "typeString": "msg"
                                                }
                                              },
                                              "id": 3122,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sender",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": null,
                                              "src": "10053:10:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "baseExpression": {
                                                    "argumentTypes": null,
                                                    "id": 3124,
                                                    "name": "outcomeTokenAmounts",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 2961,
                                                    "src": "10070:19:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                                      "typeString": "int256[] memory"
                                                    }
                                                  },
                                                  "id": 3126,
                                                  "indexExpression": {
                                                    "argumentTypes": null,
                                                    "id": 3125,
                                                    "name": "i",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 3075,
                                                    "src": "10090:1:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint8",
                                                      "typeString": "uint8"
                                                    }
                                                  },
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "nodeType": "IndexAccess",
                                                  "src": "10070:22:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                ],
                                                "id": 3123,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "10065:4:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_uint256_$",
                                                  "typeString": "type(uint256)"
                                                },
                                                "typeName": "uint"
                                              },
                                              "id": 3127,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "10065:28:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3118,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3075,
                                                  "src": "10041:1:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": null,
                                                  "id": 3116,
                                                  "name": "eventContract",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2214,
                                                  "src": "10013:13:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_Event_$392",
                                                    "typeString": "contract Event"
                                                  }
                                                },
                                                "id": 3117,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "outcomeTokens",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 203,
                                                "src": "10013:27:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                                }
                                              },
                                              "id": 3119,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "10013:30:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                                "typeString": "contract OutcomeToken"
                                              }
                                            },
                                            "id": 3120,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "transfer",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 7441,
                                            "src": "10013:39:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                              "typeString": "function (address,uint256) external returns (bool)"
                                            }
                                          },
                                          "id": 3128,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "10013:81:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 3115,
                                        "name": "require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [
                                          7923,
                                          7924
                                        ],
                                        "referencedDeclaration": 7923,
                                        "src": "10005:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                          "typeString": "function (bool) pure"
                                        }
                                      },
                                      "id": 3129,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "10005:90:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 3130,
                                    "nodeType": "ExpressionStatement",
                                    "src": "10005:90:9"
                                  }
                                ]
                              },
                              "id": 3132,
                              "nodeType": "IfStatement",
                              "src": "9795:319:9",
                              "trueBody": {
                                "id": 3114,
                                "nodeType": "Block",
                                "src": "9826:151:9",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "arguments": [
                                            {
                                              "argumentTypes": null,
                                              "expression": {
                                                "argumentTypes": null,
                                                "id": 3100,
                                                "name": "msg",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 7920,
                                                "src": "9900:3:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_magic_message",
                                                  "typeString": "msg"
                                                }
                                              },
                                              "id": 3101,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sender",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": null,
                                              "src": "9900:10:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3103,
                                                  "name": "this",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 7982,
                                                  "src": "9920:4:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                                    "typeString": "contract StandardMarket"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                                    "typeString": "contract StandardMarket"
                                                  }
                                                ],
                                                "id": 3102,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "9912:7:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_address_$",
                                                  "typeString": "type(address)"
                                                },
                                                "typeName": "address"
                                              },
                                              "id": 3104,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9912:13:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3109,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "nodeType": "UnaryOperation",
                                                  "operator": "-",
                                                  "prefix": true,
                                                  "src": "9932:23:9",
                                                  "subExpression": {
                                                    "argumentTypes": null,
                                                    "baseExpression": {
                                                      "argumentTypes": null,
                                                      "id": 3106,
                                                      "name": "outcomeTokenAmounts",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 2961,
                                                      "src": "9933:19:9",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                                        "typeString": "int256[] memory"
                                                      }
                                                    },
                                                    "id": 3108,
                                                    "indexExpression": {
                                                      "argumentTypes": null,
                                                      "id": 3107,
                                                      "name": "i",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 3075,
                                                      "src": "9953:1:9",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint8",
                                                        "typeString": "uint8"
                                                      }
                                                    },
                                                    "isConstant": false,
                                                    "isLValue": true,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "nodeType": "IndexAccess",
                                                    "src": "9933:22:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_int256",
                                                      "typeString": "int256"
                                                    }
                                                  },
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                ],
                                                "id": 3105,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "9927:4:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_uint256_$",
                                                  "typeString": "type(uint256)"
                                                },
                                                "typeName": "uint"
                                              },
                                              "id": 3110,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9927:29:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              },
                                              {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3097,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3075,
                                                  "src": "9884:1:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": null,
                                                  "id": 3095,
                                                  "name": "eventContract",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2214,
                                                  "src": "9856:13:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_Event_$392",
                                                    "typeString": "contract Event"
                                                  }
                                                },
                                                "id": 3096,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "outcomeTokens",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 203,
                                                "src": "9856:27:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                                }
                                              },
                                              "id": 3098,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9856:30:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                                "typeString": "contract OutcomeToken"
                                              }
                                            },
                                            "id": 3099,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "transferFrom",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 7511,
                                            "src": "9856:43:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                              "typeString": "function (address,address,uint256) external returns (bool)"
                                            }
                                          },
                                          "id": 3111,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "9856:101:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 3094,
                                        "name": "require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [
                                          7923,
                                          7924
                                        ],
                                        "referencedDeclaration": 7923,
                                        "src": "9848:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                          "typeString": "function (bool) pure"
                                        }
                                      },
                                      "id": 3112,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9848:110:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 3113,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9848:110:9"
                                  }
                                ]
                              }
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 3144,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 3133,
                                    "name": "netOutcomeTokensSold",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2223,
                                    "src": "10132:20:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                                      "typeString": "int256[] storage ref"
                                    }
                                  },
                                  "id": 3135,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 3134,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3075,
                                    "src": "10153:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "10132:23:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "baseExpression": {
                                        "argumentTypes": null,
                                        "id": 3140,
                                        "name": "outcomeTokenAmounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2961,
                                        "src": "10186:19:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                          "typeString": "int256[] memory"
                                        }
                                      },
                                      "id": 3142,
                                      "indexExpression": {
                                        "argumentTypes": null,
                                        "id": 3141,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3075,
                                        "src": "10206:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "10186:22:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "baseExpression": {
                                        "argumentTypes": null,
                                        "id": 3136,
                                        "name": "netOutcomeTokensSold",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2223,
                                        "src": "10158:20:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                                          "typeString": "int256[] storage ref"
                                        }
                                      },
                                      "id": 3138,
                                      "indexExpression": {
                                        "argumentTypes": null,
                                        "id": 3137,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3075,
                                        "src": "10179:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "10158:23:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "id": 3139,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 7247,
                                    "src": "10158:27:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                                      "typeString": "function (int256,int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 3143,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10158:51:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "10132:77:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 3145,
                              "nodeType": "ExpressionStatement",
                              "src": "10132:77:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 3080,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3078,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3075,
                      "src": "9708:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3079,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2958,
                      "src": "9712:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "9708:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 3149,
                  "initializationExpression": {
                    "assignments": [
                      3075
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 3075,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 3149,
                        "src": "9695:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 3074,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "9695:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 3077,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3076,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9705:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "9695:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 3082,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "9726:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 3081,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3075,
                        "src": "9726:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 3083,
                    "nodeType": "ExpressionStatement",
                    "src": "9726:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "9690:544:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 3152,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3150,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "10247:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3151,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "10269:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "10247:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 3182,
                  "nodeType": "IfStatement",
                  "src": "10244:463:9",
                  "trueBody": {
                    "id": 3181,
                    "nodeType": "Block",
                    "src": "10272:435:9",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3158,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "-",
                                  "prefix": true,
                                  "src": "10535:20:9",
                                  "subExpression": {
                                    "argumentTypes": null,
                                    "id": 3157,
                                    "name": "outcomeTokenNetCost",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2968,
                                    "src": "10536:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 3156,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "10530:4:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": "uint"
                              },
                              "id": 3159,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10530:26:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 3153,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "10500:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 3155,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sellAllOutcomes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 293,
                            "src": "10500:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256) external"
                            }
                          },
                          "id": 3160,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10500:57:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3161,
                        "nodeType": "ExpressionStatement",
                        "src": "10500:57:9"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3164,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 3162,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "10574:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3163,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "10584:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "10574:11:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 3180,
                        "nodeType": "IfStatement",
                        "src": "10571:126:9",
                        "trueBody": {
                          "id": 3179,
                          "nodeType": "Block",
                          "src": "10587:110:9",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 3170,
                                          "name": "msg",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 7920,
                                          "src": "10654:3:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_magic_message",
                                            "typeString": "msg"
                                          }
                                        },
                                        "id": 3171,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sender",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": null,
                                        "src": "10654:10:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        }
                                      },
                                      {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "id": 3174,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "-",
                                            "prefix": true,
                                            "src": "10671:8:9",
                                            "subExpression": {
                                              "argumentTypes": null,
                                              "id": 3173,
                                              "name": "netCost",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 2966,
                                              "src": "10672:7:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "id": 3172,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "10666:4:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint256_$",
                                            "typeString": "type(uint256)"
                                          },
                                          "typeName": "uint"
                                        },
                                        "id": 3175,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10666:14:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": null,
                                        "arguments": [],
                                        "expression": {
                                          "argumentTypes": [],
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 3166,
                                            "name": "eventContract",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2214,
                                            "src": "10613:13:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_Event_$392",
                                              "typeString": "contract Event"
                                            }
                                          },
                                          "id": 3167,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "collateralToken",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 194,
                                          "src": "10613:29:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                            "typeString": "function () view external returns (contract ERC20)"
                                          }
                                        },
                                        "id": 3168,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10613:31:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_ERC20_$7778",
                                          "typeString": "contract ERC20"
                                        }
                                      },
                                      "id": 3169,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "transfer",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 7441,
                                      "src": "10613:40:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                        "typeString": "function (address,uint256) external returns (bool)"
                                      }
                                    },
                                    "id": 3176,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10613:68:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 3165,
                                  "name": "require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    7923,
                                    7924
                                  ],
                                  "referencedDeclaration": 7923,
                                  "src": "10605:7:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                    "typeString": "function (bool) pure"
                                  }
                                },
                                "id": 3177,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10605:77:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 3178,
                              "nodeType": "ExpressionStatement",
                              "src": "10605:77:9"
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": null,
            "id": 3184,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "tradeImpl",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2964,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2958,
                  "name": "outcomeCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8628:18:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2957,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "8628:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2961,
                  "name": "outcomeTokenAmounts",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8648:32:9",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                    "typeString": "int256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2959,
                      "name": "int",
                      "nodeType": "ElementaryTypeName",
                      "src": "8648:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "id": 2960,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "8648:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                      "typeString": "int256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2963,
                  "name": "collateralLimit",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8682:19:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2962,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8682:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8627:75:9"
            },
            "returnParameters": {
              "id": 2971,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2966,
                  "name": "netCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8736:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2965,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8736:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2968,
                  "name": "outcomeTokenNetCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8749:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2967,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8749:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2970,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8774:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2969,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8774:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8735:49:9"
            },
            "scope": 3199,
            "src": "8609:2104:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 3197,
              "nodeType": "Block",
              "src": "10968:58:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 3195,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 3193,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 3191,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3186,
                        "src": "10985:16:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "*",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 3192,
                        "name": "fee",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2218,
                        "src": "11004:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint24",
                          "typeString": "uint24"
                        }
                      },
                      "src": "10985:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3194,
                      "name": "FEE_RANGE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2306,
                      "src": "11010:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "10985:34:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 3190,
                  "id": 3196,
                  "nodeType": "Return",
                  "src": "10978:41:9"
                }
              ]
            },
            "documentation": "@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade",
            "id": 3198,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "calcMarketFee",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 3187,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3186,
                  "name": "outcomeTokenCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3198,
                  "src": "10890:21:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3185,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10890:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10889:23:9"
            },
            "returnParameters": {
              "id": 3190,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3189,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3198,
                  "src": "10958:4:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3188,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10958:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10957:6:9"
            },
            "scope": 3199,
            "src": "10867:159:9",
            "stateMutability": "view",
            "superFunction": 2295,
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "1162:9866:9"
      }
    ],
    "src": "0:11029:9"
  },
  "legacyAST": {
    "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/StandardMarket.sol",
    "exportedSymbols": {
      "StandardMarket": [
        3199
      ],
      "StandardMarketData": [
        2307
      ],
      "StandardMarketProxy": [
        2389
      ]
    },
    "id": 3200,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2298,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:9"
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Markets/Market.sol",
        "file": "../Markets/Market.sol",
        "id": 2299,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 2297,
        "src": "24:31:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 2300,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 7779,
        "src": "56:63:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol",
        "file": "openzeppelin-solidity/contracts/drafts/SignedSafeMath.sol",
        "id": 2301,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 7249,
        "src": "120:67:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol",
        "file": "../Events/Event.sol",
        "id": 2302,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 393,
        "src": "188:29:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/MarketMakers/MarketMaker.sol",
        "file": "../MarketMakers/MarketMaker.sol",
        "id": 2303,
        "nodeType": "ImportDirective",
        "scope": 3200,
        "sourceUnit": 1607,
        "src": "218:41:9",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2307,
        "linearizedBaseContracts": [
          2307
        ],
        "name": "StandardMarketData",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 2306,
            "name": "FEE_RANGE",
            "nodeType": "VariableDeclaration",
            "scope": 2307,
            "src": "329:42:9",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint24",
              "typeString": "uint24"
            },
            "typeName": {
              "id": 2304,
              "name": "uint24",
              "nodeType": "ElementaryTypeName",
              "src": "329:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_uint24",
                "typeString": "uint24"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "31303030303030",
              "id": 2305,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "364:7:9",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_rational_1000000_by_1",
                "typeString": "int_const 1000000"
              },
              "value": "1000000"
            },
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "262:120:9"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2308,
              "name": "Proxy",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6828,
              "src": "416:5:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Proxy_$6828",
                "typeString": "contract Proxy"
              }
            },
            "id": 2309,
            "nodeType": "InheritanceSpecifier",
            "src": "416:5:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2310,
              "name": "MarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2230,
              "src": "423:10:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_MarketData_$2230",
                "typeString": "contract MarketData"
              }
            },
            "id": 2311,
            "nodeType": "InheritanceSpecifier",
            "src": "423:10:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2312,
              "name": "StandardMarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2307,
              "src": "435:18:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StandardMarketData_$2307",
                "typeString": "contract StandardMarketData"
              }
            },
            "id": 2313,
            "nodeType": "InheritanceSpecifier",
            "src": "435:18:9"
          }
        ],
        "contractDependencies": [
          2230,
          2307,
          6798,
          6828
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2389,
        "linearizedBaseContracts": [
          2389,
          2307,
          2230,
          6828,
          6798
        ],
        "name": "StandardMarketProxy",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 2387,
              "nodeType": "Block",
              "src": "606:425:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2348,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "id": 2344,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2336,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2331,
                                  "name": "_eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2319,
                                  "src": "659:14:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2330,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "651:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2332,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "651:23:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 2334,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "686:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 2333,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "678:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2335,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "678:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "src": "651:37:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "&&",
                          "rightExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "id": 2343,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2338,
                                  "name": "_marketMaker",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2321,
                                  "src": "700:12:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                                    "typeString": "contract MarketMaker"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                                    "typeString": "contract MarketMaker"
                                  }
                                ],
                                "id": 2337,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "692:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2339,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "692:21:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "!=",
                            "rightExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 2341,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "725:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  }
                                ],
                                "id": 2340,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "717:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2342,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "717:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "src": "692:35:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          },
                          "src": "651:76:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint24",
                            "typeString": "uint24"
                          },
                          "id": 2347,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2345,
                            "name": "_fee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2323,
                            "src": "731:4:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2346,
                            "name": "FEE_RANGE",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2306,
                            "src": "738:9:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint24",
                              "typeString": "uint24"
                            }
                          },
                          "src": "731:16:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "651:96:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2329,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "643:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2349,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "643:105:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2350,
                  "nodeType": "ExpressionStatement",
                  "src": "643:105:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2353,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2351,
                      "name": "creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2210,
                      "src": "758:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2352,
                      "name": "_creator",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2317,
                      "src": "768:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "758:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2354,
                  "nodeType": "ExpressionStatement",
                  "src": "758:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2358,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2355,
                      "name": "createdAtBlock",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2212,
                      "src": "786:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2356,
                        "name": "block",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7910,
                        "src": "803:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_block",
                          "typeString": "block"
                        }
                      },
                      "id": 2357,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "number",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "803:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "786:29:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2359,
                  "nodeType": "ExpressionStatement",
                  "src": "786:29:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2362,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2360,
                      "name": "eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2214,
                      "src": "825:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$392",
                        "typeString": "contract Event"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2361,
                      "name": "_eventContract",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2319,
                      "src": "841:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_Event_$392",
                        "typeString": "contract Event"
                      }
                    },
                    "src": "825:30:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$392",
                      "typeString": "contract Event"
                    }
                  },
                  "id": 2363,
                  "nodeType": "ExpressionStatement",
                  "src": "825:30:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2372,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2364,
                      "name": "netOutcomeTokensSold",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2223,
                      "src": "865:20:9",
                      "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": 2368,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "898:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2369,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "getOutcomeCount",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 331,
                            "src": "898:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                              "typeString": "function () view external returns (uint8)"
                            }
                          },
                          "id": 2370,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "898:31:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2367,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "NewExpression",
                        "src": "888:9:9",
                        "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": 2365,
                            "name": "int",
                            "nodeType": "ElementaryTypeName",
                            "src": "892:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "id": 2366,
                          "length": null,
                          "nodeType": "ArrayTypeName",
                          "src": "892:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                            "typeString": "int256[]"
                          }
                        }
                      },
                      "id": 2371,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "888:42:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                        "typeString": "int256[] memory"
                      }
                    },
                    "src": "865:65:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                      "typeString": "int256[] storage ref"
                    }
                  },
                  "id": 2373,
                  "nodeType": "ExpressionStatement",
                  "src": "865:65:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2376,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2374,
                      "name": "fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2218,
                      "src": "940:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2375,
                      "name": "_fee",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2323,
                      "src": "946:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "940:10:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "id": 2377,
                  "nodeType": "ExpressionStatement",
                  "src": "940:10:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2380,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2378,
                      "name": "marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2216,
                      "src": "960:11:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$1606",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2379,
                      "name": "_marketMaker",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2321,
                      "src": "974:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_MarketMaker_$1606",
                        "typeString": "contract MarketMaker"
                      }
                    },
                    "src": "960:26:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$1606",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "id": 2381,
                  "nodeType": "ExpressionStatement",
                  "src": "960:26:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2385,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2382,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "996:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2383,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "1004:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2384,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketCreated",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1004:20:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "996:28:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2386,
                  "nodeType": "ExpressionStatement",
                  "src": "996:28:9"
                }
              ]
            },
            "documentation": null,
            "id": 2388,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 2326,
                    "name": "proxy",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2315,
                    "src": "580:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 2327,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2325,
                  "name": "Proxy",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 6828,
                  "src": "574:5:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_Proxy_$6828_$",
                    "typeString": "type(contract Proxy)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "574:12:9"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2324,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2315,
                  "name": "proxy",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "472:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2314,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "472:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2317,
                  "name": "_creator",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "487:16:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2316,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "487:7:9",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2319,
                  "name": "_eventContract",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "505:20:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_Event_$392",
                    "typeString": "contract Event"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2318,
                    "name": "Event",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 392,
                    "src": "505:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_Event_$392",
                      "typeString": "contract Event"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2321,
                  "name": "_marketMaker",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "527:24:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_MarketMaker_$1606",
                    "typeString": "contract MarketMaker"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2320,
                    "name": "MarketMaker",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1606,
                    "src": "527:11:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_MarketMaker_$1606",
                      "typeString": "contract MarketMaker"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2323,
                  "name": "_fee",
                  "nodeType": "VariableDeclaration",
                  "scope": 2388,
                  "src": "553:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 2322,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "553:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "471:94:9"
            },
            "returnParameters": {
              "id": 2328,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "606:0:9"
            },
            "scope": 2389,
            "src": "460:571:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "384:649:9"
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2390,
              "name": "Proxied",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 6798,
              "src": "1189:7:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Proxied_$6798",
                "typeString": "contract Proxied"
              }
            },
            "id": 2391,
            "nodeType": "InheritanceSpecifier",
            "src": "1189:7:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2392,
              "name": "Market",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2296,
              "src": "1198:6:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Market_$2296",
                "typeString": "contract Market"
              }
            },
            "id": 2393,
            "nodeType": "InheritanceSpecifier",
            "src": "1198:6:9"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2394,
              "name": "StandardMarketData",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2307,
              "src": "1206:18:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StandardMarketData_$2307",
                "typeString": "contract StandardMarketData"
              }
            },
            "id": 2395,
            "nodeType": "InheritanceSpecifier",
            "src": "1206:18:9"
          }
        ],
        "contractDependencies": [
          2230,
          2296,
          2307,
          6798
        ],
        "contractKind": "contract",
        "documentation": "@title Standard market contract - Backed implementation of standard markets\n @author Stefan George - <stefan@gnosis.pm>",
        "fullyImplemented": true,
        "id": 3199,
        "linearizedBaseContracts": [
          3199,
          2307,
          2296,
          2230,
          6798
        ],
        "name": "StandardMarket",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 2398,
            "libraryName": {
              "contractScope": null,
              "id": 2396,
              "name": "SignedSafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 7248,
              "src": "1237:14:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SignedSafeMath_$7248",
                "typeString": "library SignedSafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1231:29:9",
            "typeName": {
              "id": 2397,
              "name": "int",
              "nodeType": "ElementaryTypeName",
              "src": "1256:3:9",
              "typeDescriptions": {
                "typeIdentifier": "t_int256",
                "typeString": "int256"
              }
            }
          },
          {
            "id": 2401,
            "libraryName": {
              "contractScope": null,
              "id": 2399,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 7381,
              "src": "1271:8:9",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$7381",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1265:24:9",
            "typeName": {
              "id": 2400,
              "name": "uint",
              "nodeType": "ElementaryTypeName",
              "src": "1284:4:9",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "body": {
              "id": 2411,
              "nodeType": "Block",
              "src": "1349:104:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 2407,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2404,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7920,
                            "src": "1413:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 2405,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1413:10:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2406,
                          "name": "creator",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2210,
                          "src": "1427:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "1413:21:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2403,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1405:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2408,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1405:30:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2409,
                  "nodeType": "ExpressionStatement",
                  "src": "1405:30:9"
                },
                {
                  "id": 2410,
                  "nodeType": "PlaceholderStatement",
                  "src": "1445:1:9"
                }
              ]
            },
            "documentation": null,
            "id": 2412,
            "name": "isCreator",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2402,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1346:2:9"
            },
            "src": "1328:125:9",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2423,
              "nodeType": "Block",
              "src": "1491:97:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_enum$_Stages_$2229",
                          "typeString": "enum MarketData.Stages"
                        },
                        "id": 2419,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2417,
                          "name": "stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2225,
                          "src": "1554:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2229",
                            "typeString": "enum MarketData.Stages"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2418,
                          "name": "_stage",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2414,
                          "src": "1563:6:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_Stages_$2229",
                            "typeString": "enum MarketData.Stages"
                          }
                        },
                        "src": "1554:15:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2416,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1546:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2420,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1546:24:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2421,
                  "nodeType": "ExpressionStatement",
                  "src": "1546:24:9"
                },
                {
                  "id": 2422,
                  "nodeType": "PlaceholderStatement",
                  "src": "1580:1:9"
                }
              ]
            },
            "documentation": null,
            "id": 2424,
            "name": "atStage",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 2415,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2414,
                  "name": "_stage",
                  "nodeType": "VariableDeclaration",
                  "scope": 2424,
                  "src": "1476:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_Stages_$2229",
                    "typeString": "enum MarketData.Stages"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2413,
                    "name": "Stages",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 2229,
                    "src": "1476:6:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1475:15:9"
            },
            "src": "1459:129:9",
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2478,
              "nodeType": "Block",
              "src": "1875:452:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2456,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2440,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7920,
                                "src": "2040:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2441,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "2040:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2443,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7982,
                                  "src": "2060:4:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "id": 2442,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2052:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2444,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2052:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2445,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2426,
                              "src": "2067:8:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2436,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "1995:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2437,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "1995:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2438,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1995:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2439,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7511,
                            "src": "1995:44:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2446,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1995:81:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2452,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2144:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2451,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2136:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2453,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2136:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2454,
                              "name": "_funding",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2426,
                              "src": "2160:8:9",
                              "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": 2447,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2096:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2448,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "2096:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2449,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2096:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2450,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7476,
                            "src": "2096:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2455,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2096:73:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "1995:174:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2435,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "1984:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2457,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1984:186:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2458,
                  "nodeType": "ExpressionStatement",
                  "src": "1984:186:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2462,
                        "name": "_funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2426,
                        "src": "2209:8:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2459,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "2180:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2461,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 251,
                      "src": "2180:28:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2463,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2180:38:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2464,
                  "nodeType": "ExpressionStatement",
                  "src": "2180:38:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2467,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2465,
                      "name": "funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2220,
                      "src": "2228:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2466,
                      "name": "_funding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2426,
                      "src": "2238:8:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2228:18:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2468,
                  "nodeType": "ExpressionStatement",
                  "src": "2228:18:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2472,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2469,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "2256:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2470,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "2264:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2471,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketFunded",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2264:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "2256:27:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2473,
                  "nodeType": "ExpressionStatement",
                  "src": "2256:27:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2475,
                        "name": "funding",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2220,
                        "src": "2312:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2474,
                      "name": "MarketFunding",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2157,
                      "src": "2298:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2476,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2298:22:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2477,
                  "nodeType": "EmitStatement",
                  "src": "2293:27:9"
                }
              ]
            },
            "documentation": "@dev Allows to fund the market with collateral tokens converting them into outcome tokens\n @param _funding Funding amount",
            "id": 2479,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2429,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2428,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "1823:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1823:9:9"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2431,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "1849:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2432,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketCreated",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "1849:20:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2433,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2430,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "1841:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1841:29:9"
              }
            ],
            "name": "fund",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2427,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2426,
                  "name": "_funding",
                  "nodeType": "VariableDeclaration",
                  "scope": 2479,
                  "src": "1785:13:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2425,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1785:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1784:15:9"
            },
            "returnParameters": {
              "id": 2434,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1875:0:9"
            },
            "scope": 3199,
            "src": "1771:556:9",
            "stateMutability": "nonpayable",
            "superFunction": 2237,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2532,
              "nodeType": "Block",
              "src": "2540:313:9",
              "statements": [
                {
                  "assignments": [
                    2489
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2489,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2532,
                      "src": "2550:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2488,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "2550:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2493,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2490,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "2571:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2491,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "2571:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2492,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2571:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2550:52:9"
                },
                {
                  "body": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2510,
                              "name": "creator",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2210,
                              "src": "2713:7:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2517,
                                      "name": "this",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7982,
                                      "src": "2771:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                        "typeString": "contract StandardMarket"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                        "typeString": "contract StandardMarket"
                                      }
                                    ],
                                    "id": 2516,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2763:7:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_address_$",
                                      "typeString": "type(address)"
                                    },
                                    "typeName": "address"
                                  },
                                  "id": 2518,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2763:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 2513,
                                      "name": "i",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2495,
                                      "src": "2750:1:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint8",
                                        "typeString": "uint8"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2511,
                                      "name": "eventContract",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2214,
                                      "src": "2722:13:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_contract$_Event_$392",
                                        "typeString": "contract Event"
                                      }
                                    },
                                    "id": 2512,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "outcomeTokens",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 203,
                                    "src": "2722:27:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                      "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                    }
                                  },
                                  "id": 2514,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2722:30:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                    "typeString": "contract OutcomeToken"
                                  }
                                },
                                "id": 2515,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "balanceOf",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 7422,
                                "src": "2722:40:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                  "typeString": "function (address) view external returns (uint256)"
                                }
                              },
                              "id": 2519,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2722:55:9",
                              "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": 2507,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2495,
                                  "src": "2701:1:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint8",
                                    "typeString": "uint8"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2505,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "2673:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2506,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "outcomeTokens",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 203,
                                "src": "2673:27:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                }
                              },
                              "id": 2508,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2673:30:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                "typeString": "contract OutcomeToken"
                              }
                            },
                            "id": 2509,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7441,
                            "src": "2673:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2520,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2673:105:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        ],
                        "id": 2504,
                        "name": "require",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          7923,
                          7924
                        ],
                        "referencedDeclaration": 7923,
                        "src": "2665:7:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                          "typeString": "function (bool) pure"
                        }
                      },
                      "id": 2521,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2665:114:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2522,
                    "nodeType": "ExpressionStatement",
                    "src": "2665:114:9"
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2500,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2498,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2495,
                      "src": "2630:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2499,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2489,
                      "src": "2634:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "2630:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2523,
                  "initializationExpression": {
                    "assignments": [
                      2495
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2495,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2523,
                        "src": "2617:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2494,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "2617:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2497,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2496,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "2627:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2617:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2502,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "2648:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2501,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2495,
                        "src": "2648:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2503,
                    "nodeType": "ExpressionStatement",
                    "src": "2648:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "2612:167:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2527,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2524,
                      "name": "stage",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2225,
                      "src": "2789:5:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2525,
                        "name": "Stages",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2229,
                        "src": "2797:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                          "typeString": "type(enum MarketData.Stages)"
                        }
                      },
                      "id": 2526,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "MarketClosed",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2797:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_Stages_$2229",
                        "typeString": "enum MarketData.Stages"
                      }
                    },
                    "src": "2789:27:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  },
                  "id": 2528,
                  "nodeType": "ExpressionStatement",
                  "src": "2789:27:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 2529,
                      "name": "MarketClosing",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2159,
                      "src": "2831:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 2530,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2831:15:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2531,
                  "nodeType": "EmitStatement",
                  "src": "2826:20:9"
                }
              ]
            },
            "documentation": "@dev Allows market creator to close the markets by transferring all remaining outcome tokens to the creator",
            "id": 2533,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2482,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2481,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "2489:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2489:9:9"
              },
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2484,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "2515:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2485,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2515:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2486,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2483,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "2507:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2507:28:9"
              }
            ],
            "name": "close",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2480,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2463:2:9"
            },
            "returnParameters": {
              "id": 2487,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2540:0:9"
            },
            "scope": 3199,
            "src": "2449:404:9",
            "stateMutability": "nonpayable",
            "superFunction": 2240,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2565,
              "nodeType": "Block",
              "src": "3047:213:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2549,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2540,
                      "name": "fees",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2538,
                      "src": "3057:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2546,
                              "name": "this",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7982,
                              "src": "3114:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                "typeString": "contract StandardMarket"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                "typeString": "contract StandardMarket"
                              }
                            ],
                            "id": 2545,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "3106:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 2547,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3106:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "expression": {
                              "argumentTypes": null,
                              "id": 2541,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "3064:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 2542,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "collateralToken",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 194,
                            "src": "3064:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                              "typeString": "function () view external returns (contract ERC20)"
                            }
                          },
                          "id": 2543,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3064:31:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ERC20_$7778",
                            "typeString": "contract ERC20"
                          }
                        },
                        "id": 2544,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "balanceOf",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 7422,
                        "src": "3064:41:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                          "typeString": "function (address) view external returns (uint256)"
                        }
                      },
                      "id": 2548,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3064:56:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3057:63:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2550,
                  "nodeType": "ExpressionStatement",
                  "src": "3057:63:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2556,
                            "name": "creator",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2210,
                            "src": "3204:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2557,
                            "name": "fees",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2538,
                            "src": "3213:4:9",
                            "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": 2552,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2214,
                                "src": "3163:13:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$392",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2553,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 194,
                              "src": "3163:29:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                "typeString": "function () view external returns (contract ERC20)"
                              }
                            },
                            "id": 2554,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3163:31:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7778",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 2555,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7441,
                          "src": "3163:40:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2558,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3163:55:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2551,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3155:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2559,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3155:64:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2560,
                  "nodeType": "ExpressionStatement",
                  "src": "3155:64:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2562,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2538,
                        "src": "3248:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2561,
                      "name": "FeeWithdrawal",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2163,
                      "src": "3234:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256)"
                      }
                    },
                    "id": 2563,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3234:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2564,
                  "nodeType": "EmitStatement",
                  "src": "3229:24:9"
                }
              ]
            },
            "documentation": "@dev Allows market creator to withdraw fees generated by trades\n @return Fee amount",
            "id": 2566,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2536,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2535,
                  "name": "isCreator",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2412,
                  "src": "3005:9:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3005:9:9"
              }
            ],
            "name": "withdrawFees",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2534,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2979:2:9"
            },
            "returnParameters": {
              "id": 2539,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2538,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 2566,
                  "src": "3032:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2537,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3032:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3031:11:9"
            },
            "scope": 3199,
            "src": "2958:302:9",
            "stateMutability": "nonpayable",
            "superFunction": 2245,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2670,
              "nodeType": "Block",
              "src": "3747:680:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2592,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2586,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2583,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2570,
                                "src": "3769:17:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 2582,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3765:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": "int"
                            },
                            "id": 2584,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3765:22:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2585,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3791:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3765:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2591,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2588,
                                "name": "maxCost",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2572,
                                "src": "3800:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 2587,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "3796:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_int256_$",
                                "typeString": "type(int256)"
                              },
                              "typeName": "int"
                            },
                            "id": 2589,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3796:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2590,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3811:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3796:16:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3765:47:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2581,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3757:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3757:56:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2594,
                  "nodeType": "ExpressionStatement",
                  "src": "3757:56:9"
                },
                {
                  "assignments": [
                    2596
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2596,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "3823:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2595,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "3823:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2600,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2597,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "3844:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2598,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "3844:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2599,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3844:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3823:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2608,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2604,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2602,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2568,
                            "src": "3893:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2603,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3914:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "3893:22:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2607,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2605,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2568,
                            "src": "3919:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2606,
                            "name": "outcomeCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2596,
                            "src": "3939:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "3919:32:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "3893:58:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2601,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "3885:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2609,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3885:67:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2610,
                  "nodeType": "ExpressionStatement",
                  "src": "3885:67:9"
                },
                {
                  "assignments": [
                    2614
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2614,
                      "name": "outcomeTokenAmounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "3962:32:9",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                        "typeString": "int256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2612,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "3962:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2613,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "3962:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2620,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2618,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2596,
                        "src": "4007:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2617,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "3997:9:9",
                      "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": 2615,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "4001:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2616,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "4001:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      }
                    },
                    "id": 2619,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3997:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                      "typeString": "int256[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3962:58:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2627,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2621,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4030:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      "id": 2623,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2622,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2568,
                        "src": "4050:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "4030:38:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2625,
                          "name": "outcomeTokenCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2570,
                          "src": "4075:17:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "id": 2624,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4071:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_int256_$",
                          "typeString": "type(int256)"
                        },
                        "typeName": "int"
                      },
                      "id": 2626,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4071:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "4030:63:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2628,
                  "nodeType": "ExpressionStatement",
                  "src": "4030:63:9"
                },
                {
                  "assignments": [
                    2630,
                    2632,
                    2634
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2630,
                      "name": "netCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4104:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2629,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "4104:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2632,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4117:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2631,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "4117:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2634,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2670,
                      "src": "4142:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2633,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "4142:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2642,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2636,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2596,
                        "src": "4165:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2637,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2614,
                        "src": "4179:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2639,
                            "name": "maxCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2572,
                            "src": "4204:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2638,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4200:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_int256_$",
                            "typeString": "type(int256)"
                          },
                          "typeName": "int"
                        },
                        "id": 2640,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4200:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 2635,
                      "name": "tradeImpl",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3184,
                      "src": "4155:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                      }
                    },
                    "id": 2641,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4155:58:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                      "typeString": "tuple(int256,int256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "4103:110:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2650,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2646,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2644,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2630,
                            "src": "4231:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2645,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4242:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4231:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2649,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2647,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2632,
                            "src": "4247:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2648,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4270:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4247:24:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4231:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2643,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "4223:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2651,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4223:49:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2652,
                  "nodeType": "ExpressionStatement",
                  "src": "4223:49:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2657,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2653,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2579,
                      "src": "4282:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2655,
                          "name": "netCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2630,
                          "src": "4294:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2654,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4289:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint256_$",
                          "typeString": "type(uint256)"
                        },
                        "typeName": "uint"
                      },
                      "id": 2656,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4289:13:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4282:20:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2658,
                  "nodeType": "ExpressionStatement",
                  "src": "4282:20:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2660,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "4338:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2661,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4338:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2662,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2568,
                        "src": "4350:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2663,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2570,
                        "src": "4369:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2665,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2632,
                            "src": "4393:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          ],
                          "id": 2664,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4388:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_uint256_$",
                            "typeString": "type(uint256)"
                          },
                          "typeName": "uint"
                        },
                        "id": 2666,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4388:25:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2667,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2634,
                        "src": "4415:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2659,
                      "name": "OutcomeTokenPurchase",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2175,
                      "src": "4317:20:9",
                      "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": 2668,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4317:103:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2669,
                  "nodeType": "EmitStatement",
                  "src": "4312:108:9"
                }
              ]
            },
            "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": 2671,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2575,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "3694:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "3694:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2577,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2574,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "3686:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3686:28:9"
              }
            ],
            "name": "buy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2573,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2568,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3600:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2567,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "3600:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2570,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3625:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2569,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3625:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2572,
                  "name": "maxCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3649:12:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2571,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3649:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3599:63:9"
            },
            "returnParameters": {
              "id": 2580,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2579,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2671,
                  "src": "3732:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2578,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3732:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3731:11:9"
            },
            "scope": 3199,
            "src": "3587:840:9",
            "stateMutability": "nonpayable",
            "superFunction": 2256,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2781,
              "nodeType": "Block",
              "src": "4927:688:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2699,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2692,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2690,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "4945:23:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2688,
                                  "name": "outcomeTokenCount",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2675,
                                  "src": "4950:17:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 2687,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4946:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_int256_$",
                                  "typeString": "type(int256)"
                                },
                                "typeName": "int"
                              },
                              "id": 2689,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4946:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2691,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4972:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4945:28:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2696,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "4977:15:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2694,
                                  "name": "minProfit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2677,
                                  "src": "4982:9:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 2693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4978:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_int256_$",
                                  "typeString": "type(int256)"
                                },
                                "typeName": "int"
                              },
                              "id": 2695,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4978:14:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2697,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4995:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "4977:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4945:51:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2686,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "4937:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2700,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4937:60:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2701,
                  "nodeType": "ExpressionStatement",
                  "src": "4937:60:9"
                },
                {
                  "assignments": [
                    2703
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2703,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5007:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2702,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "5007:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2707,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2704,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "5028:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2705,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "5028:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2706,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5028:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5007:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2715,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2711,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2709,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2673,
                            "src": "5077:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2710,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5098:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5077:22:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          "id": 2714,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2712,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2673,
                            "src": "5103:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2713,
                            "name": "outcomeCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2703,
                            "src": "5123:12:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          },
                          "src": "5103:32:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5077:58:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2708,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "5069:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2716,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5069:67:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2717,
                  "nodeType": "ExpressionStatement",
                  "src": "5069:67:9"
                },
                {
                  "assignments": [
                    2721
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2721,
                      "name": "outcomeTokenAmounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5146:32:9",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                        "typeString": "int256[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2719,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "5146:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2720,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "5146:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2727,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2725,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2703,
                        "src": "5191:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2724,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "5181:9:9",
                      "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": 2722,
                          "name": "int",
                          "nodeType": "ElementaryTypeName",
                          "src": "5185:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 2723,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "5185:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                          "typeString": "int256[]"
                        }
                      }
                    },
                    "id": 2726,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5181:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_memory",
                      "typeString": "int256[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5146:58:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2735,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2728,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2721,
                        "src": "5214:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      "id": 2730,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2729,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2673,
                        "src": "5234:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5214:38:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2734,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "-",
                      "prefix": true,
                      "src": "5255:23:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2732,
                            "name": "outcomeTokenCount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2675,
                            "src": "5260:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2731,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5256:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_int256_$",
                            "typeString": "type(int256)"
                          },
                          "typeName": "int"
                        },
                        "id": 2733,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5256:22:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "5214:64:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2736,
                  "nodeType": "ExpressionStatement",
                  "src": "5214:64:9"
                },
                {
                  "assignments": [
                    2738,
                    2740,
                    2742
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2738,
                      "name": "netCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5289:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2737,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "5289:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2740,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5302:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2739,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "5302:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2742,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2781,
                      "src": "5327:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2741,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "5327:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2751,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2744,
                        "name": "outcomeCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2703,
                        "src": "5350:12:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2745,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2721,
                        "src": "5364:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2749,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "-",
                        "prefix": true,
                        "src": "5385:15:9",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2747,
                              "name": "minProfit",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2677,
                              "src": "5390:9:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2746,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "5386:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 2748,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5386:14:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 2743,
                      "name": "tradeImpl",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3184,
                      "src": "5340:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                      }
                    },
                    "id": 2750,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5340:61:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                      "typeString": "tuple(int256,int256,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5288:113:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2759,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2755,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2753,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2738,
                            "src": "5419:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2754,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5430:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5419:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 2758,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 2756,
                            "name": "outcomeTokenNetCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2740,
                            "src": "5435:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 2757,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5458:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5435:24:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5419:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2752,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "5411:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2760,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5411:49:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2761,
                  "nodeType": "ExpressionStatement",
                  "src": "5411:49:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2767,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2762,
                      "name": "profit",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2684,
                      "src": "5470:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2765,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "UnaryOperation",
                          "operator": "-",
                          "prefix": true,
                          "src": "5484:8:9",
                          "subExpression": {
                            "argumentTypes": null,
                            "id": 2764,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2738,
                            "src": "5485:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2763,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "5479:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_uint256_$",
                          "typeString": "type(uint256)"
                        },
                        "typeName": "uint"
                      },
                      "id": 2766,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5479:14:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5470:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2768,
                  "nodeType": "ExpressionStatement",
                  "src": "5470:23:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2770,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "5525:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2771,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5525:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2772,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2673,
                        "src": "5537:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2773,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2675,
                        "src": "5556:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2776,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "5580:20:9",
                            "subExpression": {
                              "argumentTypes": null,
                              "id": 2775,
                              "name": "outcomeTokenNetCost",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2740,
                              "src": "5581:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          ],
                          "id": 2774,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5575:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_uint256_$",
                            "typeString": "type(uint256)"
                          },
                          "typeName": "uint"
                        },
                        "id": 2777,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5575:26:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2778,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2742,
                        "src": "5603:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2769,
                      "name": "OutcomeTokenSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2187,
                      "src": "5508:16:9",
                      "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": 2779,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5508:100:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2780,
                  "nodeType": "EmitStatement",
                  "src": "5503:105:9"
                }
              ]
            },
            "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": 2782,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2680,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "4872:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2681,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "4872:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2682,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2679,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "4864:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4864:28:9"
              }
            ],
            "name": "sell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2678,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2673,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4776:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2672,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4776:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2675,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4801:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2674,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4801:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2677,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4825:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2676,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4825:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4775:65:9"
            },
            "returnParameters": {
              "id": 2685,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2684,
                  "name": "profit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2782,
                  "src": "4910:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2683,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4910:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4909:13:9"
            },
            "scope": 3199,
            "src": "4762:853:9",
            "stateMutability": "nonpayable",
            "superFunction": 2267,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2902,
              "nodeType": "Block",
              "src": "6215:1068:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 2814,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 2798,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 7920,
                                "src": "6309:3:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 2799,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "6309:10:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2801,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7982,
                                  "src": "6329:4:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                    "typeString": "contract StandardMarket"
                                  }
                                ],
                                "id": 2800,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "6321:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2802,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6321:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2803,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2786,
                              "src": "6336:17:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2794,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6264:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2795,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "6264:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2796,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6264:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2797,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "transferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7511,
                            "src": "6264:44:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2804,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6264:90:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 2810,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6422:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                ],
                                "id": 2809,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "6414:7:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": "address"
                              },
                              "id": 2811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6414:22:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 2812,
                              "name": "outcomeTokenCount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2786,
                              "src": "6438:17:9",
                              "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": 2805,
                                  "name": "eventContract",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2214,
                                  "src": "6374:13:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Event_$392",
                                    "typeString": "contract Event"
                                  }
                                },
                                "id": 2806,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "collateralToken",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 194,
                                "src": "6374:29:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                  "typeString": "function () view external returns (contract ERC20)"
                                }
                              },
                              "id": 2807,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6374:31:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ERC20_$7778",
                                "typeString": "contract ERC20"
                              }
                            },
                            "id": 2808,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "approve",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 7476,
                            "src": "6374:39:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                              "typeString": "function (address,uint256) external returns (bool)"
                            }
                          },
                          "id": 2813,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "6374:82:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6264:192:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2793,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "6253:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2815,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6253:204:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2816,
                  "nodeType": "ExpressionStatement",
                  "src": "6253:204:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2820,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6496:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2817,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "6467:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2819,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "buyAllOutcomes",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 251,
                      "src": "6467:28:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                        "typeString": "function (uint256) external"
                      }
                    },
                    "id": 2821,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6467:47:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2822,
                  "nodeType": "ExpressionStatement",
                  "src": "6467:47:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2830,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 7982,
                            "src": "6626:4:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_StandardMarket_$3199",
                              "typeString": "contract StandardMarket"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_StandardMarket_$3199",
                              "typeString": "contract StandardMarket"
                            }
                          ],
                          "id": 2829,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "6618:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 2831,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6618:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2832,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6633:17:9",
                        "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": 2826,
                            "name": "outcomeTokenIndex",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2784,
                            "src": "6591:17:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint8",
                              "typeString": "uint8"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 2823,
                            "name": "eventContract",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2214,
                            "src": "6563:13:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Event_$392",
                              "typeString": "contract Event"
                            }
                          },
                          "id": 2825,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "outcomeTokens",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 203,
                          "src": "6563:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                            "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                          }
                        },
                        "id": 2827,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6563:46:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                          "typeString": "contract OutcomeToken"
                        }
                      },
                      "id": 2828,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "approve",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 7476,
                      "src": "6563:54:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                        "typeString": "function (address,uint256) external returns (bool)"
                      }
                    },
                    "id": 2833,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6563:88:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2834,
                  "nodeType": "ExpressionStatement",
                  "src": "6563:88:9"
                },
                {
                  "assignments": [
                    2836
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2836,
                      "name": "profit",
                      "nodeType": "VariableDeclaration",
                      "scope": 2902,
                      "src": "6661:11:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2835,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "6661:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2843,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2839,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "6685:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2840,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6704:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2841,
                        "name": "minProfit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2788,
                        "src": "6723:9:9",
                        "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": 2837,
                        "name": "this",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 7982,
                        "src": "6675:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                          "typeString": "contract StandardMarket"
                        }
                      },
                      "id": 2838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sell",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 2782,
                      "src": "6675:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                        "typeString": "function (uint8,uint256,uint256) external returns (uint256)"
                      }
                    },
                    "id": 2842,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6675:58:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6661:72:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2848,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2844,
                      "name": "cost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2791,
                      "src": "6743:4:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2847,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2845,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "6750:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "-",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2846,
                        "name": "profit",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2836,
                        "src": "6770:6:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "6750:26:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "6743:33:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 2849,
                  "nodeType": "ExpressionStatement",
                  "src": "6743:33:9"
                },
                {
                  "assignments": [
                    2851
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2851,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2902,
                      "src": "6830:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2850,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "6830:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2855,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2852,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "6851:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2853,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "6851:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2854,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6851:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "6830:52:9"
                },
                {
                  "body": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "id": 2868,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2866,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2857,
                        "src": "6949:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2867,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "6954:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "src": "6949:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 2881,
                    "nodeType": "IfStatement",
                    "src": "6945:123:9",
                    "trueBody": {
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2875,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 7920,
                                  "src": "7037:3:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 2876,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "7037:10:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "id": 2877,
                                "name": "outcomeTokenCount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2786,
                                "src": "7049:17:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 2872,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2857,
                                    "src": "7025:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 2870,
                                    "name": "eventContract",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2214,
                                    "src": "6997:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_Event_$392",
                                      "typeString": "contract Event"
                                    }
                                  },
                                  "id": 2871,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "outcomeTokens",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 203,
                                  "src": "6997:27:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                    "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                  }
                                },
                                "id": 2873,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "6997:30:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                  "typeString": "contract OutcomeToken"
                                }
                              },
                              "id": 2874,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "transfer",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 7441,
                              "src": "6997:39:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                "typeString": "function (address,uint256) external returns (bool)"
                              }
                            },
                            "id": 2878,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "6997:70:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            }
                          ],
                          "id": 2869,
                          "name": "require",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            7923,
                            7924
                          ],
                          "referencedDeclaration": 7923,
                          "src": "6989:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                            "typeString": "function (bool) pure"
                          }
                        },
                        "id": 2879,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "6989:79:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_tuple$__$",
                          "typeString": "tuple()"
                        }
                      },
                      "id": 2880,
                      "nodeType": "ExpressionStatement",
                      "src": "6989:79:9"
                    }
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 2862,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2860,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2857,
                      "src": "6910:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 2861,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2851,
                      "src": "6914:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "6910:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2882,
                  "initializationExpression": {
                    "assignments": [
                      2857
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2857,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2882,
                        "src": "6897:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 2856,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "6897:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2859,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2858,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "6907:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "6897:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2864,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "6928:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2863,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2857,
                        "src": "6928:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 2865,
                    "nodeType": "ExpressionStatement",
                    "src": "6928:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "6892:176:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 2888,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 7920,
                              "src": "7164:3:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 2889,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "7164:10:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 2890,
                            "name": "profit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2836,
                            "src": "7176:6:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "id": 2884,
                                "name": "eventContract",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2214,
                                "src": "7123:13:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_Event_$392",
                                  "typeString": "contract Event"
                                }
                              },
                              "id": 2885,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "collateralToken",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 194,
                              "src": "7123:29:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                "typeString": "function () view external returns (contract ERC20)"
                              }
                            },
                            "id": 2886,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "7123:31:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$7778",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 2887,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 7441,
                          "src": "7123:40:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 2891,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "7123:60:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2883,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "7115:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2892,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7115:69:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2893,
                  "nodeType": "ExpressionStatement",
                  "src": "7115:69:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2895,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "7221:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2896,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "7221:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2897,
                        "name": "outcomeTokenIndex",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2784,
                        "src": "7233:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2898,
                        "name": "outcomeTokenCount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2786,
                        "src": "7252:17:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2899,
                        "name": "cost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2791,
                        "src": "7271:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2894,
                      "name": "OutcomeTokenShortSale",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2197,
                      "src": "7199:21:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint8_$_t_uint256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint8,uint256,uint256)"
                      }
                    },
                    "id": 2900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7199:77:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2901,
                  "nodeType": "EmitStatement",
                  "src": "7194:82:9"
                }
              ]
            },
            "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": 2903,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "shortSell",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2789,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2784,
                  "name": "outcomeTokenIndex",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6103:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2783,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6103:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2786,
                  "name": "outcomeTokenCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6128:22:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2785,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6128:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2788,
                  "name": "minProfit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6152:14:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2787,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6152:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6102:65:9"
            },
            "returnParameters": {
              "id": 2792,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2791,
                  "name": "cost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2903,
                  "src": "6200:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2790,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6200:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6199:11:9"
            },
            "scope": 3199,
            "src": "6084:1199:9",
            "stateMutability": "nonpayable",
            "superFunction": 2278,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2955,
              "nodeType": "Block",
              "src": "8217:386:9",
              "statements": [
                {
                  "assignments": [
                    2918
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2918,
                      "name": "outcomeCount",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8227:18:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      },
                      "typeName": {
                        "id": 2917,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "8227:5:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2922,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2919,
                        "name": "eventContract",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2214,
                        "src": "8248:13:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_Event_$392",
                          "typeString": "contract Event"
                        }
                      },
                      "id": 2920,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "getOutcomeCount",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 331,
                      "src": "8248:29:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$",
                        "typeString": "function () view external returns (uint8)"
                      }
                    },
                    "id": 2921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8248:31:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8227:52:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 2927,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2924,
                            "name": "outcomeTokenAmounts",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2906,
                            "src": "8297:19:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                              "typeString": "int256[] memory"
                            }
                          },
                          "id": 2925,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "8297:26:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 2926,
                          "name": "outcomeCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2918,
                          "src": "8327:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "8297:42:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2923,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "8289:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2928,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8289:51:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2929,
                  "nodeType": "ExpressionStatement",
                  "src": "8289:51:9"
                },
                {
                  "assignments": [
                    2931
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2931,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8351:23:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      },
                      "typeName": {
                        "id": 2930,
                        "name": "int",
                        "nodeType": "ElementaryTypeName",
                        "src": "8351:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2932,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8351:23:9"
                },
                {
                  "assignments": [
                    2934
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2934,
                      "name": "fees",
                      "nodeType": "VariableDeclaration",
                      "scope": 2955,
                      "src": "8384:9:9",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2933,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "8384:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2935,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "8384:9:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2945,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "id": 2936,
                          "name": "netCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2915,
                          "src": "8404:7:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2937,
                          "name": "outcomeTokenNetCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2931,
                          "src": "8413:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2938,
                          "name": "fees",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2934,
                          "src": "8434:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "id": 2939,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "TupleExpression",
                      "src": "8403:36:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "tuple(int256,int256,uint256)"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2941,
                          "name": "outcomeCount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2918,
                          "src": "8452:12:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2942,
                          "name": "outcomeTokenAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2906,
                          "src": "8466:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2943,
                          "name": "collateralLimit",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2908,
                          "src": "8487:15:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          },
                          {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          },
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "id": 2940,
                        "name": "tradeImpl",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3184,
                        "src": "8442:9:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$returns$_t_int256_$_t_int256_$_t_uint256_$",
                          "typeString": "function (uint8,int256[] memory,int256) returns (int256,int256,uint256)"
                        }
                      },
                      "id": 2944,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8442:61:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$_t_int256_$_t_int256_$_t_uint256_$",
                        "typeString": "tuple(int256,int256,uint256)"
                      }
                    },
                    "src": "8403:100:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2946,
                  "nodeType": "ExpressionStatement",
                  "src": "8403:100:9"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2948,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7920,
                          "src": "8537:3:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 2949,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8537:10:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2950,
                        "name": "outcomeTokenAmounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2906,
                        "src": "8549:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2951,
                        "name": "outcomeTokenNetCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2931,
                        "src": "8570:19:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2952,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2934,
                        "src": "8591:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                          "typeString": "int256[] memory"
                        },
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2947,
                      "name": "OutcomeTokenTrade",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2208,
                      "src": "8519:17:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_array$_t_int256_$dyn_memory_ptr_$_t_int256_$_t_uint256_$returns$__$",
                        "typeString": "function (address,int256[] memory,int256,uint256)"
                      }
                    },
                    "id": 2953,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8519:77:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2954,
                  "nodeType": "EmitStatement",
                  "src": "8514:82:9"
                }
              ]
            },
            "documentation": "@dev Allows to trade outcome tokens and collateral with the market maker\n @param outcomeTokenAmounts Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead.\n @param collateralLimit If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.\n @return If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received.",
            "id": 2956,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 2911,
                      "name": "Stages",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2229,
                      "src": "8162:6:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_enum$_Stages_$2229_$",
                        "typeString": "type(enum MarketData.Stages)"
                      }
                    },
                    "id": 2912,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "lValueRequested": false,
                    "memberName": "MarketFunded",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "8162:19:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_Stages_$2229",
                      "typeString": "enum MarketData.Stages"
                    }
                  }
                ],
                "id": 2913,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2910,
                  "name": "atStage",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2424,
                  "src": "8154:7:9",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_enum$_Stages_$2229_$",
                    "typeString": "modifier (enum MarketData.Stages)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "8154:28:9"
              }
            ],
            "name": "trade",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2909,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2906,
                  "name": "outcomeTokenAmounts",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8076:32:9",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                    "typeString": "int256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2904,
                      "name": "int",
                      "nodeType": "ElementaryTypeName",
                      "src": "8076:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "id": 2905,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "8076:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                      "typeString": "int256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2908,
                  "name": "collateralLimit",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8110:19:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2907,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8110:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8075:55:9"
            },
            "returnParameters": {
              "id": 2916,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2915,
                  "name": "netCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 2956,
                  "src": "8200:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2914,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8200:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8199:13:9"
            },
            "scope": 3199,
            "src": "8061:542:9",
            "stateMutability": "nonpayable",
            "superFunction": 2288,
            "visibility": "public"
          },
          {
            "body": {
              "id": 3183,
              "nodeType": "Block",
              "src": "8789:1924:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2978,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2972,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "8849:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2975,
                          "name": "this",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 7982,
                          "src": "8895:4:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_StandardMarket_$3199",
                            "typeString": "contract StandardMarket"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 2976,
                          "name": "outcomeTokenAmounts",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2961,
                          "src": "8901:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_StandardMarket_$3199",
                            "typeString": "contract StandardMarket"
                          },
                          {
                            "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                            "typeString": "int256[] memory"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 2973,
                          "name": "marketMaker",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2216,
                          "src": "8871:11:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_MarketMaker_$1606",
                            "typeString": "contract MarketMaker"
                          }
                        },
                        "id": 2974,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "calcNetCost",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1596,
                        "src": "8871:23:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_contract$_Market_$2296_$_t_array$_t_int256_$dyn_memory_ptr_$returns$_t_int256_$",
                          "typeString": "function (contract Market,int256[] memory) view external returns (int256)"
                        }
                      },
                      "id": 2977,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "8871:50:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "8849:72:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 2979,
                  "nodeType": "ExpressionStatement",
                  "src": "8849:72:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 2982,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2980,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "8934:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2981,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "8956:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "8934:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2998,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2992,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2970,
                        "src": "9046:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2995,
                                "name": "outcomeTokenNetCost",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2968,
                                "src": "9072:19:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 2994,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "9067:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": "uint"
                            },
                            "id": 2996,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "9067:25:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2993,
                          "name": "calcMarketFee",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            3198
                          ],
                          "referencedDeclaration": 3198,
                          "src": "9053:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256) view returns (uint256)"
                          }
                        },
                        "id": 2997,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "9053:40:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9046:47:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2999,
                    "nodeType": "ExpressionStatement",
                    "src": "9046:47:9"
                  },
                  "id": 3000,
                  "nodeType": "IfStatement",
                  "src": "8931:162:9",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2990,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2983,
                        "name": "fees",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2970,
                        "src": "8971:4:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 2987,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "8997:20:9",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 2986,
                                  "name": "outcomeTokenNetCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2968,
                                  "src": "8998:19:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 2985,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "8992:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": "uint"
                            },
                            "id": 2988,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "8992:26:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "id": 2984,
                          "name": "calcMarketFee",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [
                            3198
                          ],
                          "referencedDeclaration": 3198,
                          "src": "8978:13:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$",
                            "typeString": "function (uint256) view returns (uint256)"
                          }
                        },
                        "id": 2989,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8978:41:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "8971:48:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2991,
                    "nodeType": "ExpressionStatement",
                    "src": "8971:48:9"
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 3006,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 3003,
                              "name": "fees",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2970,
                              "src": "9116:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3002,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9112:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 3004,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9112:9:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 3005,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "9125:1:9",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "9112:14:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 3001,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "9104:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 3007,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9104:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3008,
                  "nodeType": "ExpressionStatement",
                  "src": "9104:23:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 3016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 3009,
                      "name": "netCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2966,
                      "src": "9137:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 3013,
                              "name": "fees",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2970,
                              "src": "9175:4:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 3012,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "9171:3:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_int256_$",
                              "typeString": "type(int256)"
                            },
                            "typeName": "int"
                          },
                          "id": 3014,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9171:9:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 3010,
                          "name": "outcomeTokenNetCost",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2968,
                          "src": "9147:19:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "id": 3011,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 7247,
                        "src": "9147:23:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                          "typeString": "function (int256,int256) pure returns (int256)"
                        }
                      },
                      "id": 3015,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "9147:34:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "src": "9137:44:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "id": 3017,
                  "nodeType": "ExpressionStatement",
                  "src": "9137:44:9"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 3030,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3025,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3021,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 3019,
                                  "name": "collateralLimit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2963,
                                  "src": "9214:15:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "!=",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 3020,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9233:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9214:20:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3024,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "id": 3022,
                                  "name": "netCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2966,
                                  "src": "9238:7:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<=",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "id": 3023,
                                  "name": "collateralLimit",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2963,
                                  "src": "9249:15:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "9238:26:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9214:50:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "id": 3026,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "9213:52:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3029,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 3027,
                            "name": "collateralLimit",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2963,
                            "src": "9281:15:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3028,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9300:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "9281:20:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "9213:88:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 3018,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        7923,
                        7924
                      ],
                      "referencedDeclaration": 7923,
                      "src": "9192:7:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 3031,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9192:119:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3032,
                  "nodeType": "ExpressionStatement",
                  "src": "9192:119:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 3035,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3033,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "9325:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3034,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9347:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "9325:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 3073,
                  "nodeType": "IfStatement",
                  "src": "9322:358:9",
                  "trueBody": {
                    "id": 3072,
                    "nodeType": "Block",
                    "src": "9350:330:9",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3061,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3041,
                                      "name": "msg",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 7920,
                                      "src": "9434:3:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_magic_message",
                                        "typeString": "msg"
                                      }
                                    },
                                    "id": 3042,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "sender",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": null,
                                    "src": "9434:10:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3044,
                                        "name": "this",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 7982,
                                        "src": "9454:4:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                          "typeString": "contract StandardMarket"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                          "typeString": "contract StandardMarket"
                                        }
                                      ],
                                      "id": 3043,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9446:7:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 3045,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9446:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3047,
                                        "name": "netCost",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2966,
                                        "src": "9466:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 3046,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9461:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": "uint"
                                    },
                                    "id": 3048,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9461:13:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address_payable",
                                      "typeString": "address payable"
                                    },
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "arguments": [],
                                    "expression": {
                                      "argumentTypes": [],
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 3037,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9389:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      },
                                      "id": 3038,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "collateralToken",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 194,
                                      "src": "9389:29:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                        "typeString": "function () view external returns (contract ERC20)"
                                      }
                                    },
                                    "id": 3039,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9389:31:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ERC20_$7778",
                                      "typeString": "contract ERC20"
                                    }
                                  },
                                  "id": 3040,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "transferFrom",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 7511,
                                  "src": "9389:44:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (address,address,uint256) external returns (bool)"
                                  }
                                },
                                "id": 3049,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9389:86:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3055,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9543:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      ],
                                      "id": 3054,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9535:7:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_address_$",
                                        "typeString": "type(address)"
                                      },
                                      "typeName": "address"
                                    },
                                    "id": 3056,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9535:22:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "id": 3058,
                                        "name": "outcomeTokenNetCost",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2968,
                                        "src": "9564:19:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "id": 3057,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "nodeType": "ElementaryTypeNameExpression",
                                      "src": "9559:4:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_uint256_$",
                                        "typeString": "type(uint256)"
                                      },
                                      "typeName": "uint"
                                    },
                                    "id": 3059,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "typeConversion",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9559:25:9",
                                    "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": 3050,
                                        "name": "eventContract",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2214,
                                        "src": "9495:13:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_Event_$392",
                                          "typeString": "contract Event"
                                        }
                                      },
                                      "id": 3051,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "collateralToken",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 194,
                                      "src": "9495:29:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                        "typeString": "function () view external returns (contract ERC20)"
                                      }
                                    },
                                    "id": 3052,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "9495:31:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_ERC20_$7778",
                                      "typeString": "contract ERC20"
                                    }
                                  },
                                  "id": 3053,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "approve",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 7476,
                                  "src": "9495:39:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                    "typeString": "function (address,uint256) external returns (bool)"
                                  }
                                },
                                "id": 3060,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9495:90:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "9389:196:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            ],
                            "id": 3036,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              7923,
                              7924
                            ],
                            "referencedDeclaration": 7923,
                            "src": "9364:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                              "typeString": "function (bool) pure"
                            }
                          },
                          "id": 3062,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9364:235:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3063,
                        "nodeType": "ExpressionStatement",
                        "src": "9364:235:9"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3068,
                                  "name": "outcomeTokenNetCost",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2968,
                                  "src": "9648:19:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 3067,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "9643:4:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": "uint"
                              },
                              "id": 3069,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "9643:25:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 3064,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "9614:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 3066,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "buyAllOutcomes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 251,
                            "src": "9614:28:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256) external"
                            }
                          },
                          "id": 3070,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9614:55:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3071,
                        "nodeType": "ExpressionStatement",
                        "src": "9614:55:9"
                      }
                    ]
                  }
                },
                {
                  "body": {
                    "id": 3148,
                    "nodeType": "Block",
                    "src": "9731:503:9",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3088,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 3084,
                              "name": "outcomeTokenAmounts",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2961,
                              "src": "9748:19:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                "typeString": "int256[] memory"
                              }
                            },
                            "id": 3086,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 3085,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3075,
                              "src": "9768:1:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "9748:22:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "!=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3087,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "9774:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "9748:27:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 3147,
                        "nodeType": "IfStatement",
                        "src": "9745:479:9",
                        "trueBody": {
                          "id": 3146,
                          "nodeType": "Block",
                          "src": "9777:447:9",
                          "statements": [
                            {
                              "condition": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                },
                                "id": 3093,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 3089,
                                    "name": "outcomeTokenAmounts",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2961,
                                    "src": "9798:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                      "typeString": "int256[] memory"
                                    }
                                  },
                                  "id": 3091,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 3090,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3075,
                                    "src": "9818:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "IndexAccess",
                                  "src": "9798:22:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "<",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "30",
                                  "id": 3092,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "9823:1:9",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_0_by_1",
                                    "typeString": "int_const 0"
                                  },
                                  "value": "0"
                                },
                                "src": "9798:26:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "falseBody": {
                                "id": 3131,
                                "nodeType": "Block",
                                "src": "9983:131:9",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "arguments": [
                                            {
                                              "argumentTypes": null,
                                              "expression": {
                                                "argumentTypes": null,
                                                "id": 3121,
                                                "name": "msg",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 7920,
                                                "src": "10053:3:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_magic_message",
                                                  "typeString": "msg"
                                                }
                                              },
                                              "id": 3122,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sender",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": null,
                                              "src": "10053:10:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "baseExpression": {
                                                    "argumentTypes": null,
                                                    "id": 3124,
                                                    "name": "outcomeTokenAmounts",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 2961,
                                                    "src": "10070:19:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                                      "typeString": "int256[] memory"
                                                    }
                                                  },
                                                  "id": 3126,
                                                  "indexExpression": {
                                                    "argumentTypes": null,
                                                    "id": 3125,
                                                    "name": "i",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 3075,
                                                    "src": "10090:1:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_uint8",
                                                      "typeString": "uint8"
                                                    }
                                                  },
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "nodeType": "IndexAccess",
                                                  "src": "10070:22:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                ],
                                                "id": 3123,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "10065:4:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_uint256_$",
                                                  "typeString": "type(uint256)"
                                                },
                                                "typeName": "uint"
                                              },
                                              "id": 3127,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "10065:28:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3118,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3075,
                                                  "src": "10041:1:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": null,
                                                  "id": 3116,
                                                  "name": "eventContract",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2214,
                                                  "src": "10013:13:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_Event_$392",
                                                    "typeString": "contract Event"
                                                  }
                                                },
                                                "id": 3117,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "outcomeTokens",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 203,
                                                "src": "10013:27:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                                }
                                              },
                                              "id": 3119,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "10013:30:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                                "typeString": "contract OutcomeToken"
                                              }
                                            },
                                            "id": 3120,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "transfer",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 7441,
                                            "src": "10013:39:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                              "typeString": "function (address,uint256) external returns (bool)"
                                            }
                                          },
                                          "id": 3128,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "10013:81:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 3115,
                                        "name": "require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [
                                          7923,
                                          7924
                                        ],
                                        "referencedDeclaration": 7923,
                                        "src": "10005:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                          "typeString": "function (bool) pure"
                                        }
                                      },
                                      "id": 3129,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "10005:90:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 3130,
                                    "nodeType": "ExpressionStatement",
                                    "src": "10005:90:9"
                                  }
                                ]
                              },
                              "id": 3132,
                              "nodeType": "IfStatement",
                              "src": "9795:319:9",
                              "trueBody": {
                                "id": 3114,
                                "nodeType": "Block",
                                "src": "9826:151:9",
                                "statements": [
                                  {
                                    "expression": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "arguments": [
                                            {
                                              "argumentTypes": null,
                                              "expression": {
                                                "argumentTypes": null,
                                                "id": 3100,
                                                "name": "msg",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 7920,
                                                "src": "9900:3:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_magic_message",
                                                  "typeString": "msg"
                                                }
                                              },
                                              "id": 3101,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "memberName": "sender",
                                              "nodeType": "MemberAccess",
                                              "referencedDeclaration": null,
                                              "src": "9900:10:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3103,
                                                  "name": "this",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 7982,
                                                  "src": "9920:4:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                                    "typeString": "contract StandardMarket"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_contract$_StandardMarket_$3199",
                                                    "typeString": "contract StandardMarket"
                                                  }
                                                ],
                                                "id": 3102,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "9912:7:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_address_$",
                                                  "typeString": "type(address)"
                                                },
                                                "typeName": "address"
                                              },
                                              "id": 3104,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9912:13:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                              }
                                            },
                                            {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3109,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "nodeType": "UnaryOperation",
                                                  "operator": "-",
                                                  "prefix": true,
                                                  "src": "9932:23:9",
                                                  "subExpression": {
                                                    "argumentTypes": null,
                                                    "baseExpression": {
                                                      "argumentTypes": null,
                                                      "id": 3106,
                                                      "name": "outcomeTokenAmounts",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 2961,
                                                      "src": "9933:19:9",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                                        "typeString": "int256[] memory"
                                                      }
                                                    },
                                                    "id": 3108,
                                                    "indexExpression": {
                                                      "argumentTypes": null,
                                                      "id": 3107,
                                                      "name": "i",
                                                      "nodeType": "Identifier",
                                                      "overloadedDeclarations": [],
                                                      "referencedDeclaration": 3075,
                                                      "src": "9953:1:9",
                                                      "typeDescriptions": {
                                                        "typeIdentifier": "t_uint8",
                                                        "typeString": "uint8"
                                                      }
                                                    },
                                                    "isConstant": false,
                                                    "isLValue": true,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "nodeType": "IndexAccess",
                                                    "src": "9933:22:9",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_int256",
                                                      "typeString": "int256"
                                                    }
                                                  },
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_int256",
                                                    "typeString": "int256"
                                                  }
                                                ],
                                                "id": 3105,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "9927:4:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_type$_t_uint256_$",
                                                  "typeString": "type(uint256)"
                                                },
                                                "typeName": "uint"
                                              },
                                              "id": 3110,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "typeConversion",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9927:29:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            }
                                          ],
                                          "expression": {
                                            "argumentTypes": [
                                              {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                              },
                                              {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                              },
                                              {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              }
                                            ],
                                            "expression": {
                                              "argumentTypes": null,
                                              "arguments": [
                                                {
                                                  "argumentTypes": null,
                                                  "id": 3097,
                                                  "name": "i",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 3075,
                                                  "src": "9884:1:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                }
                                              ],
                                              "expression": {
                                                "argumentTypes": [
                                                  {
                                                    "typeIdentifier": "t_uint8",
                                                    "typeString": "uint8"
                                                  }
                                                ],
                                                "expression": {
                                                  "argumentTypes": null,
                                                  "id": 3095,
                                                  "name": "eventContract",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2214,
                                                  "src": "9856:13:9",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_Event_$392",
                                                    "typeString": "contract Event"
                                                  }
                                                },
                                                "id": 3096,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "outcomeTokens",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 203,
                                                "src": "9856:27:9",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_function_external_view$_t_uint256_$returns$_t_contract$_OutcomeToken_$5793_$",
                                                  "typeString": "function (uint256) view external returns (contract OutcomeToken)"
                                                }
                                              },
                                              "id": 3098,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "kind": "functionCall",
                                              "lValueRequested": false,
                                              "names": [],
                                              "nodeType": "FunctionCall",
                                              "src": "9856:30:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_OutcomeToken_$5793",
                                                "typeString": "contract OutcomeToken"
                                              }
                                            },
                                            "id": 3099,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "transferFrom",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 7511,
                                            "src": "9856:43:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                              "typeString": "function (address,address,uint256) external returns (bool)"
                                            }
                                          },
                                          "id": 3111,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "kind": "functionCall",
                                          "lValueRequested": false,
                                          "names": [],
                                          "nodeType": "FunctionCall",
                                          "src": "9856:101:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          }
                                        ],
                                        "id": 3094,
                                        "name": "require",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [
                                          7923,
                                          7924
                                        ],
                                        "referencedDeclaration": 7923,
                                        "src": "9848:7:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                          "typeString": "function (bool) pure"
                                        }
                                      },
                                      "id": 3112,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "functionCall",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "9848:110:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_tuple$__$",
                                        "typeString": "tuple()"
                                      }
                                    },
                                    "id": 3113,
                                    "nodeType": "ExpressionStatement",
                                    "src": "9848:110:9"
                                  }
                                ]
                              }
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 3144,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "baseExpression": {
                                    "argumentTypes": null,
                                    "id": 3133,
                                    "name": "netOutcomeTokensSold",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2223,
                                    "src": "10132:20:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                                      "typeString": "int256[] storage ref"
                                    }
                                  },
                                  "id": 3135,
                                  "indexExpression": {
                                    "argumentTypes": null,
                                    "id": 3134,
                                    "name": "i",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3075,
                                    "src": "10153:1:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint8",
                                      "typeString": "uint8"
                                    }
                                  },
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "nodeType": "IndexAccess",
                                  "src": "10132:23:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "baseExpression": {
                                        "argumentTypes": null,
                                        "id": 3140,
                                        "name": "outcomeTokenAmounts",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2961,
                                        "src": "10186:19:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                                          "typeString": "int256[] memory"
                                        }
                                      },
                                      "id": 3142,
                                      "indexExpression": {
                                        "argumentTypes": null,
                                        "id": 3141,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3075,
                                        "src": "10206:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "10186:22:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "baseExpression": {
                                        "argumentTypes": null,
                                        "id": 3136,
                                        "name": "netOutcomeTokensSold",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 2223,
                                        "src": "10158:20:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_array$_t_int256_$dyn_storage",
                                          "typeString": "int256[] storage ref"
                                        }
                                      },
                                      "id": 3138,
                                      "indexExpression": {
                                        "argumentTypes": null,
                                        "id": 3137,
                                        "name": "i",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3075,
                                        "src": "10179:1:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint8",
                                          "typeString": "uint8"
                                        }
                                      },
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "IndexAccess",
                                      "src": "10158:23:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    },
                                    "id": 3139,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "add",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 7247,
                                    "src": "10158:27:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_int256_$_t_int256_$returns$_t_int256_$bound_to$_t_int256_$",
                                      "typeString": "function (int256,int256) pure returns (int256)"
                                    }
                                  },
                                  "id": 3143,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "10158:51:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "src": "10132:77:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              },
                              "id": 3145,
                              "nodeType": "ExpressionStatement",
                              "src": "10132:77:9"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    },
                    "id": 3080,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3078,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3075,
                      "src": "9708:1:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3079,
                      "name": "outcomeCount",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2958,
                      "src": "9712:12:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "src": "9708:16:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 3149,
                  "initializationExpression": {
                    "assignments": [
                      3075
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 3075,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 3149,
                        "src": "9695:7:9",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        },
                        "typeName": {
                          "id": 3074,
                          "name": "uint8",
                          "nodeType": "ElementaryTypeName",
                          "src": "9695:5:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 3077,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3076,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9705:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "9695:11:9"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 3082,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "9726:3:9",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 3081,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3075,
                        "src": "9726:1:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "id": 3083,
                    "nodeType": "ExpressionStatement",
                    "src": "9726:3:9"
                  },
                  "nodeType": "ForStatement",
                  "src": "9690:544:9"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 3152,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3150,
                      "name": "outcomeTokenNetCost",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2968,
                      "src": "10247:19:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3151,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "10269:1:9",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "10247:23:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 3182,
                  "nodeType": "IfStatement",
                  "src": "10244:463:9",
                  "trueBody": {
                    "id": 3181,
                    "nodeType": "Block",
                    "src": "10272:435:9",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3158,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "nodeType": "UnaryOperation",
                                  "operator": "-",
                                  "prefix": true,
                                  "src": "10535:20:9",
                                  "subExpression": {
                                    "argumentTypes": null,
                                    "id": 3157,
                                    "name": "outcomeTokenNetCost",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2968,
                                    "src": "10536:19:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_int256",
                                      "typeString": "int256"
                                    }
                                  },
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 3156,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "10530:4:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": "uint"
                              },
                              "id": 3159,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "10530:26:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 3153,
                              "name": "eventContract",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2214,
                              "src": "10500:13:9",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_Event_$392",
                                "typeString": "contract Event"
                              }
                            },
                            "id": 3155,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sellAllOutcomes",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 293,
                            "src": "10500:29:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256) external"
                            }
                          },
                          "id": 3160,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "10500:57:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 3161,
                        "nodeType": "ExpressionStatement",
                        "src": "10500:57:9"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 3164,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 3162,
                            "name": "netCost",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2966,
                            "src": "10574:7:9",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3163,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "10584:1:9",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "10574:11:9",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 3180,
                        "nodeType": "IfStatement",
                        "src": "10571:126:9",
                        "trueBody": {
                          "id": 3179,
                          "nodeType": "Block",
                          "src": "10587:110:9",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "arguments": [
                                      {
                                        "argumentTypes": null,
                                        "expression": {
                                          "argumentTypes": null,
                                          "id": 3170,
                                          "name": "msg",
                                          "nodeType": "Identifier",
                                          "overloadedDeclarations": [],
                                          "referencedDeclaration": 7920,
                                          "src": "10654:3:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_magic_message",
                                            "typeString": "msg"
                                          }
                                        },
                                        "id": 3171,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "memberName": "sender",
                                        "nodeType": "MemberAccess",
                                        "referencedDeclaration": null,
                                        "src": "10654:10:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        }
                                      },
                                      {
                                        "argumentTypes": null,
                                        "arguments": [
                                          {
                                            "argumentTypes": null,
                                            "id": 3174,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "UnaryOperation",
                                            "operator": "-",
                                            "prefix": true,
                                            "src": "10671:8:9",
                                            "subExpression": {
                                              "argumentTypes": null,
                                              "id": 3173,
                                              "name": "netCost",
                                              "nodeType": "Identifier",
                                              "overloadedDeclarations": [],
                                              "referencedDeclaration": 2966,
                                              "src": "10672:7:9",
                                              "typeDescriptions": {
                                                "typeIdentifier": "t_int256",
                                                "typeString": "int256"
                                              }
                                            },
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          }
                                        ],
                                        "expression": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "id": 3172,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "nodeType": "ElementaryTypeNameExpression",
                                          "src": "10666:4:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_type$_t_uint256_$",
                                            "typeString": "type(uint256)"
                                          },
                                          "typeName": "uint"
                                        },
                                        "id": 3175,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10666:14:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address_payable",
                                          "typeString": "address payable"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": null,
                                        "arguments": [],
                                        "expression": {
                                          "argumentTypes": [],
                                          "expression": {
                                            "argumentTypes": null,
                                            "id": 3166,
                                            "name": "eventContract",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2214,
                                            "src": "10613:13:9",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_contract$_Event_$392",
                                              "typeString": "contract Event"
                                            }
                                          },
                                          "id": 3167,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "memberName": "collateralToken",
                                          "nodeType": "MemberAccess",
                                          "referencedDeclaration": 194,
                                          "src": "10613:29:9",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_ERC20_$7778_$",
                                            "typeString": "function () view external returns (contract ERC20)"
                                          }
                                        },
                                        "id": 3168,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "10613:31:9",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_contract$_ERC20_$7778",
                                          "typeString": "contract ERC20"
                                        }
                                      },
                                      "id": 3169,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "transfer",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": 7441,
                                      "src": "10613:40:9",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                        "typeString": "function (address,uint256) external returns (bool)"
                                      }
                                    },
                                    "id": 3176,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "kind": "functionCall",
                                    "lValueRequested": false,
                                    "names": [],
                                    "nodeType": "FunctionCall",
                                    "src": "10613:68:9",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bool",
                                      "typeString": "bool"
                                    }
                                  ],
                                  "id": 3165,
                                  "name": "require",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    7923,
                                    7924
                                  ],
                                  "referencedDeclaration": 7923,
                                  "src": "10605:7:9",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                                    "typeString": "function (bool) pure"
                                  }
                                },
                                "id": 3177,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "10605:77:9",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 3178,
                              "nodeType": "ExpressionStatement",
                              "src": "10605:77:9"
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": null,
            "id": 3184,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "tradeImpl",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2964,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2958,
                  "name": "outcomeCount",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8628:18:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2957,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "8628:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2961,
                  "name": "outcomeTokenAmounts",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8648:32:9",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_int256_$dyn_memory_ptr",
                    "typeString": "int256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2959,
                      "name": "int",
                      "nodeType": "ElementaryTypeName",
                      "src": "8648:3:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "id": 2960,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "8648:5:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_int256_$dyn_storage_ptr",
                      "typeString": "int256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2963,
                  "name": "collateralLimit",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8682:19:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2962,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8682:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8627:75:9"
            },
            "returnParameters": {
              "id": 2971,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2966,
                  "name": "netCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8736:11:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2965,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8736:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2968,
                  "name": "outcomeTokenNetCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8749:23:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 2967,
                    "name": "int",
                    "nodeType": "ElementaryTypeName",
                    "src": "8749:3:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2970,
                  "name": "fees",
                  "nodeType": "VariableDeclaration",
                  "scope": 3184,
                  "src": "8774:9:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2969,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8774:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8735:49:9"
            },
            "scope": 3199,
            "src": "8609:2104:9",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 3197,
              "nodeType": "Block",
              "src": "10968:58:9",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 3195,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 3193,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 3191,
                        "name": "outcomeTokenCost",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3186,
                        "src": "10985:16:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "*",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 3192,
                        "name": "fee",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2218,
                        "src": "11004:3:9",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint24",
                          "typeString": "uint24"
                        }
                      },
                      "src": "10985:22:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "/",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3194,
                      "name": "FEE_RANGE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2306,
                      "src": "11010:9:9",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint24",
                        "typeString": "uint24"
                      }
                    },
                    "src": "10985:34:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 3190,
                  "id": 3196,
                  "nodeType": "Return",
                  "src": "10978:41:9"
                }
              ]
            },
            "documentation": "@dev Calculates fee to be paid to market maker\n @param outcomeTokenCost Cost for buying outcome tokens\n @return Fee for trade",
            "id": 3198,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "calcMarketFee",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 3187,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3186,
                  "name": "outcomeTokenCost",
                  "nodeType": "VariableDeclaration",
                  "scope": 3198,
                  "src": "10890:21:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3185,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10890:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10889:23:9"
            },
            "returnParameters": {
              "id": 3190,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3189,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 3198,
                  "src": "10958:4:9",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3188,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10958:4:9",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10957:6:9"
            },
            "scope": 3199,
            "src": "10867:159:9",
            "stateMutability": "view",
            "superFunction": 2295,
            "visibility": "public"
          }
        ],
        "scope": 3200,
        "src": "1162:9866:9"
      }
    ],
    "src": "0:11029:9"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.6+commit.b259423e.Emscripten.clang"
  },
  "networks": {
    "1": {
      "events": {},
      "links": {},
      "address": "0xa3681c65b5043a8799966a5b3ce87d0968191f73",
      "transactionHash": "0x4c00f17b52f12566cabda223211b7a81a877cf5106dcf53b0dca2719174a2b67"
    },
    "3": {
      "events": {},
      "links": {},
      "address": "0x53a41810936a2a65e38b20050d747ce72404d16d",
      "transactionHash": "0x9428516b2ae8501e0d89ec41597ea6ccd6844bba88653e51ff7ace2266907890"
    },
    "4": {
      "events": {},
      "links": {},
      "address": "0xcc578b4ebedd2cf0b6d057dfd921e0c7d9452b18",
      "transactionHash": "0x2f9a66f2e69e08b5e68f3eae9e04bda84de9dc735c239175261f4d8bbc8be6d4"
    },
    "42": {
      "events": {},
      "links": {},
      "address": "0xb14af7a6e9159cdbdcdb836fdde7df9ad5a480ff",
      "transactionHash": "0x6a37b80b121a69f0a5be488940f91bb5bd88b82f14346fcfcb8fc92a3b3c2a8a"
    },
    "437894314312": {
      "events": {},
      "links": {},
      "address": "0x2612af3a521c2df9eaf28422ca335b04adf3ac66",
      "transactionHash": "0x89fe250ccc456b319b2b02c46214847071afa691fddc84fdc737233b3d95e3b3"
    }
  },
  "schemaVersion": "3.0.11",
  "updatedAt": "2019-09-20T17:46:52.148Z",
  "devdoc": {
    "author": "Stefan George - <stefan@gnosis.pm>",
    "methods": {
      "buy(uint8,uint256,uint256)": {
        "details": "Allows to buy outcome tokens from market maker",
        "params": {
          "maxCost": "The maximum cost in collateral tokens to pay for outcome tokens",
          "outcomeTokenCount": "Amount of outcome tokens to buy",
          "outcomeTokenIndex": "Index of the outcome token to buy"
        },
        "return": "Cost in collateral tokens"
      },
      "calcMarketFee(uint256)": {
        "details": "Calculates fee to be paid to market maker",
        "params": {
          "outcomeTokenCost": "Cost for buying outcome tokens"
        },
        "return": "Fee for trade"
      },
      "close()": {
        "details": "Allows market creator to close the markets by transferring all remaining outcome tokens to the creator"
      },
      "fund(uint256)": {
        "details": "Allows to fund the market with collateral tokens converting them into outcome tokens",
        "params": {
          "_funding": "Funding amount"
        }
      },
      "sell(uint8,uint256,uint256)": {
        "details": "Allows to sell outcome tokens to market maker",
        "params": {
          "minProfit": "The minimum profit in collateral tokens to earn for outcome tokens",
          "outcomeTokenCount": "Amount of outcome tokens to sell",
          "outcomeTokenIndex": "Index of the outcome token to sell"
        },
        "return": "Profit in collateral tokens"
      },
      "shortSell(uint8,uint256,uint256)": {
        "details": "Buys all outcomes, then sells all shares of selected outcome which were bought, keeping      shares of all other outcome tokens.",
        "params": {
          "minProfit": "The minimum profit in collateral tokens to earn for short sold outcome tokens",
          "outcomeTokenCount": "Amount of outcome tokens to short sell",
          "outcomeTokenIndex": "Index of the outcome token to short sell"
        },
        "return": "Cost to short sell outcome in collateral tokens"
      },
      "trade(int256[],int256)": {
        "details": "Allows to trade outcome tokens and collateral with the market maker",
        "params": {
          "collateralLimit": "If positive, this is the limit for the amount of collateral tokens which will be sent to the market to conduct the trade. If negative, this is the minimum amount of collateral tokens which will be received from the market for the trade. If zero, there is no limit.",
          "outcomeTokenAmounts": "Amounts of each outcome token to buy or sell. If positive, will buy this amount of outcome token from the market. If negative, will sell this amount back to the market instead."
        },
        "return": "If positive, the amount of collateral sent to the market. If negative, the amount of collateral received from the market. If zero, no collateral was sent or received."
      },
      "withdrawFees()": {
        "details": "Allows market creator to withdraw fees generated by trades",
        "return": "Fee amount"
      }
    },
    "title": "Standard market contract - Backed implementation of standard markets"
  },
  "userdoc": {
    "methods": {}
  }
}