{
  "contractName": "UniswapOracle",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_factory",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "inputs": [],
      "name": "PERIOD",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "factory",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_tokenIn",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_tokenOut",
          "type": "address"
        }
      ],
      "name": "update",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_tokenIn",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_amountIn",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "_tokenOut",
          "type": "address"
        }
      ],
      "name": "consult",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "_amountOut",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_tokenIn",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "_amountIn",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "_tokenOut",
          "type": "address"
        }
      ],
      "name": "updateAndConsult",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "_amountOut",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.6.10+commit.00c0fcaf\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenOut\",\"type\":\"address\"}],\"name\":\"consult\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenOut\",\"type\":\"address\"}],\"name\":\"update\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenOut\",\"type\":\"address\"}],\"name\":\"updateAndConsult\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"update(address,address)\":{\"details\":\"For the first 24 hours the rate will be 0.\"}}},\"userdoc\":{\"methods\":{\"consult(address,uint256,address)\":{\"notice\":\"Returns the rate after `update` has been called.\"},\"update(address,address)\":{\"notice\":\"Updates and stores the exchange rate\"},\"updateAndConsult(address,uint256,address)\":{\"notice\":\"Calls `update` and returns the rate in a single call\"}}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/protocols/Uniswap/UniswapOracle.sol\":\"UniswapOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":2000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c\",\"dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR\"]},\"@uniswap/lib/contracts/libraries/Babylonian.sol\":{\"keccak256\":\"0x2799682d733a6ef3aae1dce7dbe2cff5513f0244e4abd07338fe7a45c8fd9733\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://332968199300fe6025b9ad8f3d69f252ec2a3a092fa42a0ef7f2d1397f59a7e5\",\"dweb:/ipfs/Qme4wBzDwfHr7zHk8WrCwCpozpt4KHuDQSxfJTDoHL8Pdi\"]},\"@uniswap/lib/contracts/libraries/BitMath.sol\":{\"keccak256\":\"0x0ef2d7cd41b3f1818fa41019b38948489238efccebe428d4b04919174378abf5\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://696ac37d8731506cbac9b428afb7bdfa35a490df139022be2b04ab3815113cf4\",\"dweb:/ipfs/QmUQ5ty49YATw4Gf5PrtFkxNErcnwhNUpRF3WFaVJxATf9\"]},\"@uniswap/lib/contracts/libraries/FixedPoint.sol\":{\"keccak256\":\"0x0e8d7f2bfad7505f9d029ea060eab9747363d50bf01f2d954bf719da6fac342f\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://35dd605e2fd59d2606529ab1575cd937082018cd041cfbb843b68e97e440b9b0\",\"dweb:/ipfs/QmUHbzyCdzwUSCUPVFFm9N6oKXiisVdscX8H73nwNXmmpV\"]},\"@uniswap/lib/contracts/libraries/FullMath.sol\":{\"keccak256\":\"0xf3dd7fc13a7eee86c17cdfe13b03a7f24ebaf09588550b64b581ae7b2bd59273\",\"license\":\"CC-BY-4.0\",\"urls\":[\"bzz-raw://492ced3afa929c790c9b1314b86454a977528e8f3d408a55b1275a396154d097\",\"dweb:/ipfs/QmbX2YAgtoM13Z2MRnV5WnUpzmw3fMxmhzCnsKKxQUjGJJ\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\":{\"keccak256\":\"0xe5905c0989cf5a865ed9bb7b9252536ca011c5b744017a82a7d4443b9c00a891\",\"urls\":[\"bzz-raw://5d2a90a0a796491507462a3da18c3f8819721d571572d765a2207c35bf0a0389\",\"dweb:/ipfs/Qmf9ACYiT3qzjgsYuhm866FBdiBpRMXAPpQhSFbgqcyhHt\"]},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\",\"urls\":[\"bzz-raw://85d5ad2dd23ee127f40907a12865a1e8cb5828814f6f2480285e1827dd72dedf\",\"dweb:/ipfs/QmayKQWJgWmr46DqWseADyUanmqxh662hPNdAkdHRjiQQH\"]},\"@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol\":{\"keccak256\":\"0x993538630a9568290c39140d54c034a66cf1b95cdeef4ba804a948c4ee2fc311\",\"urls\":[\"bzz-raw://adff017b539750d5ac84403360967c4d6b02a1ee9b8f2487f0bcddd7fa7c523e\",\"dweb:/ipfs/QmQqUiUvoezf33f2SZa64M8KgksHSXFPrGuwDvxijtXYMo\"]},\"project:/contracts/protocols/Uniswap/IUniswapOracle.sol\":{\"keccak256\":\"0x05b6d798d77c056327991f472b01b7cba705b0136da35e6ab7253029f08d147a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e2e55aca59c764faafc065bc48086dbb53afbfc02f47c76aebaadd730c635507\",\"dweb:/ipfs/QmeGfMkeibFNkM1ewT5LutvF1Z9XvfCVPSgVz6FTiKNfqG\"]},\"project:/contracts/protocols/Uniswap/UniswapOracle.sol\":{\"keccak256\":\"0xed121ed35d335a397fba79e7dc0d63fc8aca5815a94ab6bd86a2faa07814c590\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://86cc1f263514f7bcaf6a511eb571667252821f25ae5f099403c25375cd38cb9d\",\"dweb:/ipfs/QmYn2upw6fQJkq3rFD2nC8YvXPjrZfKwPadtMNYJ2aaZWe\"]},\"project:/contracts/protocols/Uniswap/UniswapV2Library.sol\":{\"keccak256\":\"0x65165b942a31dbf2bbd457075244dc8de9914d1b242568a26e310e12d824e8b9\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8e2724628228ef70e3df52f2fa11a3f6825ff9427af700988d051f3d7dad740c\",\"dweb:/ipfs/QmUo6akdzoDwSdtrbVB75BGAA9qE2KCuURVrisTTHiWnCY\"]}},\"version\":1}",
  "bytecode": "0x60a060405234801561001057600080fd5b50604051610c12380380610c128339818101604052602081101561003357600080fd5b5051606081901b6001600160601b0319166080526001600160a01b0316610ba1610071600039806101825280610302528061032b5250610ba16000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063c1e553e711610050578063c1e553e7146100c9578063c45a01551461010c578063c640752d1461013d57610067565b80638c86f1e41461006c578063b4d1d795146100c1575b600080fd5b6100af6004803603606081101561008257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040909101351661017a565b60408051918252519081900360200190f35b6100af6102da565b6100af600480360360608110156100df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013591604090910135166102e1565b610114610300565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101786004803603604081101561015357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610324565b005b6000806101a87f000000000000000000000000000000000000000000000000000000000000000086856104c5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081209192506101da87866105b0565b5090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141561027557604080516020810190915260038301547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261025a90610255908863ffffffff61070316565b6107c6565b71ffffffffffffffffffffffffffffffffffff1693506102d0565b604080516020810190915260048301547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681526102b990610255908863ffffffff61070316565b71ffffffffffffffffffffffffffffffffffff1693505b5050509392505050565b6201518081565b60006102ed8483610324565b6102f884848461017a565b949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006103517f000000000000000000000000000000000000000000000000000000000000000084846104c5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081209192508080610384856107cd565b925092509250600084600001548263ffffffff16039050620151808163ffffffff16106104bb576001850154156104a35760405180602001604052808263ffffffff1687600101548703816103d557fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915290516003870180547fffffffff00000000000000000000000000000000000000000000000000000000169190921617905560408051602081019091526002860154819063ffffffff84169086038161044d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915290516004870180547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790555b600185018490556002850183905563ffffffff821685555b5050505050505050565b60008060006104d485856105b0565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610638576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610b476025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610672578284610675565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166106fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b61070b610b21565b600082158061074657505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168281029083828161074357fe5b04145b6107b157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4669786564506f696e743a204d554c5f4f564552464c4f570000000000000000604482015290519081900360640190fd5b60408051602081019091529081529392505050565b5160701c90565b60008060006107da610a1f565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561082257600080fd5b505afa158015610836573d6000803e3d6000fd5b505050506040513d602081101561084c57600080fd5b5051604080517f5a3d5493000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff861691635a3d549391600480820192602092909190829003018186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d60208110156108e257600080fd5b5051604080517f0902f1ac00000000000000000000000000000000000000000000000000000000815290519193506000918291829173ffffffffffffffffffffffffffffffffffffffff891691630902f1ac916004808301926060929190829003018186803b15801561095457600080fd5b505afa158015610968573d6000803e3d6000fd5b505050506040513d606081101561097e57600080fd5b5080516020820151604090920151909450909250905063ffffffff80821690851614610a155780840363ffffffff81166109b88486610a29565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602969096019563ffffffff81166109ee8585610a29565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509193909250565b63ffffffff421690565b610a31610b34565b6000826dffffffffffffffffffffffffffff1611610ab057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4669786564506f696e743a204449565f42595f5a45524f5f4652414354494f4e604482015290519081900360640190fd5b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b1681610af757fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056fe556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553a26469706673582212205208d9920c4bbfc57b832303162b811d7b986182e42bd68e676ea1d7b5209f8164736f6c634300060a0033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c8063c1e553e711610050578063c1e553e7146100c9578063c45a01551461010c578063c640752d1461013d57610067565b80638c86f1e41461006c578063b4d1d795146100c1575b600080fd5b6100af6004803603606081101561008257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040909101351661017a565b60408051918252519081900360200190f35b6100af6102da565b6100af600480360360608110156100df57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013591604090910135166102e1565b610114610300565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101786004803603604081101561015357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610324565b005b6000806101a87f000000000000000000000000000000000000000000000000000000000000000086856104c5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081209192506101da87866105b0565b5090508073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141561027557604080516020810190915260038301547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815261025a90610255908863ffffffff61070316565b6107c6565b71ffffffffffffffffffffffffffffffffffff1693506102d0565b604080516020810190915260048301547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1681526102b990610255908863ffffffff61070316565b71ffffffffffffffffffffffffffffffffffff1693505b5050509392505050565b6201518081565b60006102ed8483610324565b6102f884848461017a565b949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006103517f000000000000000000000000000000000000000000000000000000000000000084846104c5565b73ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604081209192508080610384856107cd565b925092509250600084600001548263ffffffff16039050620151808163ffffffff16106104bb576001850154156104a35760405180602001604052808263ffffffff1687600101548703816103d557fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915290516003870180547fffffffff00000000000000000000000000000000000000000000000000000000169190921617905560408051602081019091526002860154819063ffffffff84169086038161044d57fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915290516004870180547fffffffff0000000000000000000000000000000000000000000000000000000016919092161790555b600185018490556002850183905563ffffffff821685555b5050505050505050565b60008060006104d485856105b0565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610638576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610b476025913960400191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610672578284610675565b83835b909250905073ffffffffffffffffffffffffffffffffffffffff82166106fc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b61070b610b21565b600082158061074657505082517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff168281029083828161074357fe5b04145b6107b157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4669786564506f696e743a204d554c5f4f564552464c4f570000000000000000604482015290519081900360640190fd5b60408051602081019091529081529392505050565b5160701c90565b60008060006107da610a1f565b90508373ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561082257600080fd5b505afa158015610836573d6000803e3d6000fd5b505050506040513d602081101561084c57600080fd5b5051604080517f5a3d5493000000000000000000000000000000000000000000000000000000008152905191945073ffffffffffffffffffffffffffffffffffffffff861691635a3d549391600480820192602092909190829003018186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d60208110156108e257600080fd5b5051604080517f0902f1ac00000000000000000000000000000000000000000000000000000000815290519193506000918291829173ffffffffffffffffffffffffffffffffffffffff891691630902f1ac916004808301926060929190829003018186803b15801561095457600080fd5b505afa158015610968573d6000803e3d6000fd5b505050506040513d606081101561097e57600080fd5b5080516020820151604090920151909450909250905063ffffffff80821690851614610a155780840363ffffffff81166109b88486610a29565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1602969096019563ffffffff81166109ee8585610a29565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16029590950194505b5050509193909250565b63ffffffff421690565b610a31610b34565b6000826dffffffffffffffffffffffffffff1611610ab057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4669786564506f696e743a204449565f42595f5a45524f5f4652414354494f4e604482015290519081900360640190fd5b6040805160208101909152806dffffffffffffffffffffffffffff84167bffffffffffffffffffffffffffff0000000000000000000000000000607087901b1681610af757fe5b047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16815250905092915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056fe556e697377617056324c6962726172793a204944454e544943414c5f414444524553534553a26469706673582212205208d9920c4bbfc57b832303162b811d7b986182e42bd68e676ea1d7b5209f8164736f6c634300060a0033",
  "immutableReferences": {
    "2940": [
      {
        "length": 32,
        "start": 386
      },
      {
        "length": 32,
        "start": 770
      },
      {
        "length": 32,
        "start": 811
      }
    ]
  },
  "sourceMap": "620:2887:14:-:0;;;1112:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1112:76:14;1165:18;;;;-1:-1:-1;;;;;;1165:18:14;;;-1:-1:-1;;;;;620:2887:14;;;;;;;;",
  "deployedSourceMap": "620:2887:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2626:562;;;;;;;;;;;;;;;;-1:-1:-1;2626:562:14;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;877:47;;;:::i;3272:233::-;;;;;;;;;;;;;;;;-1:-1:-1;3272:233:14;;;;;;;;;;;;;;;;;;:::i;928:41::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1307:1241;;;;;;;;;;;;;;;;-1:-1:-1;1307:1241:14;;;;;;;;;;;:::i;:::-;;2626:562;2746:15;2771:12;2786:54;2811:7;2820:8;2830:9;2786:24;:54::i;:::-;2880:22;;;2846:31;2880:22;;;;;;;;;;2771:69;;-1:-1:-1;2928:48:14;2956:8;2966:9;2928:27;:48::i;:::-;2908:68;;;2998:6;2986:18;;:8;:18;;;2982:202;;;3031:29;;;;;;;;;:25;;;:29;;;;;:52;;:40;;3061:9;3031:40;:29;:40;:::i;:::-;:50;:52::i;:::-;3018:65;;;;2982:202;;;3125:29;;;;;;;;;:25;;;:29;;;;;:52;;:40;;3155:9;3125:40;:29;:40;:::i;:52::-;3112:65;;;;2982:202;2626:562;;;;;;;;:::o;877:47::-;916:8;877:47;:::o;3272:233::-;3396:15;3421:27;3428:8;3438:9;3421:6;:27::i;:::-;3461:39;3469:8;3479:9;3490;3461:7;:39::i;:::-;3454:46;3272:233;-1:-1:-1;;;;3272:233:14:o;928:41::-;;;:::o;1307:1241::-;1396:12;1411:54;1436:7;1445:8;1455:9;1411:24;:54::i;:::-;1505:22;;;1471:31;1505:22;;;;;;;;;;1396:69;;-1:-1:-1;1471:31:14;;1611:61;1396:69;1611:46;:61::i;:::-;1533:139;;;;;;1678:18;1723:11;:21;;;1706:14;:38;;;1678:67;;916:8;1855:11;:21;;;1852:692;;1893:28;;;;:32;1890:492;;2147:94;;;;;;;;2228:11;2176:63;;2196:11;:28;;;2177:16;:47;2176:63;;;;;;2147:94;;;;;;;2119:122;;:25;;;:122;;;;;;;;;;;2279:94;;;;;;;;;2328:28;;;;2279:94;;2308:63;;;;2309:47;;2308:63;;;;;;2279:94;;;;;;;2251:122;;:25;;;:122;;;;;;;;;;;1890:492;2389:28;;;:47;;;2444:28;;;:47;;;2499:38;;;;;1852:692;1307:1241;;;;;;;;:::o;936:470:15:-;1025:12;1050:14;1066;1084:26;1095:6;1103;1084:10;:26::i;:::-;1244:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1234:43;;;;;;1150:246;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1140:257;;;;;;;;;936:470;-1:-1:-1;;;;;936:470:15:o;502:345::-;577:14;593;637:6;627:16;;:6;:16;;;;619:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;723:6;714:15;;:6;:15;;;:53;;752:6;760;714:53;;;733:6;741;714:53;695:72;;-1:-1:-1;695:72:15;-1:-1:-1;785:20:15;;;777:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;502:345;;;;;:::o;1676:236:4:-;1746:16;;:::i;:::-;1774:9;1805:6;;;:42;;-1:-1:-1;;1840:7:4;;1815:32;;1820:11;;;;1835:1;1820:11;1835:1;1815:21;;;;;:32;1805:42;1797:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1893:12;;;;;;;;;;;;;1676:236;-1:-1:-1;;;1676:236:4:o;1454:128::-;1553:7;532:3;1553:21;;1454:128::o;646:1040:8:-;730:21;753;776;826:23;:21;:23::i;:::-;809:40;;893:4;878:41;;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;878:43:8;950;;;;;;;;878;;-1:-1:-1;950:41:8;;;;;;:43;;;;;878;;950;;;;;;;;:41;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;950:43:8;1170:34;;;;;;;;950:43;;-1:-1:-1;1105:16:8;;;;;;1170:32;;;;;;:34;;;;;;;;;;;;;;:32;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1170:34:8;;;;;;;;;;;;;-1:-1:-1;1170:34:8;;-1:-1:-1;1170:34:8;-1:-1:-1;1218:36:8;;;;;;;;1214:466;;1338:35;;;1481:62;;;1486:39;1506:8;1516;1486:19;:39::i;:::-;:42;1481:48;;:62;1461:82;;;;;1607:62;;;1612:39;1632:8;1642;1612:19;:39::i;:::-;:42;1607:48;;:62;1587:82;;;;;-1:-1:-1;1214:466:8;646:1040;;;;;;;;:::o;422:121::-;510:25;:15;:25;;422:121::o;4489:252:4:-;4570:16;;:::i;:::-;4620:1;4606:11;:15;;;4598:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4675:59;;;;;;;;;;4685:48;;;4686:32;532:3;4686:32;;;;4685:48;;;;;;4675:59;;;;;4668:66;;4489:252;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o",
  "source": "\n// SPDX-License-Identifier: GPL-3.0\n// Original source: https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/examples\n// Modified to unpin solidity version and to support multiple pairs\npragma solidity ^0.6.6;\n\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\nimport '@uniswap/lib/contracts/libraries/FixedPoint.sol';\nimport '@openzeppelin/contracts/math/SafeMath.sol';\nimport '@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol';\nimport './UniswapV2Library.sol';\nimport './IUniswapOracle.sol';\n\ncontract UniswapOracle is IUniswapOracle\n{ \n  using FixedPoint for *;\n\n  struct Observation\n  {\n    uint timestamp;\n    uint price0Cumulative;\n    uint price1Cumulative;\n    FixedPoint.uq112x112 price0Average;\n    FixedPoint.uq112x112 price1Average;\n  }\n\n  uint public override constant PERIOD = 24 hours;\n  address public override immutable factory;\n  // mapping from pair address to a list of price observations of that pair\n  mapping(address => Observation) private pairObservations;\n  \n  constructor(\n    address _factory\n  ) public\n  {\n    factory = _factory;\n  }\n\n  /**\n   * @notice Updates and stores the exchange rate\n   * @dev For the first 24 hours the rate will be 0.\n   */\n  function update(\n    address _tokenIn,\n    address _tokenOut\n  ) public override\n  {\n    address pair = UniswapV2Library.pairFor(factory, _tokenIn, _tokenOut);\n    Observation storage observation = pairObservations[pair];\n    (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) =\n      UniswapV2OracleLibrary.currentCumulativePrices(address(pair));\n    uint32 timeElapsed = uint32(blockTimestamp - observation.timestamp); // overflow is desired\n\n    // ensure that at least one full period has passed since the last update\n    if(timeElapsed >= PERIOD)\n    {\n      if(observation.price0Cumulative > 0)\n      {\n        // overflow is desired, casting never truncates\n        // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed\n        observation.price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - observation.price0Cumulative) / timeElapsed));\n        observation.price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - observation.price1Cumulative) / timeElapsed));\n      }\n      observation.price0Cumulative = price0Cumulative;\n      observation.price1Cumulative = price1Cumulative;\n      observation.timestamp = blockTimestamp;\n    }\n  }\n\n  /**\n   * @notice Returns the rate after `update` has been called.\n   */\n  function consult(\n    address _tokenIn,\n    uint _amountIn,\n    address _tokenOut\n  ) public override view\n    returns (uint _amountOut)\n  {\n    address pair = UniswapV2Library.pairFor(factory, _tokenIn, _tokenOut);\n    Observation storage observation = pairObservations[pair];\n    (address token0,) = UniswapV2Library.sortTokens(_tokenIn, _tokenOut);\n    if (_tokenIn == token0)\n    {\n      _amountOut = observation.price0Average.mul(_amountIn).decode144();\n    }\n    else\n    {\n      _amountOut = observation.price1Average.mul(_amountIn).decode144();\n    }\n  }\n  \n  /**\n   * @notice Calls `update` and returns the rate in a single call\n   */\n  function updateAndConsult(\n    address _tokenIn,\n    uint _amountIn,\n    address _tokenOut\n  ) public override\n    returns (uint _amountOut)\n  {\n    update(_tokenIn, _tokenOut);\n    return consult(_tokenIn, _amountIn, _tokenOut);\n  }\n}",
  "sourcePath": "/home/circleci/repo/contracts/protocols/Uniswap/UniswapOracle.sol",
  "ast": {
    "absolutePath": "project:/contracts/protocols/Uniswap/UniswapOracle.sol",
    "exportedSymbols": {
      "UniswapOracle": [
        3157
      ]
    },
    "id": 3158,
    "license": "GPL-3.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2911,
        "literals": [
          "solidity",
          "^",
          "0.6",
          ".6"
        ],
        "nodeType": "PragmaDirective",
        "src": "204:23:14"
      },
      {
        "absolutePath": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol",
        "file": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol",
        "id": 2912,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 1443,
        "src": "229:69:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol",
        "file": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol",
        "id": 2913,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 1685,
        "src": "299:66:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@uniswap/lib/contracts/libraries/FixedPoint.sol",
        "file": "@uniswap/lib/contracts/libraries/FixedPoint.sol",
        "id": 2914,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 1167,
        "src": "366:57:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
        "file": "@openzeppelin/contracts/math/SafeMath.sol",
        "id": 2915,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 355,
        "src": "424:51:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol",
        "file": "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol",
        "id": 2916,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 1792,
        "src": "476:78:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/protocols/Uniswap/UniswapV2Library.sol",
        "file": "./UniswapV2Library.sol",
        "id": 2917,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 3630,
        "src": "555:32:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/protocols/Uniswap/IUniswapOracle.sol",
        "file": "./IUniswapOracle.sol",
        "id": 2918,
        "nodeType": "ImportDirective",
        "scope": 3158,
        "sourceUnit": 2910,
        "src": "588:30:14",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2919,
              "name": "IUniswapOracle",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2909,
              "src": "646:14:14",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IUniswapOracle_$2909",
                "typeString": "contract IUniswapOracle"
              }
            },
            "id": 2920,
            "nodeType": "InheritanceSpecifier",
            "src": "646:14:14"
          }
        ],
        "contractDependencies": [
          2909
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 3157,
        "linearizedBaseContracts": [
          3157,
          2909
        ],
        "name": "UniswapOracle",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 2922,
            "libraryName": {
              "contractScope": null,
              "id": 2921,
              "name": "FixedPoint",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1166,
              "src": "672:10:14",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_FixedPoint_$1166",
                "typeString": "library FixedPoint"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "666:23:14",
            "typeName": null
          },
          {
            "canonicalName": "UniswapOracle.Observation",
            "id": 2933,
            "members": [
              {
                "constant": false,
                "id": 2924,
                "mutability": "mutable",
                "name": "timestamp",
                "nodeType": "VariableDeclaration",
                "overrides": null,
                "scope": 2933,
                "src": "720:14:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 2923,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "720:4:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 2926,
                "mutability": "mutable",
                "name": "price0Cumulative",
                "nodeType": "VariableDeclaration",
                "overrides": null,
                "scope": 2933,
                "src": "740:21:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 2925,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "740:4:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 2928,
                "mutability": "mutable",
                "name": "price1Cumulative",
                "nodeType": "VariableDeclaration",
                "overrides": null,
                "scope": 2933,
                "src": "767:21:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 2927,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "767:4:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 2930,
                "mutability": "mutable",
                "name": "price0Average",
                "nodeType": "VariableDeclaration",
                "overrides": null,
                "scope": 2933,
                "src": "794:34:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_struct$_uq112x112_$614_storage_ptr",
                  "typeString": "struct FixedPoint.uq112x112"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 2929,
                  "name": "FixedPoint.uq112x112",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 614,
                  "src": "794:20:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_uq112x112_$614_storage_ptr",
                    "typeString": "struct FixedPoint.uq112x112"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 2932,
                "mutability": "mutable",
                "name": "price1Average",
                "nodeType": "VariableDeclaration",
                "overrides": null,
                "scope": 2933,
                "src": "834:34:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_struct$_uq112x112_$614_storage_ptr",
                  "typeString": "struct FixedPoint.uq112x112"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 2931,
                  "name": "FixedPoint.uq112x112",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 614,
                  "src": "834:20:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_uq112x112_$614_storage_ptr",
                    "typeString": "struct FixedPoint.uq112x112"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "Observation",
            "nodeType": "StructDefinition",
            "scope": 3157,
            "src": "693:180:14",
            "visibility": "public"
          },
          {
            "baseFunctions": [
              2874
            ],
            "constant": true,
            "functionSelector": "b4d1d795",
            "id": 2937,
            "mutability": "constant",
            "name": "PERIOD",
            "nodeType": "VariableDeclaration",
            "overrides": {
              "id": 2935,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "889:8:14"
            },
            "scope": 3157,
            "src": "877:47:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 2934,
              "name": "uint",
              "nodeType": "ElementaryTypeName",
              "src": "877:4:14",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "3234",
              "id": 2936,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "916:8:14",
              "subdenomination": "hours",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_86400_by_1",
                "typeString": "int_const 86400"
              },
              "value": "24"
            },
            "visibility": "public"
          },
          {
            "baseFunctions": [
              2879
            ],
            "constant": false,
            "functionSelector": "c45a0155",
            "id": 2940,
            "mutability": "immutable",
            "name": "factory",
            "nodeType": "VariableDeclaration",
            "overrides": {
              "id": 2939,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "943:8:14"
            },
            "scope": 3157,
            "src": "928:41:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 2938,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "928:7:14",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 2944,
            "mutability": "mutable",
            "name": "pairObservations",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 3157,
            "src": "1049:56:14",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Observation_$2933_storage_$",
              "typeString": "mapping(address => struct UniswapOracle.Observation)"
            },
            "typeName": {
              "id": 2943,
              "keyType": {
                "id": 2941,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "1057:7:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "1049:31:14",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Observation_$2933_storage_$",
                "typeString": "mapping(address => struct UniswapOracle.Observation)"
              },
              "valueType": {
                "contractScope": null,
                "id": 2942,
                "name": "Observation",
                "nodeType": "UserDefinedTypeName",
                "referencedDeclaration": 2933,
                "src": "1068:11:14",
                "typeDescriptions": {
                  "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                  "typeString": "struct UniswapOracle.Observation"
                }
              }
            },
            "value": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2953,
              "nodeType": "Block",
              "src": "1159:29:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2951,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2949,
                      "name": "factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2940,
                      "src": "1165:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2950,
                      "name": "_factory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2946,
                      "src": "1175:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1165:18:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 2952,
                  "nodeType": "ExpressionStatement",
                  "src": "1165:18:14"
                }
              ]
            },
            "documentation": null,
            "id": 2954,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 2947,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2946,
                  "mutability": "mutable",
                  "name": "_factory",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 2954,
                  "src": "1129:16:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2945,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1129:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1123:26:14"
            },
            "returnParameters": {
              "id": 2948,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1159:0:14"
            },
            "scope": 3157,
            "src": "1112:76:14",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              2886
            ],
            "body": {
              "id": 3067,
              "nodeType": "Block",
              "src": "1390:1158:14",
              "statements": [
                {
                  "assignments": [
                    2964
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2964,
                      "mutability": "mutable",
                      "name": "pair",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1396:12:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 2963,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1396:7:14",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2971,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2967,
                        "name": "factory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2940,
                        "src": "1436:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2968,
                        "name": "_tokenIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2957,
                        "src": "1445:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2969,
                        "name": "_tokenOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2959,
                        "src": "1455:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2965,
                        "name": "UniswapV2Library",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3629,
                        "src": "1411:16:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_UniswapV2Library_$3629_$",
                          "typeString": "type(library UniswapV2Library)"
                        }
                      },
                      "id": 2966,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "pairFor",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3253,
                      "src": "1411:24:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$",
                        "typeString": "function (address,address,address) pure returns (address)"
                      }
                    },
                    "id": 2970,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1411:54:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1396:69:14"
                },
                {
                  "assignments": [
                    2973
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2973,
                      "mutability": "mutable",
                      "name": "observation",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1471:31:14",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                        "typeString": "struct UniswapOracle.Observation"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 2972,
                        "name": "Observation",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 2933,
                        "src": "1471:11:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                          "typeString": "struct UniswapOracle.Observation"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2977,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 2974,
                      "name": "pairObservations",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2944,
                      "src": "1505:16:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Observation_$2933_storage_$",
                        "typeString": "mapping(address => struct UniswapOracle.Observation storage ref)"
                      }
                    },
                    "id": 2976,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 2975,
                      "name": "pair",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2964,
                      "src": "1522:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "1505:22:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Observation_$2933_storage",
                      "typeString": "struct UniswapOracle.Observation storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1471:56:14"
                },
                {
                  "assignments": [
                    2979,
                    2981,
                    2983
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2979,
                      "mutability": "mutable",
                      "name": "price0Cumulative",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1534:21:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2978,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "1534:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2981,
                      "mutability": "mutable",
                      "name": "price1Cumulative",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1557:21:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2980,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "1557:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 2983,
                      "mutability": "mutable",
                      "name": "blockTimestamp",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1580:21:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      },
                      "typeName": {
                        "id": 2982,
                        "name": "uint32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1580:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2991,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2988,
                            "name": "pair",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2964,
                            "src": "1666:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 2987,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "1658:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 2986,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "1658:7:14",
                            "typeDescriptions": {
                              "typeIdentifier": null,
                              "typeString": null
                            }
                          }
                        },
                        "id": 2989,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "1658:13:14",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 2984,
                        "name": "UniswapV2OracleLibrary",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1791,
                        "src": "1611:22:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_UniswapV2OracleLibrary_$1791_$",
                          "typeString": "type(library UniswapV2OracleLibrary)"
                        }
                      },
                      "id": 2985,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currentCumulativePrices",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1790,
                      "src": "1611:46:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$_t_uint256_$_t_uint32_$",
                        "typeString": "function (address) view returns (uint256,uint256,uint32)"
                      }
                    },
                    "id": 2990,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1611:61:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint32_$",
                      "typeString": "tuple(uint256,uint256,uint32)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1533:139:14"
                },
                {
                  "assignments": [
                    2993
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2993,
                      "mutability": "mutable",
                      "name": "timeElapsed",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3067,
                      "src": "1678:18:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      },
                      "typeName": {
                        "id": 2992,
                        "name": "uint32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1678:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint32",
                          "typeString": "uint32"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3001,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 2999,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2996,
                          "name": "blockTimestamp",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2983,
                          "src": "1706:14:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "-",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2997,
                            "name": "observation",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2973,
                            "src": "1723:11:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                              "typeString": "struct UniswapOracle.Observation storage pointer"
                            }
                          },
                          "id": 2998,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "timestamp",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 2924,
                          "src": "1723:21:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1706:38:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2995,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1699:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint32_$",
                        "typeString": "type(uint32)"
                      },
                      "typeName": {
                        "id": 2994,
                        "name": "uint32",
                        "nodeType": "ElementaryTypeName",
                        "src": "1699:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 3000,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1699:46:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1678:67:14"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 3004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3002,
                      "name": "timeElapsed",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2993,
                      "src": "1855:11:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3003,
                      "name": "PERIOD",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2937,
                      "src": "1870:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1855:21:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 3066,
                  "nodeType": "IfStatement",
                  "src": "1852:692:14",
                  "trueBody": {
                    "id": 3065,
                    "nodeType": "Block",
                    "src": "1882:662:14",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3008,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 3005,
                              "name": "observation",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2973,
                              "src": "1893:11:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                "typeString": "struct UniswapOracle.Observation storage pointer"
                              }
                            },
                            "id": 3006,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "price0Cumulative",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2926,
                            "src": "1893:28:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 3007,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1924:1:14",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "1893:32:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 3046,
                        "nodeType": "IfStatement",
                        "src": "1890:492:14",
                        "trueBody": {
                          "id": 3045,
                          "nodeType": "Block",
                          "src": "1933:449:14",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 3025,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 3009,
                                    "name": "observation",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2973,
                                    "src": "2119:11:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                      "typeString": "struct UniswapOracle.Observation storage pointer"
                                    }
                                  },
                                  "id": 3011,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "price0Average",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 2930,
                                  "src": "2119:25:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                    "typeString": "struct FixedPoint.uq112x112 storage ref"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "id": 3022,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "argumentTypes": null,
                                            "components": [
                                              {
                                                "argumentTypes": null,
                                                "commonType": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                "id": 3019,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                  "argumentTypes": null,
                                                  "id": 3016,
                                                  "name": "price0Cumulative",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2979,
                                                  "src": "2177:16:14",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "-",
                                                "rightExpression": {
                                                  "argumentTypes": null,
                                                  "expression": {
                                                    "argumentTypes": null,
                                                    "id": 3017,
                                                    "name": "observation",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 2973,
                                                    "src": "2196:11:14",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                                      "typeString": "struct UniswapOracle.Observation storage pointer"
                                                    }
                                                  },
                                                  "id": 3018,
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "price0Cumulative",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 2926,
                                                  "src": "2196:28:14",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "src": "2177:47:14",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "id": 3020,
                                            "isConstant": false,
                                            "isInlineArray": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "TupleExpression",
                                            "src": "2176:49:14",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "/",
                                          "rightExpression": {
                                            "argumentTypes": null,
                                            "id": 3021,
                                            "name": "timeElapsed",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2993,
                                            "src": "2228:11:14",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint32",
                                              "typeString": "uint32"
                                            }
                                          },
                                          "src": "2176:63:14",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 3015,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2168:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint224_$",
                                          "typeString": "type(uint224)"
                                        },
                                        "typeName": {
                                          "id": 3014,
                                          "name": "uint224",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2168:7:14",
                                          "typeDescriptions": {
                                            "typeIdentifier": null,
                                            "typeString": null
                                          }
                                        }
                                      },
                                      "id": 3023,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "2168:72:14",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint224",
                                        "typeString": "uint224"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint224",
                                        "typeString": "uint224"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3012,
                                      "name": "FixedPoint",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1166,
                                      "src": "2147:10:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1166_$",
                                        "typeString": "type(library FixedPoint)"
                                      }
                                    },
                                    "id": 3013,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "uq112x112",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 614,
                                    "src": "2147:20:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_struct$_uq112x112_$614_storage_ptr_$",
                                      "typeString": "type(struct FixedPoint.uq112x112 storage pointer)"
                                    }
                                  },
                                  "id": 3024,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "structConstructorCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2147:94:14",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_uq112x112_$614_memory_ptr",
                                    "typeString": "struct FixedPoint.uq112x112 memory"
                                  }
                                },
                                "src": "2119:122:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                  "typeString": "struct FixedPoint.uq112x112 storage ref"
                                }
                              },
                              "id": 3026,
                              "nodeType": "ExpressionStatement",
                              "src": "2119:122:14"
                            },
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 3043,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 3027,
                                    "name": "observation",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2973,
                                    "src": "2251:11:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                      "typeString": "struct UniswapOracle.Observation storage pointer"
                                    }
                                  },
                                  "id": 3029,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": true,
                                  "memberName": "price1Average",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 2932,
                                  "src": "2251:25:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                    "typeString": "struct FixedPoint.uq112x112 storage ref"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "arguments": [
                                        {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          },
                                          "id": 3040,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "leftExpression": {
                                            "argumentTypes": null,
                                            "components": [
                                              {
                                                "argumentTypes": null,
                                                "commonType": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                "id": 3037,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                  "argumentTypes": null,
                                                  "id": 3034,
                                                  "name": "price1Cumulative",
                                                  "nodeType": "Identifier",
                                                  "overloadedDeclarations": [],
                                                  "referencedDeclaration": 2981,
                                                  "src": "2309:16:14",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "-",
                                                "rightExpression": {
                                                  "argumentTypes": null,
                                                  "expression": {
                                                    "argumentTypes": null,
                                                    "id": 3035,
                                                    "name": "observation",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 2973,
                                                    "src": "2328:11:14",
                                                    "typeDescriptions": {
                                                      "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                                      "typeString": "struct UniswapOracle.Observation storage pointer"
                                                    }
                                                  },
                                                  "id": 3036,
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "memberName": "price1Cumulative",
                                                  "nodeType": "MemberAccess",
                                                  "referencedDeclaration": 2928,
                                                  "src": "2328:28:14",
                                                  "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                  }
                                                },
                                                "src": "2309:47:14",
                                                "typeDescriptions": {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              }
                                            ],
                                            "id": 3038,
                                            "isConstant": false,
                                            "isInlineArray": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "nodeType": "TupleExpression",
                                            "src": "2308:49:14",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          },
                                          "nodeType": "BinaryOperation",
                                          "operator": "/",
                                          "rightExpression": {
                                            "argumentTypes": null,
                                            "id": 3039,
                                            "name": "timeElapsed",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 2993,
                                            "src": "2360:11:14",
                                            "typeDescriptions": {
                                              "typeIdentifier": "t_uint32",
                                              "typeString": "uint32"
                                            }
                                          },
                                          "src": "2308:63:14",
                                          "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        }
                                      ],
                                      "expression": {
                                        "argumentTypes": [
                                          {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                          }
                                        ],
                                        "id": 3033,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "lValueRequested": false,
                                        "nodeType": "ElementaryTypeNameExpression",
                                        "src": "2300:7:14",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_type$_t_uint224_$",
                                          "typeString": "type(uint224)"
                                        },
                                        "typeName": {
                                          "id": 3032,
                                          "name": "uint224",
                                          "nodeType": "ElementaryTypeName",
                                          "src": "2300:7:14",
                                          "typeDescriptions": {
                                            "typeIdentifier": null,
                                            "typeString": null
                                          }
                                        }
                                      },
                                      "id": 3041,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "kind": "typeConversion",
                                      "lValueRequested": false,
                                      "names": [],
                                      "nodeType": "FunctionCall",
                                      "src": "2300:72:14",
                                      "tryCall": false,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint224",
                                        "typeString": "uint224"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint224",
                                        "typeString": "uint224"
                                      }
                                    ],
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3030,
                                      "name": "FixedPoint",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1166,
                                      "src": "2279:10:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_FixedPoint_$1166_$",
                                        "typeString": "type(library FixedPoint)"
                                      }
                                    },
                                    "id": 3031,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "uq112x112",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 614,
                                    "src": "2279:20:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_struct$_uq112x112_$614_storage_ptr_$",
                                      "typeString": "type(struct FixedPoint.uq112x112 storage pointer)"
                                    }
                                  },
                                  "id": 3042,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "structConstructorCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2279:94:14",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_uq112x112_$614_memory_ptr",
                                    "typeString": "struct FixedPoint.uq112x112 memory"
                                  }
                                },
                                "src": "2251:122:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                  "typeString": "struct FixedPoint.uq112x112 storage ref"
                                }
                              },
                              "id": 3044,
                              "nodeType": "ExpressionStatement",
                              "src": "2251:122:14"
                            }
                          ]
                        }
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3051,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 3047,
                              "name": "observation",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2973,
                              "src": "2389:11:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                "typeString": "struct UniswapOracle.Observation storage pointer"
                              }
                            },
                            "id": 3049,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "price0Cumulative",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2926,
                            "src": "2389:28:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 3050,
                            "name": "price0Cumulative",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2979,
                            "src": "2420:16:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2389:47:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3052,
                        "nodeType": "ExpressionStatement",
                        "src": "2389:47:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3057,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 3053,
                              "name": "observation",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2973,
                              "src": "2444:11:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                "typeString": "struct UniswapOracle.Observation storage pointer"
                              }
                            },
                            "id": 3055,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "price1Cumulative",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2928,
                            "src": "2444:28:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 3056,
                            "name": "price1Cumulative",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2981,
                            "src": "2475:16:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2444:47:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3058,
                        "nodeType": "ExpressionStatement",
                        "src": "2444:47:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3063,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 3059,
                              "name": "observation",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2973,
                              "src": "2499:11:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                "typeString": "struct UniswapOracle.Observation storage pointer"
                              }
                            },
                            "id": 3061,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2924,
                            "src": "2499:21:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 3062,
                            "name": "blockTimestamp",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2983,
                            "src": "2523:14:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint32",
                              "typeString": "uint32"
                            }
                          },
                          "src": "2499:38:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3064,
                        "nodeType": "ExpressionStatement",
                        "src": "2499:38:14"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 2955,
              "nodeType": "StructuredDocumentation",
              "src": "1192:112:14",
              "text": " @notice Updates and stores the exchange rate\n @dev For the first 24 hours the rate will be 0."
            },
            "functionSelector": "c640752d",
            "id": 3068,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "update",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 2961,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "1379:8:14"
            },
            "parameters": {
              "id": 2960,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2957,
                  "mutability": "mutable",
                  "name": "_tokenIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3068,
                  "src": "1328:16:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2956,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1328:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2959,
                  "mutability": "mutable",
                  "name": "_tokenOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3068,
                  "src": "1350:17:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2958,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1350:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1322:49:14"
            },
            "returnParameters": {
              "id": 2962,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1390:0:14"
            },
            "scope": 3157,
            "src": "1307:1241:14",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              2897
            ],
            "body": {
              "id": 3130,
              "nodeType": "Block",
              "src": "2765:423:14",
              "statements": [
                {
                  "assignments": [
                    3082
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3082,
                      "mutability": "mutable",
                      "name": "pair",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3130,
                      "src": "2771:12:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 3081,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "2771:7:14",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3089,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3085,
                        "name": "factory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2940,
                        "src": "2811:7:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3086,
                        "name": "_tokenIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3071,
                        "src": "2820:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3087,
                        "name": "_tokenOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3075,
                        "src": "2830:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 3083,
                        "name": "UniswapV2Library",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3629,
                        "src": "2786:16:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_UniswapV2Library_$3629_$",
                          "typeString": "type(library UniswapV2Library)"
                        }
                      },
                      "id": 3084,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "pairFor",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3253,
                      "src": "2786:24:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$_t_address_$returns$_t_address_$",
                        "typeString": "function (address,address,address) pure returns (address)"
                      }
                    },
                    "id": 3088,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2786:54:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2771:69:14"
                },
                {
                  "assignments": [
                    3091
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3091,
                      "mutability": "mutable",
                      "name": "observation",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3130,
                      "src": "2846:31:14",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                        "typeString": "struct UniswapOracle.Observation"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 3090,
                        "name": "Observation",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 2933,
                        "src": "2846:11:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                          "typeString": "struct UniswapOracle.Observation"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3095,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 3092,
                      "name": "pairObservations",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2944,
                      "src": "2880:16:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Observation_$2933_storage_$",
                        "typeString": "mapping(address => struct UniswapOracle.Observation storage ref)"
                      }
                    },
                    "id": 3094,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 3093,
                      "name": "pair",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3082,
                      "src": "2897:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "2880:22:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Observation_$2933_storage",
                      "typeString": "struct UniswapOracle.Observation storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2846:56:14"
                },
                {
                  "assignments": [
                    3097,
                    null
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3097,
                      "mutability": "mutable",
                      "name": "token0",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 3130,
                      "src": "2909:14:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 3096,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "2909:7:14",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    null
                  ],
                  "id": 3103,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3100,
                        "name": "_tokenIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3071,
                        "src": "2956:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3101,
                        "name": "_tokenOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3075,
                        "src": "2966:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 3098,
                        "name": "UniswapV2Library",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3629,
                        "src": "2928:16:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_UniswapV2Library_$3629_$",
                          "typeString": "type(library UniswapV2Library)"
                        }
                      },
                      "id": 3099,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sortTokens",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 3208,
                      "src": "2928:27:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$_t_address_$returns$_t_address_$_t_address_$",
                        "typeString": "function (address,address) pure returns (address,address)"
                      }
                    },
                    "id": 3102,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2928:48:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_address_$_t_address_$",
                      "typeString": "tuple(address,address)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2908:68:14"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 3106,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3104,
                      "name": "_tokenIn",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3071,
                      "src": "2986:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3105,
                      "name": "token0",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3097,
                      "src": "2998:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "2986:18:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 3128,
                    "nodeType": "Block",
                    "src": "3104:80:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3126,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 3118,
                            "name": "_amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3079,
                            "src": "3112:10:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 3122,
                                    "name": "_amountIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3073,
                                    "src": "3155:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3119,
                                      "name": "observation",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3091,
                                      "src": "3125:11:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                        "typeString": "struct UniswapOracle.Observation storage pointer"
                                      }
                                    },
                                    "id": 3120,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "price1Average",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 2932,
                                    "src": "3125:25:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                      "typeString": "struct FixedPoint.uq112x112 storage ref"
                                    }
                                  },
                                  "id": 3121,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mul",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 733,
                                  "src": "3125:29:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$614_memory_ptr_$_t_uint256_$returns$_t_struct$_uq144x112_$617_memory_ptr_$bound_to$_t_struct$_uq112x112_$614_memory_ptr_$",
                                    "typeString": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)"
                                  }
                                },
                                "id": 3123,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3125:40:14",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_uq144x112_$617_memory_ptr",
                                  "typeString": "struct FixedPoint.uq144x112 memory"
                                }
                              },
                              "id": 3124,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "decode144",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 695,
                              "src": "3125:50:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_struct$_uq144x112_$617_memory_ptr_$returns$_t_uint144_$bound_to$_t_struct$_uq144x112_$617_memory_ptr_$",
                                "typeString": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)"
                              }
                            },
                            "id": 3125,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3125:52:14",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint144",
                              "typeString": "uint144"
                            }
                          },
                          "src": "3112:65:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3127,
                        "nodeType": "ExpressionStatement",
                        "src": "3112:65:14"
                      }
                    ]
                  },
                  "id": 3129,
                  "nodeType": "IfStatement",
                  "src": "2982:202:14",
                  "trueBody": {
                    "id": 3117,
                    "nodeType": "Block",
                    "src": "3010:80:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3115,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 3107,
                            "name": "_amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3079,
                            "src": "3018:10:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [],
                            "expression": {
                              "argumentTypes": [],
                              "expression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 3111,
                                    "name": "_amountIn",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 3073,
                                    "src": "3061:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 3108,
                                      "name": "observation",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 3091,
                                      "src": "3031:11:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_Observation_$2933_storage_ptr",
                                        "typeString": "struct UniswapOracle.Observation storage pointer"
                                      }
                                    },
                                    "id": 3109,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "price0Average",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 2930,
                                    "src": "3031:25:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_struct$_uq112x112_$614_storage",
                                      "typeString": "struct FixedPoint.uq112x112 storage ref"
                                    }
                                  },
                                  "id": 3110,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "mul",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 733,
                                  "src": "3031:29:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_struct$_uq112x112_$614_memory_ptr_$_t_uint256_$returns$_t_struct$_uq144x112_$617_memory_ptr_$bound_to$_t_struct$_uq112x112_$614_memory_ptr_$",
                                    "typeString": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)"
                                  }
                                },
                                "id": 3112,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3031:40:14",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_uq144x112_$617_memory_ptr",
                                  "typeString": "struct FixedPoint.uq144x112 memory"
                                }
                              },
                              "id": 3113,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "decode144",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 695,
                              "src": "3031:50:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_struct$_uq144x112_$617_memory_ptr_$returns$_t_uint144_$bound_to$_t_struct$_uq144x112_$617_memory_ptr_$",
                                "typeString": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)"
                              }
                            },
                            "id": 3114,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3031:52:14",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint144",
                              "typeString": "uint144"
                            }
                          },
                          "src": "3018:65:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3116,
                        "nodeType": "ExpressionStatement",
                        "src": "3018:65:14"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 3069,
              "nodeType": "StructuredDocumentation",
              "src": "2552:71:14",
              "text": " @notice Returns the rate after `update` has been called."
            },
            "functionSelector": "8c86f1e4",
            "id": 3131,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "consult",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3077,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "2719:8:14"
            },
            "parameters": {
              "id": 3076,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3071,
                  "mutability": "mutable",
                  "name": "_tokenIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3131,
                  "src": "2648:16:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3070,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2648:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3073,
                  "mutability": "mutable",
                  "name": "_amountIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3131,
                  "src": "2670:14:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3072,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2670:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3075,
                  "mutability": "mutable",
                  "name": "_tokenOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3131,
                  "src": "2690:17:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3074,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2690:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2642:69:14"
            },
            "returnParameters": {
              "id": 3080,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3079,
                  "mutability": "mutable",
                  "name": "_amountOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3131,
                  "src": "2746:15:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3078,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2746:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2745:17:14"
            },
            "scope": 3157,
            "src": "2626:562:14",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              2908
            ],
            "body": {
              "id": 3155,
              "nodeType": "Block",
              "src": "3415:90:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3145,
                        "name": "_tokenIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3134,
                        "src": "3428:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3146,
                        "name": "_tokenOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3138,
                        "src": "3438:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 3144,
                      "name": "update",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3068,
                      "src": "3421:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$",
                        "typeString": "function (address,address)"
                      }
                    },
                    "id": 3147,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3421:27:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 3148,
                  "nodeType": "ExpressionStatement",
                  "src": "3421:27:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 3150,
                        "name": "_tokenIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3134,
                        "src": "3469:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3151,
                        "name": "_amountIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3136,
                        "src": "3479:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 3152,
                        "name": "_tokenOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3138,
                        "src": "3490:9:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 3149,
                      "name": "consult",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3131,
                      "src": "3461:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address,uint256,address) view returns (uint256)"
                      }
                    },
                    "id": 3153,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3461:39:14",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 3143,
                  "id": 3154,
                  "nodeType": "Return",
                  "src": "3454:46:14"
                }
              ]
            },
            "documentation": {
              "id": 3132,
              "nodeType": "StructuredDocumentation",
              "src": "3194:75:14",
              "text": " @notice Calls `update` and returns the rate in a single call"
            },
            "functionSelector": "c1e553e7",
            "id": 3156,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "updateAndConsult",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 3140,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "3374:8:14"
            },
            "parameters": {
              "id": 3139,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3134,
                  "mutability": "mutable",
                  "name": "_tokenIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3156,
                  "src": "3303:16:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3133,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3303:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3136,
                  "mutability": "mutable",
                  "name": "_amountIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3156,
                  "src": "3325:14:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3135,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3325:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3138,
                  "mutability": "mutable",
                  "name": "_tokenOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3156,
                  "src": "3345:17:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 3137,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3345:7:14",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3297:69:14"
            },
            "returnParameters": {
              "id": 3143,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3142,
                  "mutability": "mutable",
                  "name": "_amountOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 3156,
                  "src": "3396:15:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3141,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "3396:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3395:17:14"
            },
            "scope": 3157,
            "src": "3272:233:14",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          }
        ],
        "scope": 3158,
        "src": "620:2887:14"
      }
    ],
    "src": "204:3303:14"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/protocols/Uniswap/UniswapOracle.sol",
      "exportedSymbols": {
        "UniswapOracle": [
          3157
        ]
      },
      "license": "GPL-3.0"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "^",
            "0.6",
            ".6"
          ]
        },
        "id": 2911,
        "name": "PragmaDirective",
        "src": "204:23:14"
      },
      {
        "attributes": {
          "SourceUnit": 1443,
          "absolutePath": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol",
          "file": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2912,
        "name": "ImportDirective",
        "src": "229:69:14"
      },
      {
        "attributes": {
          "SourceUnit": 1685,
          "absolutePath": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol",
          "file": "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2913,
        "name": "ImportDirective",
        "src": "299:66:14"
      },
      {
        "attributes": {
          "SourceUnit": 1167,
          "absolutePath": "@uniswap/lib/contracts/libraries/FixedPoint.sol",
          "file": "@uniswap/lib/contracts/libraries/FixedPoint.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2914,
        "name": "ImportDirective",
        "src": "366:57:14"
      },
      {
        "attributes": {
          "SourceUnit": 355,
          "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
          "file": "@openzeppelin/contracts/math/SafeMath.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2915,
        "name": "ImportDirective",
        "src": "424:51:14"
      },
      {
        "attributes": {
          "SourceUnit": 1792,
          "absolutePath": "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol",
          "file": "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2916,
        "name": "ImportDirective",
        "src": "476:78:14"
      },
      {
        "attributes": {
          "SourceUnit": 3630,
          "absolutePath": "project:/contracts/protocols/Uniswap/UniswapV2Library.sol",
          "file": "./UniswapV2Library.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2917,
        "name": "ImportDirective",
        "src": "555:32:14"
      },
      {
        "attributes": {
          "SourceUnit": 2910,
          "absolutePath": "project:/contracts/protocols/Uniswap/IUniswapOracle.sol",
          "file": "./IUniswapOracle.sol",
          "scope": 3158,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 2918,
        "name": "ImportDirective",
        "src": "588:30:14"
      },
      {
        "attributes": {
          "abstract": false,
          "contractDependencies": [
            2909
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            3157,
            2909
          ],
          "name": "UniswapOracle",
          "scope": 3158
        },
        "children": [
          {
            "attributes": {
              "arguments": null
            },
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "IUniswapOracle",
                  "referencedDeclaration": 2909,
                  "type": "contract IUniswapOracle"
                },
                "id": 2919,
                "name": "UserDefinedTypeName",
                "src": "646:14:14"
              }
            ],
            "id": 2920,
            "name": "InheritanceSpecifier",
            "src": "646:14:14"
          },
          {
            "attributes": {
              "typeName": null
            },
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "FixedPoint",
                  "referencedDeclaration": 1166,
                  "type": "library FixedPoint"
                },
                "id": 2921,
                "name": "UserDefinedTypeName",
                "src": "672:10:14"
              }
            ],
            "id": 2922,
            "name": "UsingForDirective",
            "src": "666:23:14"
          },
          {
            "attributes": {
              "canonicalName": "UniswapOracle.Observation",
              "name": "Observation",
              "scope": 3157,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "timestamp",
                  "overrides": null,
                  "scope": 2933,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint",
                      "type": "uint256"
                    },
                    "id": 2923,
                    "name": "ElementaryTypeName",
                    "src": "720:4:14"
                  }
                ],
                "id": 2924,
                "name": "VariableDeclaration",
                "src": "720:14:14"
              },
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "price0Cumulative",
                  "overrides": null,
                  "scope": 2933,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint",
                      "type": "uint256"
                    },
                    "id": 2925,
                    "name": "ElementaryTypeName",
                    "src": "740:4:14"
                  }
                ],
                "id": 2926,
                "name": "VariableDeclaration",
                "src": "740:21:14"
              },
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "price1Cumulative",
                  "overrides": null,
                  "scope": 2933,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint",
                      "type": "uint256"
                    },
                    "id": 2927,
                    "name": "ElementaryTypeName",
                    "src": "767:4:14"
                  }
                ],
                "id": 2928,
                "name": "VariableDeclaration",
                "src": "767:21:14"
              },
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "price0Average",
                  "overrides": null,
                  "scope": 2933,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "struct FixedPoint.uq112x112",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "FixedPoint.uq112x112",
                      "referencedDeclaration": 614,
                      "type": "struct FixedPoint.uq112x112"
                    },
                    "id": 2929,
                    "name": "UserDefinedTypeName",
                    "src": "794:20:14"
                  }
                ],
                "id": 2930,
                "name": "VariableDeclaration",
                "src": "794:34:14"
              },
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "price1Average",
                  "overrides": null,
                  "scope": 2933,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "struct FixedPoint.uq112x112",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "FixedPoint.uq112x112",
                      "referencedDeclaration": 614,
                      "type": "struct FixedPoint.uq112x112"
                    },
                    "id": 2931,
                    "name": "UserDefinedTypeName",
                    "src": "834:20:14"
                  }
                ],
                "id": 2932,
                "name": "VariableDeclaration",
                "src": "834:34:14"
              }
            ],
            "id": 2933,
            "name": "StructDefinition",
            "src": "693:180:14"
          },
          {
            "attributes": {
              "baseFunctions": [
                2874
              ],
              "constant": true,
              "functionSelector": "b4d1d795",
              "mutability": "constant",
              "name": "PERIOD",
              "scope": 3157,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "uint256",
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "uint",
                  "type": "uint256"
                },
                "id": 2934,
                "name": "ElementaryTypeName",
                "src": "877:4:14"
              },
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 2935,
                "name": "OverrideSpecifier",
                "src": "889:8:14"
              },
              {
                "attributes": {
                  "argumentTypes": null,
                  "hexvalue": "3234",
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "subdenomination": "hours",
                  "token": "number",
                  "type": "int_const 86400",
                  "value": "24"
                },
                "id": 2936,
                "name": "Literal",
                "src": "916:8:14"
              }
            ],
            "id": 2937,
            "name": "VariableDeclaration",
            "src": "877:47:14"
          },
          {
            "attributes": {
              "baseFunctions": [
                2879
              ],
              "constant": false,
              "functionSelector": "c45a0155",
              "mutability": "immutable",
              "name": "factory",
              "scope": 3157,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "address",
              "value": null,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "name": "address",
                  "stateMutability": "nonpayable",
                  "type": "address"
                },
                "id": 2938,
                "name": "ElementaryTypeName",
                "src": "928:7:14"
              },
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 2939,
                "name": "OverrideSpecifier",
                "src": "943:8:14"
              }
            ],
            "id": 2940,
            "name": "VariableDeclaration",
            "src": "928:41:14"
          },
          {
            "attributes": {
              "constant": false,
              "mutability": "mutable",
              "name": "pairObservations",
              "overrides": null,
              "scope": 3157,
              "stateVariable": true,
              "storageLocation": "default",
              "type": "mapping(address => struct UniswapOracle.Observation)",
              "value": null,
              "visibility": "private"
            },
            "children": [
              {
                "attributes": {
                  "type": "mapping(address => struct UniswapOracle.Observation)"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "address",
                      "type": "address"
                    },
                    "id": 2941,
                    "name": "ElementaryTypeName",
                    "src": "1057:7:14"
                  },
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "Observation",
                      "referencedDeclaration": 2933,
                      "type": "struct UniswapOracle.Observation"
                    },
                    "id": 2942,
                    "name": "UserDefinedTypeName",
                    "src": "1068:11:14"
                  }
                ],
                "id": 2943,
                "name": "Mapping",
                "src": "1049:31:14"
              }
            ],
            "id": 2944,
            "name": "VariableDeclaration",
            "src": "1049:56:14"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": true,
              "kind": "constructor",
              "modifiers": [
                null
              ],
              "name": "",
              "overrides": null,
              "scope": 3157,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_factory",
                      "overrides": null,
                      "scope": 2954,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 2945,
                        "name": "ElementaryTypeName",
                        "src": "1129:7:14"
                      }
                    ],
                    "id": 2946,
                    "name": "VariableDeclaration",
                    "src": "1129:16:14"
                  }
                ],
                "id": 2947,
                "name": "ParameterList",
                "src": "1123:26:14"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 2948,
                "name": "ParameterList",
                "src": "1159:0:14"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "address"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2940,
                              "type": "address",
                              "value": "factory"
                            },
                            "id": 2949,
                            "name": "Identifier",
                            "src": "1165:7:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2946,
                              "type": "address",
                              "value": "_factory"
                            },
                            "id": 2950,
                            "name": "Identifier",
                            "src": "1175:8:14"
                          }
                        ],
                        "id": 2951,
                        "name": "Assignment",
                        "src": "1165:18:14"
                      }
                    ],
                    "id": 2952,
                    "name": "ExpressionStatement",
                    "src": "1165:18:14"
                  }
                ],
                "id": 2953,
                "name": "Block",
                "src": "1159:29:14"
              }
            ],
            "id": 2954,
            "name": "FunctionDefinition",
            "src": "1112:76:14"
          },
          {
            "attributes": {
              "baseFunctions": [
                2886
              ],
              "functionSelector": "c640752d",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "update",
              "scope": 3157,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "text": " @notice Updates and stores the exchange rate\n @dev For the first 24 hours the rate will be 0."
                },
                "id": 2955,
                "name": "StructuredDocumentation",
                "src": "1192:112:14"
              },
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 2961,
                "name": "OverrideSpecifier",
                "src": "1379:8:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenIn",
                      "overrides": null,
                      "scope": 3068,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 2956,
                        "name": "ElementaryTypeName",
                        "src": "1328:7:14"
                      }
                    ],
                    "id": 2957,
                    "name": "VariableDeclaration",
                    "src": "1328:16:14"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenOut",
                      "overrides": null,
                      "scope": 3068,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 2958,
                        "name": "ElementaryTypeName",
                        "src": "1350:7:14"
                      }
                    ],
                    "id": 2959,
                    "name": "VariableDeclaration",
                    "src": "1350:17:14"
                  }
                ],
                "id": 2960,
                "name": "ParameterList",
                "src": "1322:49:14"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 2962,
                "name": "ParameterList",
                "src": "1390:0:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        2964
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "pair",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "address",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "address",
                              "stateMutability": "nonpayable",
                              "type": "address"
                            },
                            "id": 2963,
                            "name": "ElementaryTypeName",
                            "src": "1396:7:14"
                          }
                        ],
                        "id": 2964,
                        "name": "VariableDeclaration",
                        "src": "1396:12:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "address",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "pairFor",
                              "referencedDeclaration": 3253,
                              "type": "function (address,address,address) pure returns (address)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3629,
                                  "type": "type(library UniswapV2Library)",
                                  "value": "UniswapV2Library"
                                },
                                "id": 2965,
                                "name": "Identifier",
                                "src": "1411:16:14"
                              }
                            ],
                            "id": 2966,
                            "name": "MemberAccess",
                            "src": "1411:24:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2940,
                              "type": "address",
                              "value": "factory"
                            },
                            "id": 2967,
                            "name": "Identifier",
                            "src": "1436:7:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2957,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 2968,
                            "name": "Identifier",
                            "src": "1445:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2959,
                              "type": "address",
                              "value": "_tokenOut"
                            },
                            "id": 2969,
                            "name": "Identifier",
                            "src": "1455:9:14"
                          }
                        ],
                        "id": 2970,
                        "name": "FunctionCall",
                        "src": "1411:54:14"
                      }
                    ],
                    "id": 2971,
                    "name": "VariableDeclarationStatement",
                    "src": "1396:69:14"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        2973
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "observation",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "storage",
                          "type": "struct UniswapOracle.Observation",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "Observation",
                              "referencedDeclaration": 2933,
                              "type": "struct UniswapOracle.Observation"
                            },
                            "id": 2972,
                            "name": "UserDefinedTypeName",
                            "src": "1471:11:14"
                          }
                        ],
                        "id": 2973,
                        "name": "VariableDeclaration",
                        "src": "1471:31:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "type": "struct UniswapOracle.Observation storage ref"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2944,
                              "type": "mapping(address => struct UniswapOracle.Observation storage ref)",
                              "value": "pairObservations"
                            },
                            "id": 2974,
                            "name": "Identifier",
                            "src": "1505:16:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2964,
                              "type": "address",
                              "value": "pair"
                            },
                            "id": 2975,
                            "name": "Identifier",
                            "src": "1522:4:14"
                          }
                        ],
                        "id": 2976,
                        "name": "IndexAccess",
                        "src": "1505:22:14"
                      }
                    ],
                    "id": 2977,
                    "name": "VariableDeclarationStatement",
                    "src": "1471:56:14"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        2979,
                        2981,
                        2983
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "price0Cumulative",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 2978,
                            "name": "ElementaryTypeName",
                            "src": "1534:4:14"
                          }
                        ],
                        "id": 2979,
                        "name": "VariableDeclaration",
                        "src": "1534:21:14"
                      },
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "price1Cumulative",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 2980,
                            "name": "ElementaryTypeName",
                            "src": "1557:4:14"
                          }
                        ],
                        "id": 2981,
                        "name": "VariableDeclaration",
                        "src": "1557:21:14"
                      },
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "blockTimestamp",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint32",
                              "type": "uint32"
                            },
                            "id": 2982,
                            "name": "ElementaryTypeName",
                            "src": "1580:6:14"
                          }
                        ],
                        "id": 2983,
                        "name": "VariableDeclaration",
                        "src": "1580:21:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple(uint256,uint256,uint32)",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "currentCumulativePrices",
                              "referencedDeclaration": 1790,
                              "type": "function (address) view returns (uint256,uint256,uint32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1791,
                                  "type": "type(library UniswapV2OracleLibrary)",
                                  "value": "UniswapV2OracleLibrary"
                                },
                                "id": 2984,
                                "name": "Identifier",
                                "src": "1611:22:14"
                              }
                            ],
                            "id": 2985,
                            "name": "MemberAccess",
                            "src": "1611:46:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "address",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "address",
                                      "type": null
                                    },
                                    "id": 2986,
                                    "name": "ElementaryTypeName",
                                    "src": "1658:7:14"
                                  }
                                ],
                                "id": 2987,
                                "name": "ElementaryTypeNameExpression",
                                "src": "1658:7:14"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 2964,
                                  "type": "address",
                                  "value": "pair"
                                },
                                "id": 2988,
                                "name": "Identifier",
                                "src": "1666:4:14"
                              }
                            ],
                            "id": 2989,
                            "name": "FunctionCall",
                            "src": "1658:13:14"
                          }
                        ],
                        "id": 2990,
                        "name": "FunctionCall",
                        "src": "1611:61:14"
                      }
                    ],
                    "id": 2991,
                    "name": "VariableDeclarationStatement",
                    "src": "1533:139:14"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        2993
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "timeElapsed",
                          "overrides": null,
                          "scope": 3067,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint32",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint32",
                              "type": "uint32"
                            },
                            "id": 2992,
                            "name": "ElementaryTypeName",
                            "src": "1678:6:14"
                          }
                        ],
                        "id": 2993,
                        "name": "VariableDeclaration",
                        "src": "1678:18:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint32",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint32)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint32",
                                  "type": null
                                },
                                "id": 2994,
                                "name": "ElementaryTypeName",
                                "src": "1699:6:14"
                              }
                            ],
                            "id": 2995,
                            "name": "ElementaryTypeNameExpression",
                            "src": "1699:6:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "-",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 2983,
                                  "type": "uint32",
                                  "value": "blockTimestamp"
                                },
                                "id": 2996,
                                "name": "Identifier",
                                "src": "1706:14:14"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "timestamp",
                                  "referencedDeclaration": 2924,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 2973,
                                      "type": "struct UniswapOracle.Observation storage pointer",
                                      "value": "observation"
                                    },
                                    "id": 2997,
                                    "name": "Identifier",
                                    "src": "1723:11:14"
                                  }
                                ],
                                "id": 2998,
                                "name": "MemberAccess",
                                "src": "1723:21:14"
                              }
                            ],
                            "id": 2999,
                            "name": "BinaryOperation",
                            "src": "1706:38:14"
                          }
                        ],
                        "id": 3000,
                        "name": "FunctionCall",
                        "src": "1699:46:14"
                      }
                    ],
                    "id": 3001,
                    "name": "VariableDeclarationStatement",
                    "src": "1678:67:14"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2993,
                              "type": "uint32",
                              "value": "timeElapsed"
                            },
                            "id": 3002,
                            "name": "Identifier",
                            "src": "1855:11:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2937,
                              "type": "uint256",
                              "value": "PERIOD"
                            },
                            "id": 3003,
                            "name": "Identifier",
                            "src": "1870:6:14"
                          }
                        ],
                        "id": 3004,
                        "name": "BinaryOperation",
                        "src": "1855:21:14"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "falseBody": null
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "price0Cumulative",
                                      "referencedDeclaration": 2926,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 2973,
                                          "type": "struct UniswapOracle.Observation storage pointer",
                                          "value": "observation"
                                        },
                                        "id": 3005,
                                        "name": "Identifier",
                                        "src": "1893:11:14"
                                      }
                                    ],
                                    "id": 3006,
                                    "name": "MemberAccess",
                                    "src": "1893:28:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 3007,
                                    "name": "Literal",
                                    "src": "1924:1:14"
                                  }
                                ],
                                "id": 3008,
                                "name": "BinaryOperation",
                                "src": "1893:32:14"
                              },
                              {
                                "children": [
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "struct FixedPoint.uq112x112 storage ref"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": true,
                                              "member_name": "price0Average",
                                              "referencedDeclaration": 2930,
                                              "type": "struct FixedPoint.uq112x112 storage ref"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 2973,
                                                  "type": "struct UniswapOracle.Observation storage pointer",
                                                  "value": "observation"
                                                },
                                                "id": 3009,
                                                "name": "Identifier",
                                                "src": "2119:11:14"
                                              }
                                            ],
                                            "id": 3011,
                                            "name": "MemberAccess",
                                            "src": "2119:25:14"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": true,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "tryCall": false,
                                              "type": "struct FixedPoint.uq112x112 memory",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint224",
                                                      "typeString": "uint224"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "member_name": "uq112x112",
                                                  "referencedDeclaration": 614,
                                                  "type": "type(struct FixedPoint.uq112x112 storage pointer)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 1166,
                                                      "type": "type(library FixedPoint)",
                                                      "value": "FixedPoint"
                                                    },
                                                    "id": 3012,
                                                    "name": "Identifier",
                                                    "src": "2147:10:14"
                                                  }
                                                ],
                                                "id": 3013,
                                                "name": "MemberAccess",
                                                "src": "2147:20:14"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "isStructConstructorCall": false,
                                                  "lValueRequested": false,
                                                  "names": [
                                                    null
                                                  ],
                                                  "tryCall": false,
                                                  "type": "uint224",
                                                  "type_conversion": true
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": [
                                                        {
                                                          "typeIdentifier": "t_uint256",
                                                          "typeString": "uint256"
                                                        }
                                                      ],
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "lValueRequested": false,
                                                      "type": "type(uint224)"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "name": "uint224",
                                                          "type": null
                                                        },
                                                        "id": 3014,
                                                        "name": "ElementaryTypeName",
                                                        "src": "2168:7:14"
                                                      }
                                                    ],
                                                    "id": 3015,
                                                    "name": "ElementaryTypeNameExpression",
                                                    "src": "2168:7:14"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "commonType": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      },
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "operator": "/",
                                                      "type": "uint256"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "isConstant": false,
                                                          "isInlineArray": false,
                                                          "isLValue": false,
                                                          "isPure": false,
                                                          "lValueRequested": false,
                                                          "type": "uint256"
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "argumentTypes": null,
                                                              "commonType": {
                                                                "typeIdentifier": "t_uint256",
                                                                "typeString": "uint256"
                                                              },
                                                              "isConstant": false,
                                                              "isLValue": false,
                                                              "isPure": false,
                                                              "lValueRequested": false,
                                                              "operator": "-",
                                                              "type": "uint256"
                                                            },
                                                            "children": [
                                                              {
                                                                "attributes": {
                                                                  "argumentTypes": null,
                                                                  "overloadedDeclarations": [
                                                                    null
                                                                  ],
                                                                  "referencedDeclaration": 2979,
                                                                  "type": "uint256",
                                                                  "value": "price0Cumulative"
                                                                },
                                                                "id": 3016,
                                                                "name": "Identifier",
                                                                "src": "2177:16:14"
                                                              },
                                                              {
                                                                "attributes": {
                                                                  "argumentTypes": null,
                                                                  "isConstant": false,
                                                                  "isLValue": true,
                                                                  "isPure": false,
                                                                  "lValueRequested": false,
                                                                  "member_name": "price0Cumulative",
                                                                  "referencedDeclaration": 2926,
                                                                  "type": "uint256"
                                                                },
                                                                "children": [
                                                                  {
                                                                    "attributes": {
                                                                      "argumentTypes": null,
                                                                      "overloadedDeclarations": [
                                                                        null
                                                                      ],
                                                                      "referencedDeclaration": 2973,
                                                                      "type": "struct UniswapOracle.Observation storage pointer",
                                                                      "value": "observation"
                                                                    },
                                                                    "id": 3017,
                                                                    "name": "Identifier",
                                                                    "src": "2196:11:14"
                                                                  }
                                                                ],
                                                                "id": 3018,
                                                                "name": "MemberAccess",
                                                                "src": "2196:28:14"
                                                              }
                                                            ],
                                                            "id": 3019,
                                                            "name": "BinaryOperation",
                                                            "src": "2177:47:14"
                                                          }
                                                        ],
                                                        "id": 3020,
                                                        "name": "TupleExpression",
                                                        "src": "2176:49:14"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 2993,
                                                          "type": "uint32",
                                                          "value": "timeElapsed"
                                                        },
                                                        "id": 3021,
                                                        "name": "Identifier",
                                                        "src": "2228:11:14"
                                                      }
                                                    ],
                                                    "id": 3022,
                                                    "name": "BinaryOperation",
                                                    "src": "2176:63:14"
                                                  }
                                                ],
                                                "id": 3023,
                                                "name": "FunctionCall",
                                                "src": "2168:72:14"
                                              }
                                            ],
                                            "id": 3024,
                                            "name": "FunctionCall",
                                            "src": "2147:94:14"
                                          }
                                        ],
                                        "id": 3025,
                                        "name": "Assignment",
                                        "src": "2119:122:14"
                                      }
                                    ],
                                    "id": 3026,
                                    "name": "ExpressionStatement",
                                    "src": "2119:122:14"
                                  },
                                  {
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "=",
                                          "type": "struct FixedPoint.uq112x112 storage ref"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": true,
                                              "member_name": "price1Average",
                                              "referencedDeclaration": 2932,
                                              "type": "struct FixedPoint.uq112x112 storage ref"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 2973,
                                                  "type": "struct UniswapOracle.Observation storage pointer",
                                                  "value": "observation"
                                                },
                                                "id": 3027,
                                                "name": "Identifier",
                                                "src": "2251:11:14"
                                              }
                                            ],
                                            "id": 3029,
                                            "name": "MemberAccess",
                                            "src": "2251:25:14"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": true,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "tryCall": false,
                                              "type": "struct FixedPoint.uq112x112 memory",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint224",
                                                      "typeString": "uint224"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "member_name": "uq112x112",
                                                  "referencedDeclaration": 614,
                                                  "type": "type(struct FixedPoint.uq112x112 storage pointer)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 1166,
                                                      "type": "type(library FixedPoint)",
                                                      "value": "FixedPoint"
                                                    },
                                                    "id": 3030,
                                                    "name": "Identifier",
                                                    "src": "2279:10:14"
                                                  }
                                                ],
                                                "id": 3031,
                                                "name": "MemberAccess",
                                                "src": "2279:20:14"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "isStructConstructorCall": false,
                                                  "lValueRequested": false,
                                                  "names": [
                                                    null
                                                  ],
                                                  "tryCall": false,
                                                  "type": "uint224",
                                                  "type_conversion": true
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": [
                                                        {
                                                          "typeIdentifier": "t_uint256",
                                                          "typeString": "uint256"
                                                        }
                                                      ],
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": true,
                                                      "lValueRequested": false,
                                                      "type": "type(uint224)"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "name": "uint224",
                                                          "type": null
                                                        },
                                                        "id": 3032,
                                                        "name": "ElementaryTypeName",
                                                        "src": "2300:7:14"
                                                      }
                                                    ],
                                                    "id": 3033,
                                                    "name": "ElementaryTypeNameExpression",
                                                    "src": "2300:7:14"
                                                  },
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "commonType": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                      },
                                                      "isConstant": false,
                                                      "isLValue": false,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "operator": "/",
                                                      "type": "uint256"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "isConstant": false,
                                                          "isInlineArray": false,
                                                          "isLValue": false,
                                                          "isPure": false,
                                                          "lValueRequested": false,
                                                          "type": "uint256"
                                                        },
                                                        "children": [
                                                          {
                                                            "attributes": {
                                                              "argumentTypes": null,
                                                              "commonType": {
                                                                "typeIdentifier": "t_uint256",
                                                                "typeString": "uint256"
                                                              },
                                                              "isConstant": false,
                                                              "isLValue": false,
                                                              "isPure": false,
                                                              "lValueRequested": false,
                                                              "operator": "-",
                                                              "type": "uint256"
                                                            },
                                                            "children": [
                                                              {
                                                                "attributes": {
                                                                  "argumentTypes": null,
                                                                  "overloadedDeclarations": [
                                                                    null
                                                                  ],
                                                                  "referencedDeclaration": 2981,
                                                                  "type": "uint256",
                                                                  "value": "price1Cumulative"
                                                                },
                                                                "id": 3034,
                                                                "name": "Identifier",
                                                                "src": "2309:16:14"
                                                              },
                                                              {
                                                                "attributes": {
                                                                  "argumentTypes": null,
                                                                  "isConstant": false,
                                                                  "isLValue": true,
                                                                  "isPure": false,
                                                                  "lValueRequested": false,
                                                                  "member_name": "price1Cumulative",
                                                                  "referencedDeclaration": 2928,
                                                                  "type": "uint256"
                                                                },
                                                                "children": [
                                                                  {
                                                                    "attributes": {
                                                                      "argumentTypes": null,
                                                                      "overloadedDeclarations": [
                                                                        null
                                                                      ],
                                                                      "referencedDeclaration": 2973,
                                                                      "type": "struct UniswapOracle.Observation storage pointer",
                                                                      "value": "observation"
                                                                    },
                                                                    "id": 3035,
                                                                    "name": "Identifier",
                                                                    "src": "2328:11:14"
                                                                  }
                                                                ],
                                                                "id": 3036,
                                                                "name": "MemberAccess",
                                                                "src": "2328:28:14"
                                                              }
                                                            ],
                                                            "id": 3037,
                                                            "name": "BinaryOperation",
                                                            "src": "2309:47:14"
                                                          }
                                                        ],
                                                        "id": 3038,
                                                        "name": "TupleExpression",
                                                        "src": "2308:49:14"
                                                      },
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 2993,
                                                          "type": "uint32",
                                                          "value": "timeElapsed"
                                                        },
                                                        "id": 3039,
                                                        "name": "Identifier",
                                                        "src": "2360:11:14"
                                                      }
                                                    ],
                                                    "id": 3040,
                                                    "name": "BinaryOperation",
                                                    "src": "2308:63:14"
                                                  }
                                                ],
                                                "id": 3041,
                                                "name": "FunctionCall",
                                                "src": "2300:72:14"
                                              }
                                            ],
                                            "id": 3042,
                                            "name": "FunctionCall",
                                            "src": "2279:94:14"
                                          }
                                        ],
                                        "id": 3043,
                                        "name": "Assignment",
                                        "src": "2251:122:14"
                                      }
                                    ],
                                    "id": 3044,
                                    "name": "ExpressionStatement",
                                    "src": "2251:122:14"
                                  }
                                ],
                                "id": 3045,
                                "name": "Block",
                                "src": "1933:449:14"
                              }
                            ],
                            "id": 3046,
                            "name": "IfStatement",
                            "src": "1890:492:14"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "member_name": "price0Cumulative",
                                      "referencedDeclaration": 2926,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 2973,
                                          "type": "struct UniswapOracle.Observation storage pointer",
                                          "value": "observation"
                                        },
                                        "id": 3047,
                                        "name": "Identifier",
                                        "src": "2389:11:14"
                                      }
                                    ],
                                    "id": 3049,
                                    "name": "MemberAccess",
                                    "src": "2389:28:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 2979,
                                      "type": "uint256",
                                      "value": "price0Cumulative"
                                    },
                                    "id": 3050,
                                    "name": "Identifier",
                                    "src": "2420:16:14"
                                  }
                                ],
                                "id": 3051,
                                "name": "Assignment",
                                "src": "2389:47:14"
                              }
                            ],
                            "id": 3052,
                            "name": "ExpressionStatement",
                            "src": "2389:47:14"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "member_name": "price1Cumulative",
                                      "referencedDeclaration": 2928,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 2973,
                                          "type": "struct UniswapOracle.Observation storage pointer",
                                          "value": "observation"
                                        },
                                        "id": 3053,
                                        "name": "Identifier",
                                        "src": "2444:11:14"
                                      }
                                    ],
                                    "id": 3055,
                                    "name": "MemberAccess",
                                    "src": "2444:28:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 2981,
                                      "type": "uint256",
                                      "value": "price1Cumulative"
                                    },
                                    "id": 3056,
                                    "name": "Identifier",
                                    "src": "2475:16:14"
                                  }
                                ],
                                "id": 3057,
                                "name": "Assignment",
                                "src": "2444:47:14"
                              }
                            ],
                            "id": 3058,
                            "name": "ExpressionStatement",
                            "src": "2444:47:14"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "member_name": "timestamp",
                                      "referencedDeclaration": 2924,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 2973,
                                          "type": "struct UniswapOracle.Observation storage pointer",
                                          "value": "observation"
                                        },
                                        "id": 3059,
                                        "name": "Identifier",
                                        "src": "2499:11:14"
                                      }
                                    ],
                                    "id": 3061,
                                    "name": "MemberAccess",
                                    "src": "2499:21:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 2983,
                                      "type": "uint32",
                                      "value": "blockTimestamp"
                                    },
                                    "id": 3062,
                                    "name": "Identifier",
                                    "src": "2523:14:14"
                                  }
                                ],
                                "id": 3063,
                                "name": "Assignment",
                                "src": "2499:38:14"
                              }
                            ],
                            "id": 3064,
                            "name": "ExpressionStatement",
                            "src": "2499:38:14"
                          }
                        ],
                        "id": 3065,
                        "name": "Block",
                        "src": "1882:662:14"
                      }
                    ],
                    "id": 3066,
                    "name": "IfStatement",
                    "src": "1852:692:14"
                  }
                ],
                "id": 3067,
                "name": "Block",
                "src": "1390:1158:14"
              }
            ],
            "id": 3068,
            "name": "FunctionDefinition",
            "src": "1307:1241:14"
          },
          {
            "attributes": {
              "baseFunctions": [
                2897
              ],
              "functionSelector": "8c86f1e4",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "consult",
              "scope": 3157,
              "stateMutability": "view",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "text": " @notice Returns the rate after `update` has been called."
                },
                "id": 3069,
                "name": "StructuredDocumentation",
                "src": "2552:71:14"
              },
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 3077,
                "name": "OverrideSpecifier",
                "src": "2719:8:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenIn",
                      "overrides": null,
                      "scope": 3131,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 3070,
                        "name": "ElementaryTypeName",
                        "src": "2648:7:14"
                      }
                    ],
                    "id": 3071,
                    "name": "VariableDeclaration",
                    "src": "2648:16:14"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_amountIn",
                      "overrides": null,
                      "scope": 3131,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 3072,
                        "name": "ElementaryTypeName",
                        "src": "2670:4:14"
                      }
                    ],
                    "id": 3073,
                    "name": "VariableDeclaration",
                    "src": "2670:14:14"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenOut",
                      "overrides": null,
                      "scope": 3131,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 3074,
                        "name": "ElementaryTypeName",
                        "src": "2690:7:14"
                      }
                    ],
                    "id": 3075,
                    "name": "VariableDeclaration",
                    "src": "2690:17:14"
                  }
                ],
                "id": 3076,
                "name": "ParameterList",
                "src": "2642:69:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_amountOut",
                      "overrides": null,
                      "scope": 3131,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 3078,
                        "name": "ElementaryTypeName",
                        "src": "2746:4:14"
                      }
                    ],
                    "id": 3079,
                    "name": "VariableDeclaration",
                    "src": "2746:15:14"
                  }
                ],
                "id": 3080,
                "name": "ParameterList",
                "src": "2745:17:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        3082
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "pair",
                          "overrides": null,
                          "scope": 3130,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "address",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "address",
                              "stateMutability": "nonpayable",
                              "type": "address"
                            },
                            "id": 3081,
                            "name": "ElementaryTypeName",
                            "src": "2771:7:14"
                          }
                        ],
                        "id": 3082,
                        "name": "VariableDeclaration",
                        "src": "2771:12:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "address",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "pairFor",
                              "referencedDeclaration": 3253,
                              "type": "function (address,address,address) pure returns (address)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3629,
                                  "type": "type(library UniswapV2Library)",
                                  "value": "UniswapV2Library"
                                },
                                "id": 3083,
                                "name": "Identifier",
                                "src": "2786:16:14"
                              }
                            ],
                            "id": 3084,
                            "name": "MemberAccess",
                            "src": "2786:24:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2940,
                              "type": "address",
                              "value": "factory"
                            },
                            "id": 3085,
                            "name": "Identifier",
                            "src": "2811:7:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3071,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 3086,
                            "name": "Identifier",
                            "src": "2820:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3075,
                              "type": "address",
                              "value": "_tokenOut"
                            },
                            "id": 3087,
                            "name": "Identifier",
                            "src": "2830:9:14"
                          }
                        ],
                        "id": 3088,
                        "name": "FunctionCall",
                        "src": "2786:54:14"
                      }
                    ],
                    "id": 3089,
                    "name": "VariableDeclarationStatement",
                    "src": "2771:69:14"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        3091
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "observation",
                          "overrides": null,
                          "scope": 3130,
                          "stateVariable": false,
                          "storageLocation": "storage",
                          "type": "struct UniswapOracle.Observation",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "Observation",
                              "referencedDeclaration": 2933,
                              "type": "struct UniswapOracle.Observation"
                            },
                            "id": 3090,
                            "name": "UserDefinedTypeName",
                            "src": "2846:11:14"
                          }
                        ],
                        "id": 3091,
                        "name": "VariableDeclaration",
                        "src": "2846:31:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "type": "struct UniswapOracle.Observation storage ref"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 2944,
                              "type": "mapping(address => struct UniswapOracle.Observation storage ref)",
                              "value": "pairObservations"
                            },
                            "id": 3092,
                            "name": "Identifier",
                            "src": "2880:16:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3082,
                              "type": "address",
                              "value": "pair"
                            },
                            "id": 3093,
                            "name": "Identifier",
                            "src": "2897:4:14"
                          }
                        ],
                        "id": 3094,
                        "name": "IndexAccess",
                        "src": "2880:22:14"
                      }
                    ],
                    "id": 3095,
                    "name": "VariableDeclarationStatement",
                    "src": "2846:56:14"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        3097,
                        null
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "token0",
                          "overrides": null,
                          "scope": 3130,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "address",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "address",
                              "stateMutability": "nonpayable",
                              "type": "address"
                            },
                            "id": 3096,
                            "name": "ElementaryTypeName",
                            "src": "2909:7:14"
                          }
                        ],
                        "id": 3097,
                        "name": "VariableDeclaration",
                        "src": "2909:14:14"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple(address,address)",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "sortTokens",
                              "referencedDeclaration": 3208,
                              "type": "function (address,address) pure returns (address,address)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3629,
                                  "type": "type(library UniswapV2Library)",
                                  "value": "UniswapV2Library"
                                },
                                "id": 3098,
                                "name": "Identifier",
                                "src": "2928:16:14"
                              }
                            ],
                            "id": 3099,
                            "name": "MemberAccess",
                            "src": "2928:27:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3071,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 3100,
                            "name": "Identifier",
                            "src": "2956:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3075,
                              "type": "address",
                              "value": "_tokenOut"
                            },
                            "id": 3101,
                            "name": "Identifier",
                            "src": "2966:9:14"
                          }
                        ],
                        "id": 3102,
                        "name": "FunctionCall",
                        "src": "2928:48:14"
                      }
                    ],
                    "id": 3103,
                    "name": "VariableDeclarationStatement",
                    "src": "2908:68:14"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3071,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 3104,
                            "name": "Identifier",
                            "src": "2986:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3097,
                              "type": "address",
                              "value": "token0"
                            },
                            "id": 3105,
                            "name": "Identifier",
                            "src": "2998:6:14"
                          }
                        ],
                        "id": 3106,
                        "name": "BinaryOperation",
                        "src": "2986:18:14"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3079,
                                      "type": "uint256",
                                      "value": "_amountOut"
                                    },
                                    "id": 3107,
                                    "name": "Identifier",
                                    "src": "3018:10:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint144",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "decode144",
                                          "referencedDeclaration": 695,
                                          "type": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "tryCall": false,
                                              "type": "struct FixedPoint.uq144x112 memory",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "member_name": "mul",
                                                  "referencedDeclaration": 733,
                                                  "type": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "isConstant": false,
                                                      "isLValue": true,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "member_name": "price0Average",
                                                      "referencedDeclaration": 2930,
                                                      "type": "struct FixedPoint.uq112x112 storage ref"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 3091,
                                                          "type": "struct UniswapOracle.Observation storage pointer",
                                                          "value": "observation"
                                                        },
                                                        "id": 3108,
                                                        "name": "Identifier",
                                                        "src": "3031:11:14"
                                                      }
                                                    ],
                                                    "id": 3109,
                                                    "name": "MemberAccess",
                                                    "src": "3031:25:14"
                                                  }
                                                ],
                                                "id": 3110,
                                                "name": "MemberAccess",
                                                "src": "3031:29:14"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3073,
                                                  "type": "uint256",
                                                  "value": "_amountIn"
                                                },
                                                "id": 3111,
                                                "name": "Identifier",
                                                "src": "3061:9:14"
                                              }
                                            ],
                                            "id": 3112,
                                            "name": "FunctionCall",
                                            "src": "3031:40:14"
                                          }
                                        ],
                                        "id": 3113,
                                        "name": "MemberAccess",
                                        "src": "3031:50:14"
                                      }
                                    ],
                                    "id": 3114,
                                    "name": "FunctionCall",
                                    "src": "3031:52:14"
                                  }
                                ],
                                "id": 3115,
                                "name": "Assignment",
                                "src": "3018:65:14"
                              }
                            ],
                            "id": 3116,
                            "name": "ExpressionStatement",
                            "src": "3018:65:14"
                          }
                        ],
                        "id": 3117,
                        "name": "Block",
                        "src": "3010:80:14"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3079,
                                      "type": "uint256",
                                      "value": "_amountOut"
                                    },
                                    "id": 3118,
                                    "name": "Identifier",
                                    "src": "3112:10:14"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "arguments": [
                                        null
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint144",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            null
                                          ],
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "decode144",
                                          "referencedDeclaration": 695,
                                          "type": "function (struct FixedPoint.uq144x112 memory) pure returns (uint144)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "tryCall": false,
                                              "type": "struct FixedPoint.uq144x112 memory",
                                              "type_conversion": false
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_uint256",
                                                      "typeString": "uint256"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": true,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "member_name": "mul",
                                                  "referencedDeclaration": 733,
                                                  "type": "function (struct FixedPoint.uq112x112 memory,uint256) pure returns (struct FixedPoint.uq144x112 memory)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "isConstant": false,
                                                      "isLValue": true,
                                                      "isPure": false,
                                                      "lValueRequested": false,
                                                      "member_name": "price1Average",
                                                      "referencedDeclaration": 2932,
                                                      "type": "struct FixedPoint.uq112x112 storage ref"
                                                    },
                                                    "children": [
                                                      {
                                                        "attributes": {
                                                          "argumentTypes": null,
                                                          "overloadedDeclarations": [
                                                            null
                                                          ],
                                                          "referencedDeclaration": 3091,
                                                          "type": "struct UniswapOracle.Observation storage pointer",
                                                          "value": "observation"
                                                        },
                                                        "id": 3119,
                                                        "name": "Identifier",
                                                        "src": "3125:11:14"
                                                      }
                                                    ],
                                                    "id": 3120,
                                                    "name": "MemberAccess",
                                                    "src": "3125:25:14"
                                                  }
                                                ],
                                                "id": 3121,
                                                "name": "MemberAccess",
                                                "src": "3125:29:14"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3073,
                                                  "type": "uint256",
                                                  "value": "_amountIn"
                                                },
                                                "id": 3122,
                                                "name": "Identifier",
                                                "src": "3155:9:14"
                                              }
                                            ],
                                            "id": 3123,
                                            "name": "FunctionCall",
                                            "src": "3125:40:14"
                                          }
                                        ],
                                        "id": 3124,
                                        "name": "MemberAccess",
                                        "src": "3125:50:14"
                                      }
                                    ],
                                    "id": 3125,
                                    "name": "FunctionCall",
                                    "src": "3125:52:14"
                                  }
                                ],
                                "id": 3126,
                                "name": "Assignment",
                                "src": "3112:65:14"
                              }
                            ],
                            "id": 3127,
                            "name": "ExpressionStatement",
                            "src": "3112:65:14"
                          }
                        ],
                        "id": 3128,
                        "name": "Block",
                        "src": "3104:80:14"
                      }
                    ],
                    "id": 3129,
                    "name": "IfStatement",
                    "src": "2982:202:14"
                  }
                ],
                "id": 3130,
                "name": "Block",
                "src": "2765:423:14"
              }
            ],
            "id": 3131,
            "name": "FunctionDefinition",
            "src": "2626:562:14"
          },
          {
            "attributes": {
              "baseFunctions": [
                2908
              ],
              "functionSelector": "c1e553e7",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "updateAndConsult",
              "scope": 3157,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "text": " @notice Calls `update` and returns the rate in a single call"
                },
                "id": 3132,
                "name": "StructuredDocumentation",
                "src": "3194:75:14"
              },
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 3140,
                "name": "OverrideSpecifier",
                "src": "3374:8:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenIn",
                      "overrides": null,
                      "scope": 3156,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 3133,
                        "name": "ElementaryTypeName",
                        "src": "3303:7:14"
                      }
                    ],
                    "id": 3134,
                    "name": "VariableDeclaration",
                    "src": "3303:16:14"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_amountIn",
                      "overrides": null,
                      "scope": 3156,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 3135,
                        "name": "ElementaryTypeName",
                        "src": "3325:4:14"
                      }
                    ],
                    "id": 3136,
                    "name": "VariableDeclaration",
                    "src": "3325:14:14"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_tokenOut",
                      "overrides": null,
                      "scope": 3156,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 3137,
                        "name": "ElementaryTypeName",
                        "src": "3345:7:14"
                      }
                    ],
                    "id": 3138,
                    "name": "VariableDeclaration",
                    "src": "3345:17:14"
                  }
                ],
                "id": 3139,
                "name": "ParameterList",
                "src": "3297:69:14"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "_amountOut",
                      "overrides": null,
                      "scope": 3156,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 3141,
                        "name": "ElementaryTypeName",
                        "src": "3396:4:14"
                      }
                    ],
                    "id": 3142,
                    "name": "VariableDeclaration",
                    "src": "3396:15:14"
                  }
                ],
                "id": 3143,
                "name": "ParameterList",
                "src": "3395:17:14"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3068,
                              "type": "function (address,address)",
                              "value": "update"
                            },
                            "id": 3144,
                            "name": "Identifier",
                            "src": "3421:6:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3134,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 3145,
                            "name": "Identifier",
                            "src": "3428:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3138,
                              "type": "address",
                              "value": "_tokenOut"
                            },
                            "id": 3146,
                            "name": "Identifier",
                            "src": "3438:9:14"
                          }
                        ],
                        "id": 3147,
                        "name": "FunctionCall",
                        "src": "3421:27:14"
                      }
                    ],
                    "id": 3148,
                    "name": "ExpressionStatement",
                    "src": "3421:27:14"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 3143
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint256",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3131,
                              "type": "function (address,uint256,address) view returns (uint256)",
                              "value": "consult"
                            },
                            "id": 3149,
                            "name": "Identifier",
                            "src": "3461:7:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3134,
                              "type": "address",
                              "value": "_tokenIn"
                            },
                            "id": 3150,
                            "name": "Identifier",
                            "src": "3469:8:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3136,
                              "type": "uint256",
                              "value": "_amountIn"
                            },
                            "id": 3151,
                            "name": "Identifier",
                            "src": "3479:9:14"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3138,
                              "type": "address",
                              "value": "_tokenOut"
                            },
                            "id": 3152,
                            "name": "Identifier",
                            "src": "3490:9:14"
                          }
                        ],
                        "id": 3153,
                        "name": "FunctionCall",
                        "src": "3461:39:14"
                      }
                    ],
                    "id": 3154,
                    "name": "Return",
                    "src": "3454:46:14"
                  }
                ],
                "id": 3155,
                "name": "Block",
                "src": "3415:90:14"
              }
            ],
            "id": 3156,
            "name": "FunctionDefinition",
            "src": "3272:233:14"
          }
        ],
        "id": 3157,
        "name": "ContractDefinition",
        "src": "620:2887:14"
      }
    ],
    "id": 3158,
    "name": "SourceUnit",
    "src": "204:3303:14"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.10+commit.00c0fcaf.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.1",
  "updatedAt": "2021-07-08T17:04:13.783Z",
  "devdoc": {
    "methods": {
      "update(address,address)": {
        "details": "For the first 24 hours the rate will be 0."
      }
    }
  },
  "userdoc": {
    "methods": {
      "consult(address,uint256,address)": {
        "notice": "Returns the rate after `update` has been called."
      },
      "update(address,address)": {
        "notice": "Updates and stores the exchange rate"
      },
      "updateAndConsult(address,uint256,address)": {
        "notice": "Calls `update` and returns the rate in a single call"
      }
    }
  }
}