{
  "contractName": "PositionToken",
  "abi": [
    {
      "constant": true,
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "name": "",
          "type": "string"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "spender",
          "type": "address"
        },
        {
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "from",
          "type": "address"
        },
        {
          "name": "to",
          "type": "address"
        },
        {
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "name": "",
          "type": "uint8"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "spender",
          "type": "address"
        },
        {
          "name": "addedValue",
          "type": "uint256"
        }
      ],
      "name": "increaseAllowance",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isOwner",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "name": "",
          "type": "string"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "spender",
          "type": "address"
        },
        {
          "name": "subtractedValue",
          "type": "uint256"
        }
      ],
      "name": "decreaseAllowance",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "to",
          "type": "address"
        },
        {
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "MARKET_SIDE",
      "outputs": [
        {
          "name": "",
          "type": "uint8"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "owner",
          "type": "address"
        },
        {
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "name": "tokenName",
          "type": "string"
        },
        {
          "name": "tokenSymbol",
          "type": "string"
        },
        {
          "name": "marketSide",
          "type": "uint8"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": false,
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "qtyToMint",
          "type": "uint256"
        },
        {
          "name": "recipient",
          "type": "address"
        }
      ],
      "name": "mintAndSendToken",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "qtyToRedeem",
          "type": "uint256"
        },
        {
          "name": "redeemer",
          "type": "address"
        }
      ],
      "name": "redeemToken",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.2+commit.1df8f40c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"qtyToMint\",\"type\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"mintAndSendToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MARKET_SIDE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"qtyToRedeem\",\"type\":\"uint256\"},{\"name\":\"redeemer\",\"type\":\"address\"}],\"name\":\"redeemToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"tokenName\",\"type\":\"string\"},{\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"name\":\"marketSide\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Phil Elsasser <phil@marketprotocol.io>\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner allowed to a spender.\",\"params\":{\"owner\":\"address The address which owns the funds.\",\"spender\":\"address The address which will spend the funds.\"},\"return\":\"A uint256 specifying the amount of tokens still available for the spender.\"},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"}},\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"owner\":\"The address to query the balance of.\"},\"return\":\"A uint256 representing the amount owned by the passed address.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner allowed to a spender. approve should be called when _allowed[msg.sender][spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner allowed to a spender. approve should be called when _allowed[msg.sender][spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"isOwner()\":{\"return\":\"true if `msg.sender` is the owner of the contract.\"},\"mintAndSendToken(uint256,address)\":{\"details\":\"Called by our MarketContract (owner) to create a long or short position token. These tokens are minted, and then transferred to our recipient who is the party who is minting these tokens.  The collateral pool is the only caller (acts as the owner) because collateral must be deposited / locked prior to minting of new position tokens\",\"params\":{\"qtyToMint\":\"quantity of position tokens to mint (in base units)\",\"recipient\":\"the person minting and receiving these position tokens.\"}},\"owner()\":{\"return\":\"the address of the owner.\"},\"redeemToken(uint256,address)\":{\"details\":\"Called by our MarketContract (owner) when redemption occurs.  This means that either a single user is redeeming both short and long tokens in order to claim their collateral, or the contract has settled, and only a single side of the tokens are needed to redeem (handled by the collateral pool)\",\"params\":{\"qtyToRedeem\":\"quantity of tokens to burn (remove from supply / circulation)\",\"redeemer\":\"the person redeeming these tokens (who are we taking the balance from)\"}},\"renounceOwnership()\":{\"details\":\"Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore.\"},\"totalSupply()\":{\"details\":\"Total number of tokens in existence\"},\"transfer(address,uint256)\":{\"details\":\"Transfer token to a specified address\",\"params\":{\"to\":\"The address to transfer to.\",\"value\":\"The amount to be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another. Note that while this function emits an Approval event, this is not required as per the specification, and other compliant implementations may not emit the event.\",\"params\":{\"from\":\"address The address which you want to send tokens from\",\"to\":\"address The address which you want to transfer to\",\"value\":\"uint256 the amount of tokens to be transferred\"}},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to transfer control of the contract to a newOwner.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}}},\"title\":\"Position Token\"},\"userdoc\":{\"methods\":{\"renounceOwnership()\":{\"notice\":\"Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"}},\"notice\":\"A token that represents a claim to a collateral pool and a short or long position. The collateral pool acts as the owner of this contract and controls minting and redemption of these tokens based on locked collateral in the pool. NOTE: We eventually can move all of this logic into a library to avoid deploying all of the logic every time a new market contract is deployed.\"}},\"settings\":{\"compilationTarget\":{\"/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/PositionToken.sol\":\"PositionToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/PositionToken.sol\":{\"keccak256\":\"0xa1b6986878eedeb5014268a4257b0918473c348f6f39c1558bced6dcf0268f01\",\"urls\":[\"bzzr://9af5870494a1ac62401d92713525808c132a34e11f4dc6aa73f4174ada0201e8\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xc2a200a877c4a9b2475c246c54ffecc69ffde3e11af83319c63c2dc5458bac80\",\"urls\":[\"bzzr://c8876e2c39b60f155d748d71d715c8f3903fae5a405ac599adcb6ad2f9a583f9\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xcb16adc00dcf0d75e0bdf94379f4d5a6d74dca7c74e4183b94e15721159f8a30\",\"urls\":[\"bzzr://b81e03f7203cd628cfed19255911a04a05e8670d248afb48a7b067dd03b4ff55\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x3dceb7e4aa237a56111c13f77d7efadeceda7271d62bfac94ac79afab7c1f411\",\"urls\":[\"bzzr://2f34152a5bec385352002c31bc89f5e9935f628f1923ccea45c2281e0084a4db\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x59e7df16169a498cb8837963b2f5461d88e63bd1eb6c7d58b814d76b84ccbe61\",\"urls\":[\"bzzr://e572c9c4e02e37349702451bf3b5dcbbc86a19da5a51695b5b3e1bfe1e7825dc\"]}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b506040516200174038038062001740833981018060405260608110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b828101905060208101848111156200006757600080fd5b81518560018202830111640100000000821117156200008557600080fd5b50509291906020018051640100000000811115620000a257600080fd5b82810190506020810184811115620000b957600080fd5b8151856001820283011164010000000082111715620000d757600080fd5b50509291906020018051906020019092919050505033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a38260049080519060200190620001c292919062000234565b508160059080519060200190620001db92919062000234565b506005600660006101000a81548160ff021916908360ff1602179055508060ff1660018111156200020857fe5b600660016101000a81548160ff021916908360018111156200022657fe5b0217905550505050620002e3565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200027757805160ff1916838001178555620002a8565b82800160010185558215620002a8579182015b82811115620002a75782518255916020019190600101906200028a565b5b509050620002b79190620002bb565b5090565b620002e091905b80821115620002dc576000816000905550600101620002c2565b5090565b90565b61144d80620002f36000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100bf578063a9059cbb1161008e578063a9059cbb14610554578063b003b127146105ba578063c3501ff6146105e6578063dd62ed3e14610634578063f2fde38b146106ac57610133565b80638da5cb5b146103ff5780638f32d59b1461044957806395d89b411461046b578063a457c2d7146104ee57610133565b8063313ce56711610106578063313ce567146102c557806339509351146102e957806370a082311461034f578063715018a6146103a75780637251cd02146103b157610133565b806306fdde0314610138578063095ea7b3146101bb57806318160ddd1461022157806323b872dd1461023f575b600080fd5b6101406106f0565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610180578082015181840152602081019050610165565b50505050905090810190601f1680156101ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610207600480360360408110156101d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061078e565b604051808215151515815260200191505060405180910390f35b6102296107a5565b6040518082815260200191505060405180910390f35b6102ab6004803603606081101561025557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107af565b604051808215151515815260200191505060405180910390f35b6102cd610860565b604051808260ff1660ff16815260200191505060405180910390f35b610335600480360360408110156102ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610873565b604051808215151515815260200191505060405180910390f35b6103916004803603602081101561036557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610918565b6040518082815260200191505060405180910390f35b6103af610960565b005b6103fd600480360360408110156103c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a34565b005b610407610a55565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610451610a7f565b604051808215151515815260200191505060405180910390f35b610473610ad7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b3578082015181840152602081019050610498565b50505050905090810190601f1680156104e05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053a6004803603604081101561050457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b75565b604051808215151515815260200191505060405180910390f35b6105a06004803603604081101561056a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1a565b604051808215151515815260200191505060405180910390f35b6105c2610c31565b604051808260018111156105d257fe5b60ff16815260200191505060405180910390f35b610632600480360360408110156105fc57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c44565b005b6106966004803603604081101561064a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c65565b6040518082815260200191505060405180910390f35b6106ee600480360360208110156106c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cec565b005b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107865780601f1061075b57610100808354040283529160200191610786565b820191906000526020600020905b81548152906001019060200180831161076957829003601f168201915b505050505081565b600061079b338484610d0b565b6001905092915050565b6000600254905090565b60006107bc848484610e6e565b610855843361085085600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b610d0b565b600190509392505050565b600660009054906101000a900460ff1681565b600061090e338461090985600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b610d0b565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610968610a7f565b151561097357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610a3c610a7f565b1515610a4757600080fd5b610a51818361107d565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b6d5780601f10610b4257610100808354040283529160200191610b6d565b820191906000526020600020905b815481529060010190602001808311610b5057829003601f168201915b505050505081565b6000610c103384610c0b85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b610d0b565b6001905092915050565b6000610c27338484610e6e565b6001905092915050565b600660019054906101000a900460ff1681565b610c4c610a7f565b1515610c5757600080fd5b610c6181836111d1565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610cf4610a7f565b1515610cff57600080fd5b610d0881611325565b50565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610d4757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610d8357600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610eaa57600080fd5b610efb816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f8e816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115151561104b57600080fd5b600082840390508091505092915050565b600080828401905083811015151561107357600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156110b957600080fd5b6110ce8160025461105c90919063ffffffff16565b600281905550611125816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561120d57600080fd5b6112228160025461103a90919063ffffffff16565b600281905550611279816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561136157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a72305820f78463906e10274fd094b6c616e88b0a499190ef7ae9e61cb7c2d548533b5a840029",
  "deployedBytecode": "0x608060405234801561001057600080fd5b5060043610610133576000357c0100000000000000000000000000000000000000000000000000000000900480638da5cb5b116100bf578063a9059cbb1161008e578063a9059cbb14610554578063b003b127146105ba578063c3501ff6146105e6578063dd62ed3e14610634578063f2fde38b146106ac57610133565b80638da5cb5b146103ff5780638f32d59b1461044957806395d89b411461046b578063a457c2d7146104ee57610133565b8063313ce56711610106578063313ce567146102c557806339509351146102e957806370a082311461034f578063715018a6146103a75780637251cd02146103b157610133565b806306fdde0314610138578063095ea7b3146101bb57806318160ddd1461022157806323b872dd1461023f575b600080fd5b6101406106f0565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610180578082015181840152602081019050610165565b50505050905090810190601f1680156101ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610207600480360360408110156101d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061078e565b604051808215151515815260200191505060405180910390f35b6102296107a5565b6040518082815260200191505060405180910390f35b6102ab6004803603606081101561025557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107af565b604051808215151515815260200191505060405180910390f35b6102cd610860565b604051808260ff1660ff16815260200191505060405180910390f35b610335600480360360408110156102ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610873565b604051808215151515815260200191505060405180910390f35b6103916004803603602081101561036557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610918565b6040518082815260200191505060405180910390f35b6103af610960565b005b6103fd600480360360408110156103c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a34565b005b610407610a55565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610451610a7f565b604051808215151515815260200191505060405180910390f35b610473610ad7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b3578082015181840152602081019050610498565b50505050905090810190601f1680156104e05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61053a6004803603604081101561050457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b75565b604051808215151515815260200191505060405180910390f35b6105a06004803603604081101561056a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c1a565b604051808215151515815260200191505060405180910390f35b6105c2610c31565b604051808260018111156105d257fe5b60ff16815260200191505060405180910390f35b610632600480360360408110156105fc57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c44565b005b6106966004803603604081101561064a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c65565b6040518082815260200191505060405180910390f35b6106ee600480360360208110156106c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cec565b005b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107865780601f1061075b57610100808354040283529160200191610786565b820191906000526020600020905b81548152906001019060200180831161076957829003601f168201915b505050505081565b600061079b338484610d0b565b6001905092915050565b6000600254905090565b60006107bc848484610e6e565b610855843361085085600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b610d0b565b600190509392505050565b600660009054906101000a900460ff1681565b600061090e338461090985600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b610d0b565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610968610a7f565b151561097357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610a3c610a7f565b1515610a4757600080fd5b610a51818361107d565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b6d5780601f10610b4257610100808354040283529160200191610b6d565b820191906000526020600020905b815481529060010190602001808311610b5057829003601f168201915b505050505081565b6000610c103384610c0b85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b610d0b565b6001905092915050565b6000610c27338484610e6e565b6001905092915050565b600660019054906101000a900460ff1681565b610c4c610a7f565b1515610c5757600080fd5b610c6181836111d1565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610cf4610a7f565b1515610cff57600080fd5b610d0881611325565b50565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610d4757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610d8357600080fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610eaa57600080fd5b610efb816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f8e816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115151561104b57600080fd5b600082840390508091505092915050565b600080828401905083811015151561107357600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156110b957600080fd5b6110ce8160025461105c90919063ffffffff16565b600281905550611125816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461105c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561120d57600080fd5b6112228160025461103a90919063ffffffff16565b600281905550611279816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461103a90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561136157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea165627a7a72305820f78463906e10274fd094b6c616e88b0a499190ef7ae9e61cb7c2d548533b5a840029",
  "sourceMap": "1241:1828:12:-;;;1461:254;8:9:-1;5:2;;;30:1;27;20:12;5:2;1461:254:12;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1461:254:12;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;1461:254:12;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;1461:254:12;;;;;;;;;;;;;;;;;524:10:17;515:6;;:19;;;;;;;;;;;;;;;;;;582:6;;;;;;;;;;;549:40;;578:1;549:40;;;;;;;;;;;;1601:9:12;1594:4;:16;;;;;;;;;;;;:::i;:::-;;1629:11;1620:6;:20;;;;;;;;;;;;:::i;:::-;;1661:1;1650:8;;:12;;;;;;;;;;;;;;;;;;1697:10;1686:22;;;;;;;;;;1672:11;;:36;;;;;;;;;;;;;;;;;;;;;;;;1461:254;;;1241:1828;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
  "deployedSourceMap": "1241:1828:12:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1241:1828:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1289:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1289:18:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2721:145:18;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2721:145:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;916:89;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3329:224;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3329:224:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1339:21:12;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4067:200:18;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4067:200:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1217:104;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1217:104:18;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1423:137:17;;;:::i;:::-;;2250:153:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2250:153:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;659:77:17;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;979:90;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1313:20:12;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1313:20:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4786:210:18;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;4786:210:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1948:137;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1948:137:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1367:29:12;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2917:150;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2917:150:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1652:129:18;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1652:129:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1731:107:17;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1731:107:17;;;;;;;;;;;;;;;;;;;:::i;:::-;;1289:18:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2721:145:18:-;2786:4;2802:36;2811:10;2823:7;2832:5;2802:8;:36::i;:::-;2855:4;2848:11;;2721:145;;;;:::o;916:89::-;960:7;986:12;;979:19;;916:89;:::o;3329:224::-;3408:4;3424:26;3434:4;3440:2;3444:5;3424:9;:26::i;:::-;3460:65;3469:4;3475:10;3487:37;3518:5;3487:8;:14;3496:4;3487:14;;;;;;;;;;;;;;;:26;3502:10;3487:26;;;;;;;;;;;;;;;;:30;;:37;;;;:::i;:::-;3460:8;:65::i;:::-;3542:4;3535:11;;3329:224;;;;;:::o;1339:21:12:-;;;;;;;;;;;;;:::o;4067:200:18:-;4147:4;4163:76;4172:10;4184:7;4193:45;4227:10;4193:8;:20;4202:10;4193:20;;;;;;;;;;;;;;;:29;4214:7;4193:29;;;;;;;;;;;;;;;;:33;;:45;;;;:::i;:::-;4163:8;:76::i;:::-;4256:4;4249:11;;4067:200;;;;:::o;1217:104::-;1272:7;1298:9;:16;1308:5;1298:16;;;;;;;;;;;;;;;;1291:23;;1217:104;;;:::o;1423:137:17:-;863:9;:7;:9::i;:::-;855:18;;;;;;;;1521:1;1484:40;;1505:6;;;;;;;;;;;1484:40;;;;;;;;;;;;1551:1;1534:6;;:19;;;;;;;;;;;;;;;;;;1423:137::o;2250:153:12:-;863:9:17;:7;:9::i;:::-;855:18;;;;;;;;2369:27:12;2375:9;2386;2369:5;:27::i;:::-;2250:153;;:::o;659:77:17:-;697:7;723:6;;;;;;;;;;;716:13;;659:77;:::o;979:90::-;1019:4;1056:6;;;;;;;;;;;1042:20;;:10;:20;;;1035:27;;979:90;:::o;1313:20:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4786:210:18:-;4871:4;4887:81;4896:10;4908:7;4917:50;4951:15;4917:8;:20;4926:10;4917:20;;;;;;;;;;;;;;;:29;4938:7;4917:29;;;;;;;;;;;;;;;;:33;;:50;;;;:::i;:::-;4887:8;:81::i;:::-;4985:4;4978:11;;4786:210;;;;:::o;1948:137::-;2009:4;2025:32;2035:10;2047:2;2051:5;2025:9;:32::i;:::-;2074:4;2067:11;;1948:137;;;;:::o;1367:29:12:-;;;;;;;;;;;;;:::o;2917:150::-;863:9:17;:7;:9::i;:::-;855:18;;;;;;;;3032:28:12;3038:8;3048:11;3032:5;:28::i;:::-;2917:150;;:::o;1652:129:18:-;1724:7;1750:8;:15;1759:5;1750:15;;;;;;;;;;;;;;;:24;1766:7;1750:24;;;;;;;;;;;;;;;;1743:31;;1652:129;;;;:::o;1731:107:17:-;863:9;:7;:9::i;:::-;855:18;;;;;;;;1803:28;1822:8;1803:18;:28::i;:::-;1731:107;:::o;6831:248:18:-;6942:1;6923:21;;:7;:21;;;;6915:30;;;;;;;;6980:1;6963:19;;:5;:19;;;;6955:28;;;;;;;;7021:5;6994:8;:15;7003:5;6994:15;;;;;;;;;;;;;;;:24;7010:7;6994:24;;;;;;;;;;;;;;;:32;;;;7057:7;7041:31;;7050:5;7041:31;;;7066:5;7041:31;;;;;;;;;;;;;;;;;;6831:248;;;:::o;5215:256::-;5316:1;5302:16;;:2;:16;;;;5294:25;;;;;;;;5348:26;5368:5;5348:9;:15;5358:4;5348:15;;;;;;;;;;;;;;;;:19;;:26;;;;:::i;:::-;5330:9;:15;5340:4;5330:15;;;;;;;;;;;;;;;:44;;;;5400:24;5418:5;5400:9;:13;5410:2;5400:13;;;;;;;;;;;;;;;;:17;;:24;;;;:::i;:::-;5384:9;:13;5394:2;5384:13;;;;;;;;;;;;;;;:40;;;;5454:2;5439:25;;5448:4;5439:25;;;5458:5;5439:25;;;;;;;;;;;;;;;;;;5215:256;;;:::o;1211:145:16:-;1269:7;1301:1;1296;:6;;1288:15;;;;;;;;1313:9;1329:1;1325;:5;1313:17;;1348:1;1341:8;;;1211:145;;;;:::o;1439:::-;1497:7;1516:9;1532:1;1528;:5;1516:17;;1556:1;1551;:6;;1543:15;;;;;;;;1576:1;1569:8;;;1439:145;;;;:::o;5814:263:18:-;5907:1;5888:21;;:7;:21;;;;5880:30;;;;;;;;5936:23;5953:5;5936:12;;:16;;:23;;;;:::i;:::-;5921:12;:38;;;;5990:29;6013:5;5990:9;:18;6000:7;5990:18;;;;;;;;;;;;;;;;:22;;:29;;;;:::i;:::-;5969:9;:18;5979:7;5969:18;;;;;;;;;;;;;;;:50;;;;6055:7;6034:36;;6051:1;6034:36;;;6064:5;6034:36;;;;;;;;;;;;;;;;;;5814:263;;:::o;6303:::-;6396:1;6377:21;;:7;:21;;;;6369:30;;;;;;;;6425:23;6442:5;6425:12;;:16;;:23;;;;:::i;:::-;6410:12;:38;;;;6479:29;6502:5;6479:9;:18;6489:7;6479:18;;;;;;;;;;;;;;;;:22;;:29;;;;:::i;:::-;6458:9;:18;6468:7;6458:18;;;;;;;;;;;;;;;:50;;;;6549:1;6523:36;;6532:7;6523:36;;;6553:5;6523:36;;;;;;;;;;;;;;;;;;6303:263;;:::o;1982:183:17:-;2075:1;2055:22;;:8;:22;;;;2047:31;;;;;;;;2122:8;2093:38;;2114:6;;;;;;;;;;;2093:38;;;;;;;;;;;;2150:8;2141:6;;:17;;;;;;;;;;;;;;;;;;1982:183;:::o",
  "source": "/*\n    Copyright 2017-2019 Phillip A. Elsasser\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*/\n\npragma solidity 0.5.2;\n\nimport \"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\n\n/// @title Position Token\n/// @notice A token that represents a claim to a collateral pool and a short or long position.\n/// The collateral pool acts as the owner of this contract and controls minting and redemption of these\n/// tokens based on locked collateral in the pool.\n/// NOTE: We eventually can move all of this logic into a library to avoid deploying all of the logic\n/// every time a new market contract is deployed.\n/// @author Phil Elsasser <phil@marketprotocol.io>\ncontract PositionToken is ERC20, Ownable {\n\n    string public name;\n    string public symbol;\n    uint8 public decimals;\n\n    MarketSide public MARKET_SIDE; // 0 = Long, 1 = Short\n    enum MarketSide { Long, Short}\n\n    constructor(\n        string memory tokenName,\n        string memory tokenSymbol,\n        uint8 marketSide\n    ) public\n    {\n        name = tokenName;\n        symbol = tokenSymbol;\n        decimals = 5;\n        MARKET_SIDE = MarketSide(marketSide);\n    }\n\n    /// @dev Called by our MarketContract (owner) to create a long or short position token. These tokens are minted,\n    /// and then transferred to our recipient who is the party who is minting these tokens.  The collateral pool\n    /// is the only caller (acts as the owner) because collateral must be deposited / locked prior to minting of new\n    /// position tokens\n    /// @param qtyToMint quantity of position tokens to mint (in base units)\n    /// @param recipient the person minting and receiving these position tokens.\n    function mintAndSendToken(\n        uint256 qtyToMint,\n        address recipient\n    ) external onlyOwner\n    {\n        _mint(recipient, qtyToMint);\n    }\n\n    /// @dev Called by our MarketContract (owner) when redemption occurs.  This means that either a single user is redeeming\n    /// both short and long tokens in order to claim their collateral, or the contract has settled, and only a single\n    /// side of the tokens are needed to redeem (handled by the collateral pool)\n    /// @param qtyToRedeem quantity of tokens to burn (remove from supply / circulation)\n    /// @param redeemer the person redeeming these tokens (who are we taking the balance from)\n    function redeemToken(\n        uint256 qtyToRedeem,\n        address redeemer\n    ) external onlyOwner\n    {\n        _burn(redeemer, qtyToRedeem);\n    }\n}",
  "sourcePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/PositionToken.sol",
  "ast": {
    "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/PositionToken.sol",
    "exportedSymbols": {
      "PositionToken": [
        2089
      ]
    },
    "id": 2090,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2013,
        "literals": [
          "solidity",
          "0.5",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "608:22:12"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 2014,
        "nodeType": "ImportDirective",
        "scope": 2090,
        "sourceUnit": 2838,
        "src": "632:63:12",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 2015,
        "nodeType": "ImportDirective",
        "scope": 2090,
        "sourceUnit": 2455,
        "src": "696:63:12",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2016,
              "name": "ERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2837,
              "src": "1267:5:12",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ERC20_$2837",
                "typeString": "contract ERC20"
              }
            },
            "id": 2017,
            "nodeType": "InheritanceSpecifier",
            "src": "1267:5:12"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2018,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2454,
              "src": "1274:7:12",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$2454",
                "typeString": "contract Ownable"
              }
            },
            "id": 2019,
            "nodeType": "InheritanceSpecifier",
            "src": "1274:7:12"
          }
        ],
        "contractDependencies": [
          2454,
          2837,
          2937
        ],
        "contractKind": "contract",
        "documentation": "@title Position Token\n @notice A token that represents a claim to a collateral pool and a short or long position.\n The collateral pool acts as the owner of this contract and controls minting and redemption of these\n tokens based on locked collateral in the pool.\n NOTE: We eventually can move all of this logic into a library to avoid deploying all of the logic\n every time a new market contract is deployed.\n @author Phil Elsasser <phil@marketprotocol.io>",
        "fullyImplemented": true,
        "id": 2089,
        "linearizedBaseContracts": [
          2089,
          2454,
          2837,
          2937
        ],
        "name": "PositionToken",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 2021,
            "name": "name",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1289:18:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_storage",
              "typeString": "string"
            },
            "typeName": {
              "id": 2020,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "1289:6:12",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2023,
            "name": "symbol",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1313:20:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_storage",
              "typeString": "string"
            },
            "typeName": {
              "id": 2022,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "1313:6:12",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2025,
            "name": "decimals",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1339:21:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint8",
              "typeString": "uint8"
            },
            "typeName": {
              "id": 2024,
              "name": "uint8",
              "nodeType": "ElementaryTypeName",
              "src": "1339:5:12",
              "typeDescriptions": {
                "typeIdentifier": "t_uint8",
                "typeString": "uint8"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2027,
            "name": "MARKET_SIDE",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1367:29:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_enum$_MarketSide_$2030",
              "typeString": "enum PositionToken.MarketSide"
            },
            "typeName": {
              "contractScope": null,
              "id": 2026,
              "name": "MarketSide",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2030,
              "src": "1367:10:12",
              "typeDescriptions": {
                "typeIdentifier": "t_enum$_MarketSide_$2030",
                "typeString": "enum PositionToken.MarketSide"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "canonicalName": "PositionToken.MarketSide",
            "id": 2030,
            "members": [
              {
                "id": 2028,
                "name": "Long",
                "nodeType": "EnumValue",
                "src": "1443:4:12"
              },
              {
                "id": 2029,
                "name": "Short",
                "nodeType": "EnumValue",
                "src": "1449:5:12"
              }
            ],
            "name": "MarketSide",
            "nodeType": "EnumDefinition",
            "src": "1425:30:12"
          },
          {
            "body": {
              "id": 2057,
              "nodeType": "Block",
              "src": "1584:131:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2041,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2039,
                      "name": "name",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2021,
                      "src": "1594:4:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_storage",
                        "typeString": "string storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2040,
                      "name": "tokenName",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2032,
                      "src": "1601:9:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_memory_ptr",
                        "typeString": "string memory"
                      }
                    },
                    "src": "1594:16:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage",
                      "typeString": "string storage ref"
                    }
                  },
                  "id": 2042,
                  "nodeType": "ExpressionStatement",
                  "src": "1594:16:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2045,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2043,
                      "name": "symbol",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2023,
                      "src": "1620:6:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_storage",
                        "typeString": "string storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2044,
                      "name": "tokenSymbol",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2034,
                      "src": "1629:11:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_memory_ptr",
                        "typeString": "string memory"
                      }
                    },
                    "src": "1620:20:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage",
                      "typeString": "string storage ref"
                    }
                  },
                  "id": 2046,
                  "nodeType": "ExpressionStatement",
                  "src": "1620:20:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2049,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2047,
                      "name": "decimals",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2025,
                      "src": "1650:8:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "35",
                      "id": 2048,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1661:1:12",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_5_by_1",
                        "typeString": "int_const 5"
                      },
                      "value": "5"
                    },
                    "src": "1650:12:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "id": 2050,
                  "nodeType": "ExpressionStatement",
                  "src": "1650:12:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2055,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2051,
                      "name": "MARKET_SIDE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2027,
                      "src": "1672:11:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MarketSide_$2030",
                        "typeString": "enum PositionToken.MarketSide"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2053,
                          "name": "marketSide",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2036,
                          "src": "1697:10:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2052,
                        "name": "MarketSide",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2030,
                        "src": "1686:10:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_MarketSide_$2030_$",
                          "typeString": "type(enum PositionToken.MarketSide)"
                        }
                      },
                      "id": 2054,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1686:22:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MarketSide_$2030",
                        "typeString": "enum PositionToken.MarketSide"
                      }
                    },
                    "src": "1672:36:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MarketSide_$2030",
                      "typeString": "enum PositionToken.MarketSide"
                    }
                  },
                  "id": 2056,
                  "nodeType": "ExpressionStatement",
                  "src": "1672:36:12"
                }
              ]
            },
            "documentation": null,
            "id": 2058,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2037,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2032,
                  "name": "tokenName",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1482:23:12",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 2031,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1482:6:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2034,
                  "name": "tokenSymbol",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1515:25:12",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 2033,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1515:6:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2036,
                  "name": "marketSide",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1550:16:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2035,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "1550:5:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1472:100:12"
            },
            "returnParameters": {
              "id": 2038,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1584:0:12"
            },
            "scope": 2089,
            "src": "1461:254:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2072,
              "nodeType": "Block",
              "src": "2359:44:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2068,
                        "name": "recipient",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2062,
                        "src": "2375:9:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2069,
                        "name": "qtyToMint",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2060,
                        "src": "2386:9:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2067,
                      "name": "_mint",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2726,
                      "src": "2369:5:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 2070,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2369:27:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2071,
                  "nodeType": "ExpressionStatement",
                  "src": "2369:27:12"
                }
              ]
            },
            "documentation": "@dev Called by our MarketContract (owner) to create a long or short position token. These tokens are minted,\n and then transferred to our recipient who is the party who is minting these tokens.  The collateral pool\n is the only caller (acts as the owner) because collateral must be deposited / locked prior to minting of new\n position tokens\n @param qtyToMint quantity of position tokens to mint (in base units)\n @param recipient the person minting and receiving these position tokens.",
            "id": 2073,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2065,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2064,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2388,
                  "src": "2345:9:12",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2345:9:12"
              }
            ],
            "name": "mintAndSendToken",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2063,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2060,
                  "name": "qtyToMint",
                  "nodeType": "VariableDeclaration",
                  "scope": 2073,
                  "src": "2285:17:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2059,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2285:7:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2062,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 2073,
                  "src": "2312:17:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2061,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2312:7:12",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2275:60:12"
            },
            "returnParameters": {
              "id": 2066,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2359:0:12"
            },
            "scope": 2089,
            "src": "2250:153:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 2087,
              "nodeType": "Block",
              "src": "3022:45:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2083,
                        "name": "redeemer",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2077,
                        "src": "3038:8:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2084,
                        "name": "qtyToRedeem",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2075,
                        "src": "3048:11:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2082,
                      "name": "_burn",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2768,
                      "src": "3032:5:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 2085,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3032:28:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2086,
                  "nodeType": "ExpressionStatement",
                  "src": "3032:28:12"
                }
              ]
            },
            "documentation": "@dev Called by our MarketContract (owner) when redemption occurs.  This means that either a single user is redeeming\n both short and long tokens in order to claim their collateral, or the contract has settled, and only a single\n side of the tokens are needed to redeem (handled by the collateral pool)\n @param qtyToRedeem quantity of tokens to burn (remove from supply / circulation)\n @param redeemer the person redeeming these tokens (who are we taking the balance from)",
            "id": 2088,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2080,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2079,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2388,
                  "src": "3008:9:12",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3008:9:12"
              }
            ],
            "name": "redeemToken",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2078,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2075,
                  "name": "qtyToRedeem",
                  "nodeType": "VariableDeclaration",
                  "scope": 2088,
                  "src": "2947:19:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2074,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2947:7:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2077,
                  "name": "redeemer",
                  "nodeType": "VariableDeclaration",
                  "scope": 2088,
                  "src": "2976:16:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2076,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2976:7:12",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2937:61:12"
            },
            "returnParameters": {
              "id": 2081,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3022:0:12"
            },
            "scope": 2089,
            "src": "2917:150:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 2090,
        "src": "1241:1828:12"
      }
    ],
    "src": "608:2461:12"
  },
  "legacyAST": {
    "absolutePath": "/home/travis/build/MARKETProtocol/MARKETProtocol/contracts/tokens/PositionToken.sol",
    "exportedSymbols": {
      "PositionToken": [
        2089
      ]
    },
    "id": 2090,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2013,
        "literals": [
          "solidity",
          "0.5",
          ".2"
        ],
        "nodeType": "PragmaDirective",
        "src": "608:22:12"
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "file": "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol",
        "id": 2014,
        "nodeType": "ImportDirective",
        "scope": 2090,
        "sourceUnit": 2838,
        "src": "632:63:12",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
        "id": 2015,
        "nodeType": "ImportDirective",
        "scope": 2090,
        "sourceUnit": 2455,
        "src": "696:63:12",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2016,
              "name": "ERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2837,
              "src": "1267:5:12",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ERC20_$2837",
                "typeString": "contract ERC20"
              }
            },
            "id": 2017,
            "nodeType": "InheritanceSpecifier",
            "src": "1267:5:12"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2018,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2454,
              "src": "1274:7:12",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$2454",
                "typeString": "contract Ownable"
              }
            },
            "id": 2019,
            "nodeType": "InheritanceSpecifier",
            "src": "1274:7:12"
          }
        ],
        "contractDependencies": [
          2454,
          2837,
          2937
        ],
        "contractKind": "contract",
        "documentation": "@title Position Token\n @notice A token that represents a claim to a collateral pool and a short or long position.\n The collateral pool acts as the owner of this contract and controls minting and redemption of these\n tokens based on locked collateral in the pool.\n NOTE: We eventually can move all of this logic into a library to avoid deploying all of the logic\n every time a new market contract is deployed.\n @author Phil Elsasser <phil@marketprotocol.io>",
        "fullyImplemented": true,
        "id": 2089,
        "linearizedBaseContracts": [
          2089,
          2454,
          2837,
          2937
        ],
        "name": "PositionToken",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 2021,
            "name": "name",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1289:18:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_storage",
              "typeString": "string"
            },
            "typeName": {
              "id": 2020,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "1289:6:12",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2023,
            "name": "symbol",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1313:20:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_storage",
              "typeString": "string"
            },
            "typeName": {
              "id": 2022,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "1313:6:12",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2025,
            "name": "decimals",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1339:21:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint8",
              "typeString": "uint8"
            },
            "typeName": {
              "id": 2024,
              "name": "uint8",
              "nodeType": "ElementaryTypeName",
              "src": "1339:5:12",
              "typeDescriptions": {
                "typeIdentifier": "t_uint8",
                "typeString": "uint8"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2027,
            "name": "MARKET_SIDE",
            "nodeType": "VariableDeclaration",
            "scope": 2089,
            "src": "1367:29:12",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_enum$_MarketSide_$2030",
              "typeString": "enum PositionToken.MarketSide"
            },
            "typeName": {
              "contractScope": null,
              "id": 2026,
              "name": "MarketSide",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2030,
              "src": "1367:10:12",
              "typeDescriptions": {
                "typeIdentifier": "t_enum$_MarketSide_$2030",
                "typeString": "enum PositionToken.MarketSide"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "canonicalName": "PositionToken.MarketSide",
            "id": 2030,
            "members": [
              {
                "id": 2028,
                "name": "Long",
                "nodeType": "EnumValue",
                "src": "1443:4:12"
              },
              {
                "id": 2029,
                "name": "Short",
                "nodeType": "EnumValue",
                "src": "1449:5:12"
              }
            ],
            "name": "MarketSide",
            "nodeType": "EnumDefinition",
            "src": "1425:30:12"
          },
          {
            "body": {
              "id": 2057,
              "nodeType": "Block",
              "src": "1584:131:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2041,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2039,
                      "name": "name",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2021,
                      "src": "1594:4:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_storage",
                        "typeString": "string storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2040,
                      "name": "tokenName",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2032,
                      "src": "1601:9:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_memory_ptr",
                        "typeString": "string memory"
                      }
                    },
                    "src": "1594:16:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage",
                      "typeString": "string storage ref"
                    }
                  },
                  "id": 2042,
                  "nodeType": "ExpressionStatement",
                  "src": "1594:16:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2045,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2043,
                      "name": "symbol",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2023,
                      "src": "1620:6:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_storage",
                        "typeString": "string storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2044,
                      "name": "tokenSymbol",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2034,
                      "src": "1629:11:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_string_memory_ptr",
                        "typeString": "string memory"
                      }
                    },
                    "src": "1620:20:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage",
                      "typeString": "string storage ref"
                    }
                  },
                  "id": 2046,
                  "nodeType": "ExpressionStatement",
                  "src": "1620:20:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2049,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2047,
                      "name": "decimals",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2025,
                      "src": "1650:8:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint8",
                        "typeString": "uint8"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "35",
                      "id": 2048,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1661:1:12",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_5_by_1",
                        "typeString": "int_const 5"
                      },
                      "value": "5"
                    },
                    "src": "1650:12:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "id": 2050,
                  "nodeType": "ExpressionStatement",
                  "src": "1650:12:12"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2055,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2051,
                      "name": "MARKET_SIDE",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2027,
                      "src": "1672:11:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MarketSide_$2030",
                        "typeString": "enum PositionToken.MarketSide"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 2053,
                          "name": "marketSide",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2036,
                          "src": "1697:10:12",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        ],
                        "id": 2052,
                        "name": "MarketSide",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2030,
                        "src": "1686:10:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_MarketSide_$2030_$",
                          "typeString": "type(enum PositionToken.MarketSide)"
                        }
                      },
                      "id": 2054,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1686:22:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MarketSide_$2030",
                        "typeString": "enum PositionToken.MarketSide"
                      }
                    },
                    "src": "1672:36:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MarketSide_$2030",
                      "typeString": "enum PositionToken.MarketSide"
                    }
                  },
                  "id": 2056,
                  "nodeType": "ExpressionStatement",
                  "src": "1672:36:12"
                }
              ]
            },
            "documentation": null,
            "id": 2058,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2037,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2032,
                  "name": "tokenName",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1482:23:12",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 2031,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1482:6:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2034,
                  "name": "tokenSymbol",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1515:25:12",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 2033,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1515:6:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2036,
                  "name": "marketSide",
                  "nodeType": "VariableDeclaration",
                  "scope": 2058,
                  "src": "1550:16:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2035,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "1550:5:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1472:100:12"
            },
            "returnParameters": {
              "id": 2038,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1584:0:12"
            },
            "scope": 2089,
            "src": "1461:254:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2072,
              "nodeType": "Block",
              "src": "2359:44:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2068,
                        "name": "recipient",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2062,
                        "src": "2375:9:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2069,
                        "name": "qtyToMint",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2060,
                        "src": "2386:9:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2067,
                      "name": "_mint",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2726,
                      "src": "2369:5:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 2070,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2369:27:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2071,
                  "nodeType": "ExpressionStatement",
                  "src": "2369:27:12"
                }
              ]
            },
            "documentation": "@dev Called by our MarketContract (owner) to create a long or short position token. These tokens are minted,\n and then transferred to our recipient who is the party who is minting these tokens.  The collateral pool\n is the only caller (acts as the owner) because collateral must be deposited / locked prior to minting of new\n position tokens\n @param qtyToMint quantity of position tokens to mint (in base units)\n @param recipient the person minting and receiving these position tokens.",
            "id": 2073,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2065,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2064,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2388,
                  "src": "2345:9:12",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2345:9:12"
              }
            ],
            "name": "mintAndSendToken",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2063,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2060,
                  "name": "qtyToMint",
                  "nodeType": "VariableDeclaration",
                  "scope": 2073,
                  "src": "2285:17:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2059,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2285:7:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2062,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 2073,
                  "src": "2312:17:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2061,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2312:7:12",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2275:60:12"
            },
            "returnParameters": {
              "id": 2066,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2359:0:12"
            },
            "scope": 2089,
            "src": "2250:153:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 2087,
              "nodeType": "Block",
              "src": "3022:45:12",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2083,
                        "name": "redeemer",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2077,
                        "src": "3038:8:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2084,
                        "name": "qtyToRedeem",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2075,
                        "src": "3048:11:12",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2082,
                      "name": "_burn",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2768,
                      "src": "3032:5:12",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 2085,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3032:28:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2086,
                  "nodeType": "ExpressionStatement",
                  "src": "3032:28:12"
                }
              ]
            },
            "documentation": "@dev Called by our MarketContract (owner) when redemption occurs.  This means that either a single user is redeeming\n both short and long tokens in order to claim their collateral, or the contract has settled, and only a single\n side of the tokens are needed to redeem (handled by the collateral pool)\n @param qtyToRedeem quantity of tokens to burn (remove from supply / circulation)\n @param redeemer the person redeeming these tokens (who are we taking the balance from)",
            "id": 2088,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 2080,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 2079,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2388,
                  "src": "3008:9:12",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3008:9:12"
              }
            ],
            "name": "redeemToken",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2078,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2075,
                  "name": "qtyToRedeem",
                  "nodeType": "VariableDeclaration",
                  "scope": 2088,
                  "src": "2947:19:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2074,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2947:7:12",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2077,
                  "name": "redeemer",
                  "nodeType": "VariableDeclaration",
                  "scope": 2088,
                  "src": "2976:16:12",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2076,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2976:7:12",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2937:61:12"
            },
            "returnParameters": {
              "id": 2081,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3022:0:12"
            },
            "scope": 2089,
            "src": "2917:150:12",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 2090,
        "src": "1241:1828:12"
      }
    ],
    "src": "608:2461:12"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.2+commit.1df8f40c.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.9",
  "updatedAt": "2019-05-28T23:53:01.597Z",
  "devdoc": {
    "author": "Phil Elsasser <phil@marketprotocol.io>",
    "methods": {
      "allowance(address,address)": {
        "details": "Function to check the amount of tokens that an owner allowed to a spender.",
        "params": {
          "owner": "address The address which owns the funds.",
          "spender": "address The address which will spend the funds."
        },
        "return": "A uint256 specifying the amount of tokens still available for the spender."
      },
      "approve(address,uint256)": {
        "details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729",
        "params": {
          "spender": "The address which will spend the funds.",
          "value": "The amount of tokens to be spent."
        }
      },
      "balanceOf(address)": {
        "details": "Gets the balance of the specified address.",
        "params": {
          "owner": "The address to query the balance of."
        },
        "return": "A uint256 representing the amount owned by the passed address."
      },
      "decreaseAllowance(address,uint256)": {
        "details": "Decrease the amount of tokens that an owner allowed to a spender. approve should be called when _allowed[msg.sender][spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.",
        "params": {
          "spender": "The address which will spend the funds.",
          "subtractedValue": "The amount of tokens to decrease the allowance by."
        }
      },
      "increaseAllowance(address,uint256)": {
        "details": "Increase the amount of tokens that an owner allowed to a spender. approve should be called when _allowed[msg.sender][spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.",
        "params": {
          "addedValue": "The amount of tokens to increase the allowance by.",
          "spender": "The address which will spend the funds."
        }
      },
      "isOwner()": {
        "return": "true if `msg.sender` is the owner of the contract."
      },
      "mintAndSendToken(uint256,address)": {
        "details": "Called by our MarketContract (owner) to create a long or short position token. These tokens are minted, and then transferred to our recipient who is the party who is minting these tokens.  The collateral pool is the only caller (acts as the owner) because collateral must be deposited / locked prior to minting of new position tokens",
        "params": {
          "qtyToMint": "quantity of position tokens to mint (in base units)",
          "recipient": "the person minting and receiving these position tokens."
        }
      },
      "owner()": {
        "return": "the address of the owner."
      },
      "redeemToken(uint256,address)": {
        "details": "Called by our MarketContract (owner) when redemption occurs.  This means that either a single user is redeeming both short and long tokens in order to claim their collateral, or the contract has settled, and only a single side of the tokens are needed to redeem (handled by the collateral pool)",
        "params": {
          "qtyToRedeem": "quantity of tokens to burn (remove from supply / circulation)",
          "redeemer": "the person redeeming these tokens (who are we taking the balance from)"
        }
      },
      "renounceOwnership()": {
        "details": "Allows the current owner to relinquish control of the contract. It will not be possible to call the functions with the `onlyOwner` modifier anymore."
      },
      "totalSupply()": {
        "details": "Total number of tokens in existence"
      },
      "transfer(address,uint256)": {
        "details": "Transfer token to a specified address",
        "params": {
          "to": "The address to transfer to.",
          "value": "The amount to be transferred."
        }
      },
      "transferFrom(address,address,uint256)": {
        "details": "Transfer tokens from one address to another. Note that while this function emits an Approval event, this is not required as per the specification, and other compliant implementations may not emit the event.",
        "params": {
          "from": "address The address which you want to send tokens from",
          "to": "address The address which you want to transfer to",
          "value": "uint256 the amount of tokens to be transferred"
        }
      },
      "transferOwnership(address)": {
        "details": "Allows the current owner to transfer control of the contract to a newOwner.",
        "params": {
          "newOwner": "The address to transfer ownership to."
        }
      }
    },
    "title": "Position Token"
  },
  "userdoc": {
    "methods": {
      "renounceOwnership()": {
        "notice": "Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
      }
    },
    "notice": "A token that represents a claim to a collateral pool and a short or long position. The collateral pool acts as the owner of this contract and controls minting and redemption of these tokens based on locked collateral in the pool. NOTE: We eventually can move all of this logic into a library to avoid deploying all of the logic every time a new market contract is deployed."
  }
}