{
  "contractName": "PairStableSwap",
  "abi": [
    {
      "stateMutability": "payable",
      "type": "receive"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "input",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "output",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "swap",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "input",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amountIn",
          "type": "uint256"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "getOutputAmount",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amountOut",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.6.8+commit.0bbfe453\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"input\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"getOutputAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"input\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"output\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/swappa/PairStableSwap.sol\":\"PairStableSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x91e0bd6a6762d2a1700dab0849de8422611355100576c4beef1e80d82a4104a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://73bbd77af0a8b07255d2ffa20728bcf13b116007c9ddac5d37046cfabb0e1e02\",\"dweb:/ipfs/QmRgZgWCWCSMTTaok6o4QvWA6MgB4goS8qpb3sN7bAvaZ9\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xf5fa8cbdffa5ef8be49b246b5628facc30b71707e78a45d80d93b64eff3fe390\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://774e78a9ff32792cc95db4d2ceaf3a7965bb7f0bea5e6cb7cff182b450d44b37\",\"dweb:/ipfs/QmRRMC4uj7eAcLW7chynA3sNEYULMFazdLwQHKHQPyzAbA\"]},\"project:/contracts/interfaces/stableswap/ISwap.sol\":{\"keccak256\":\"0xe089cc8908b7efc3c24c016489bc93bc9b44cf2cf7ada8c784961512957c46e2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://a2a71ae22bf6bfe64e5a09ee21e261f53019214f2280418b83e1b00331cc1eaa\",\"dweb:/ipfs/QmUCkp9DDtCtJzA8AJwrdAkdx6e9TaBGsBmeFGZKZQpTY9\"]},\"project:/contracts/swappa/ISwappaPairV1.sol\":{\"keccak256\":\"0x3ad68981bda91ed83c5e9ee8617f08bb5e208208477fb755cc77077f127010ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8e4390b1bebc39f58bff34b9099a646ead67cef27b722ef61548487251cca719\",\"dweb:/ipfs/QmRWEuYyjHaS957VKWtTfDpzfqkXb2bvEsS33meAC76ZuU\"]},\"project:/contracts/swappa/PairStableSwap.sol\":{\"keccak256\":\"0x9b9ff6865d346eb65e49e7b0b3c26072797f661b276bd03b4c0d9f46ee74bb8e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f16eaf418f4a7ebd175560042d433a120f686cc94a0ac56fea92103319c354bd\",\"dweb:/ipfs/QmbneN75SDqeRMeSeE6GfnDtjDTKAbJybByX2nbzDbBWFk\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b506109d8806100206000396000f3fe60806040526004361061002d5760003560e01c806332ef8314146100395780637eace892146100e657610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e46004803603608081101561005c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101358216926040820135909216918101906080810160608201356401000000008111156100a557600080fd5b8201836020820111156100b757600080fd5b803590602001918460018302840111640100000000831117156100d957600080fd5b5090925090506101a2565b005b3480156100f257600080fd5b506101906004803603608081101561010957600080fd5b73ffffffffffffffffffffffffffffffffffffffff82358116926020810135909116916040820135919081019060808101606082013564010000000081111561015157600080fd5b82018360208201111561016357600080fd5b8035906020019184600183028401116401000000008311171561018557600080fd5b5090925090506106f6565b60408051918252519081900360200190f35b60006101e383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092892505050565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561025557600080fd5b505afa158015610269573d6000803e3d6000fd5b505050506040513d602081101561027f57600080fd5b5051604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509089169163095ea7b3916044808201926020929091908290030181600087803b1580156102fd57600080fd5b505af1158015610311573d6000803e3d6000fd5b505050506040513d602081101561032757600080fd5b505161039457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f50616972537461626c65537761703a20617070726f7665206661696c65642100604482015290519081900360640190fd5b600082905060008873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff166382b8660060006040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561040757600080fd5b505afa15801561041b573d6000803e3d6000fd5b505050506040513d602081101561043157600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16141561051057604080517f91695586000000000000000000000000000000000000000000000000000000008152600060048201819052600160248301526044820186905260648201819052426084830152915173ffffffffffffffffffffffffffffffffffffffff85169263916955869260a480820193602093909283900390910190829087803b1580156104dd57600080fd5b505af11580156104f1573d6000803e3d6000fd5b505050506040513d602081101561050757600080fd5b505190506105cd565b604080517f91695586000000000000000000000000000000000000000000000000000000008152600160048201526000602482018190526044820186905260648201819052426084830152915173ffffffffffffffffffffffffffffffffffffffff85169263916955869260a480820193602093909283900390910190829087803b15801561059e57600080fd5b505af11580156105b2573d6000803e3d6000fd5b505050506040513d60208110156105c857600080fd5b505190505b8773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb88836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561065457600080fd5b505af1158015610668573d6000803e3d6000fd5b505050506040513d602081101561067e57600080fd5b50516106eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f50616972537461626c65537761703a207472616e73666572206661696c656421604482015290519081900360640190fd5b505050505050505050565b60008061073884848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092892505050565b905060008190508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166382b8660060006040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156107ab57600080fd5b505afa1580156107bf573d6000803e3d6000fd5b505050506040513d60208110156107d557600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614156108a457604080517fa95b089f000000000000000000000000000000000000000000000000000000008152600060048201526001602482015260448101889052905173ffffffffffffffffffffffffffffffffffffffff83169163a95b089f916064808301926020929190829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b5051925061091f915050565b604080517fa95b089f000000000000000000000000000000000000000000000000000000008152600160048201526000602482015260448101889052905173ffffffffffffffffffffffffffffffffffffffff83169163a95b089f916064808301926020929190829003018186803b15801561086e57600080fd5b95945050505050565b6000815160141461099a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f50616972537461626c65537761703a20696e76616c6964206461746121000000604482015290519081900360640190fd5b50601401519056fea26469706673582212208db27c03d29ad926d05e45461e43221d75f28811b274c8299de92ef1a94fc9f864736f6c63430006080033",
  "deployedBytecode": "0x60806040526004361061002d5760003560e01c806332ef8314146100395780637eace892146100e657610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e46004803603608081101561005c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823581169260208101358216926040820135909216918101906080810160608201356401000000008111156100a557600080fd5b8201836020820111156100b757600080fd5b803590602001918460018302840111640100000000831117156100d957600080fd5b5090925090506101a2565b005b3480156100f257600080fd5b506101906004803603608081101561010957600080fd5b73ffffffffffffffffffffffffffffffffffffffff82358116926020810135909116916040820135919081019060808101606082013564010000000081111561015157600080fd5b82018360208201111561016357600080fd5b8035906020019184600183028401116401000000008311171561018557600080fd5b5090925090506106f6565b60408051918252519081900360200190f35b60006101e383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092892505050565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561025557600080fd5b505afa158015610269573d6000803e3d6000fd5b505050506040513d602081101561027f57600080fd5b5051604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509089169163095ea7b3916044808201926020929091908290030181600087803b1580156102fd57600080fd5b505af1158015610311573d6000803e3d6000fd5b505050506040513d602081101561032757600080fd5b505161039457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f50616972537461626c65537761703a20617070726f7665206661696c65642100604482015290519081900360640190fd5b600082905060008873ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff166382b8660060006040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561040757600080fd5b505afa15801561041b573d6000803e3d6000fd5b505050506040513d602081101561043157600080fd5b505173ffffffffffffffffffffffffffffffffffffffff16141561051057604080517f91695586000000000000000000000000000000000000000000000000000000008152600060048201819052600160248301526044820186905260648201819052426084830152915173ffffffffffffffffffffffffffffffffffffffff85169263916955869260a480820193602093909283900390910190829087803b1580156104dd57600080fd5b505af11580156104f1573d6000803e3d6000fd5b505050506040513d602081101561050757600080fd5b505190506105cd565b604080517f91695586000000000000000000000000000000000000000000000000000000008152600160048201526000602482018190526044820186905260648201819052426084830152915173ffffffffffffffffffffffffffffffffffffffff85169263916955869260a480820193602093909283900390910190829087803b15801561059e57600080fd5b505af11580156105b2573d6000803e3d6000fd5b505050506040513d60208110156105c857600080fd5b505190505b8773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb88836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561065457600080fd5b505af1158015610668573d6000803e3d6000fd5b505050506040513d602081101561067e57600080fd5b50516106eb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f50616972537461626c65537761703a207472616e73666572206661696c656421604482015290519081900360640190fd5b505050505050505050565b60008061073884848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061092892505050565b905060008190508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166382b8660060006040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156107ab57600080fd5b505afa1580156107bf573d6000803e3d6000fd5b505050506040513d60208110156107d557600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1614156108a457604080517fa95b089f000000000000000000000000000000000000000000000000000000008152600060048201526001602482015260448101889052905173ffffffffffffffffffffffffffffffffffffffff83169163a95b089f916064808301926020929190829003018186803b15801561086e57600080fd5b505afa158015610882573d6000803e3d6000fd5b505050506040513d602081101561089857600080fd5b5051925061091f915050565b604080517fa95b089f000000000000000000000000000000000000000000000000000000008152600160048201526000602482015260448101889052905173ffffffffffffffffffffffffffffffffffffffff83169163a95b089f916064808301926020929190829003018186803b15801561086e57600080fd5b95945050505050565b6000815160141461099a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f50616972537461626c65537761703a20696e76616c6964206461746121000000604482015290519081900360640190fd5b50601401519056fea26469706673582212208db27c03d29ad926d05e45461e43221d75f28811b274c8299de92ef1a94fc9f864736f6c63430006080033",
  "immutableReferences": {},
  "sourceMap": "240:1521:55:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;240:1521:55;;;;;;;",
  "deployedSourceMap": "240:1521:55:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;311:744:55;;5:9:-1;2:2;;;27:1;24;17:12;2:2;311:744:55;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;311:744:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;311:744:55;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;311:744:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;311:744:55;;-1:-1:-1;311:744:55;-1:-1:-1;311:744:55;:::i;:::-;;1274:453;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1274:453:55;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;1274:453:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;1274:453:55;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;1274:453:55;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;1274:453:55;;-1:-1:-1;1274:453:55;-1:-1:-1;1274:453:55;:::i;:::-;;;;;;;;;;;;;;;;311:744;422:20;445:15;455:4;;445:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;445:9:55;;-1:-1:-1;;;445:15:55:i;:::-;483:37;;;;;;514:4;483:37;;;;;;422:38;;-1:-1:-1;464:16:55;;483:22;;;;;;:37;;;;;;;;;;;;;;:22;:37;;;2:2:-1;;;;27:1;24;17:12;2:2;483:37:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;483:37:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;483:37:55;536:47;;;;;;:20;:47;;;;;;;;;;;;;;;483:37;;-1:-1:-1;536:20:55;;;;;;:47;;;;;483:37;;536:47;;;;;;;;-1:-1:-1;536:20:55;:47;;;2:2:-1;;;;27:1;24;17:12;2:2;536:47:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;536:47:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;536:47:55;524:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;626:14;649:12;626:36;;666:17;789:5;765:29;;:8;:17;;;783:1;765:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;765:20:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;765:20:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;765:20:55;:29;;;761:195;;;816:52;;;;;;830:1;816:52;;;;;;833:1;816:52;;;;;;;;;;;;;;;;852:15;816:52;;;;;;:13;;;;;;:52;;;;;;;;;;;;;;;;;;:13;:52;;;2:2:-1;;;;27:1;24;17:12;2:2;816:52:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;816:52:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;816:52:55;;-1:-1:-1;761:195:55;;;899:52;;;;;;913:1;899:52;;;;916:1;899:52;;;;;;;;;;;;;;;;;;935:15;899:52;;;;;;:13;;;;;;:52;;;;;;;;;;;;;;;;;;:13;:52;;;2:2:-1;;;;27:1;24;17:12;2:2;899:52:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;899:52:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;899:52:55;;-1:-1:-1;761:195:55;977:6;971:22;;;994:2;998:12;971:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;971:40:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;971:40:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;971:40:55;959:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;311:744;;;;;;;;;:::o;1274:453::-;1397:14;1417:20;1440:15;1450:4;;1440:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1440:9:55;;-1:-1:-1;;;1440:15:55:i;:::-;1417:38;;1459:14;1482:12;1459:36;;1601:5;1577:29;;:8;:17;;;1595:1;1577:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1577:20:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1577:20:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1577:20:55;:29;;;1573:151;;;1620:38;;;;;;1643:1;1620:38;;;;1646:1;1620:38;;;;;;;;;;;;:22;;;;;;:38;;;;;;;;;;;;;;:22;:38;;;2:2:-1;;;;27:1;24;17:12;2:2;1620:38:55;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1620:38:55;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1620:38:55;;-1:-1:-1;1613:45:55;;-1:-1:-1;;1613:45:55;1573:151;1681:38;;;;;;1704:1;1681:38;;;;1707:1;1681:38;;;;;;;;;;;;:22;;;;;;:38;;;;;;;;;;;;;;:22;:38;;;2:2:-1;;;;27:1;24;17:12;1274:453:55;;;;;;;;:::o;1058:213::-;1118:20;1152:4;:11;1167:2;1152:17;1144:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1258:2:55;1248:13;1242:20;;1218:50::o",
  "source": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.8;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"../interfaces/stableswap/ISwap.sol\";\nimport \"./ISwappaPairV1.sol\";\n\ncontract PairStableSwap is ISwappaPairV1 {\n\tusing SafeMath for uint;\n\n\tfunction swap(\n\t\taddress input,\n\t\taddress output,\n\t\taddress to,\n\t\tbytes calldata data\n\t) external override {\n\t\taddress swapPoolAddr = parseData(data);\n\t\tuint inputAmount = ERC20(input).balanceOf(address(this));\n\t\trequire(\n\t\t\tERC20(input).approve(swapPoolAddr, inputAmount),\n\t\t\t\"PairStableSwap: approve failed!\");\n\t\tISwap swapPool = ISwap(swapPoolAddr);\n\t\tuint outputAmount;\n\t\t// TODO(zviadm): This will need to change to support multi-token pools.\n\t\tif (swapPool.getToken(0) == input) {\n\t\t\toutputAmount = swapPool.swap(0, 1, inputAmount, 0, block.timestamp);\n\t\t} else {\n\t\t\toutputAmount = swapPool.swap(1, 0, inputAmount, 0, block.timestamp);\n\t\t}\n\t\trequire(\n\t\t\tERC20(output).transfer(to, outputAmount),\n\t\t\t\"PairStableSwap: transfer failed!\");\n\t}\n\n\tfunction parseData(bytes memory data) private pure returns (address swapPoolAddr) {\n\t\trequire(data.length == 20, \"PairStableSwap: invalid data!\");\n    assembly {\n      swapPoolAddr := mload(add(data, 20))\n    }\n\t}\n\n\tfunction getOutputAmount(\n\t\taddress input,\n\t\taddress,\n\t\tuint amountIn,\n\t\tbytes calldata data\n\t) external override returns (uint amountOut) {\n\t\taddress swapPoolAddr = parseData(data);\n\t\tISwap swapPool = ISwap(swapPoolAddr);\n\t\t// TODO(zviadm): This will need to change to support multi-token pools.\n\t\tif (swapPool.getToken(0) == input) {\n\t\t\treturn swapPool.calculateSwap(0, 1, amountIn);\n\t\t} else {\n\t\t\treturn swapPool.calculateSwap(1, 0, amountIn);\n\t\t}\n\t}\n\n\treceive() external payable {}\n}",
  "sourcePath": "/home/thezviad_gmail_com/src/swappa/contracts/swappa/PairStableSwap.sol",
  "ast": {
    "absolutePath": "project:/contracts/swappa/PairStableSwap.sol",
    "exportedSymbols": {
      "PairStableSwap": [
        6907
      ]
    },
    "id": 6908,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6731,
        "literals": [
          "solidity",
          "0.6",
          ".8"
        ],
        "nodeType": "PragmaDirective",
        "src": "32:22:55"
      },
      {
        "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
        "file": "@openzeppelin/contracts/math/SafeMath.sol",
        "id": 6732,
        "nodeType": "ImportDirective",
        "scope": 6908,
        "sourceUnit": 219,
        "src": "56:51:55",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
        "id": 6733,
        "nodeType": "ImportDirective",
        "scope": 6908,
        "sourceUnit": 726,
        "src": "108:55:55",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/interfaces/stableswap/ISwap.sol",
        "file": "../interfaces/stableswap/ISwap.sol",
        "id": 6734,
        "nodeType": "ImportDirective",
        "scope": 6908,
        "sourceUnit": 1867,
        "src": "164:44:55",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/swappa/ISwappaPairV1.sol",
        "file": "./ISwappaPairV1.sol",
        "id": 6735,
        "nodeType": "ImportDirective",
        "scope": 6908,
        "sourceUnit": 5326,
        "src": "209:29:55",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6736,
              "name": "ISwappaPairV1",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 5325,
              "src": "267:13:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ISwappaPairV1_$5325",
                "typeString": "contract ISwappaPairV1"
              }
            },
            "id": 6737,
            "nodeType": "InheritanceSpecifier",
            "src": "267:13:55"
          }
        ],
        "contractDependencies": [
          5325
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 6907,
        "linearizedBaseContracts": [
          6907,
          5325
        ],
        "name": "PairStableSwap",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 6740,
            "libraryName": {
              "contractScope": null,
              "id": 6738,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 218,
              "src": "290:8:55",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$218",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "284:24:55",
            "typeName": {
              "id": 6739,
              "name": "uint",
              "nodeType": "ElementaryTypeName",
              "src": "303:4:55",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "baseFunctions": [
              5311
            ],
            "body": {
              "id": 6834,
              "nodeType": "Block",
              "src": "418:637:55",
              "statements": [
                {
                  "assignments": [
                    6753
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6753,
                      "mutability": "mutable",
                      "name": "swapPoolAddr",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6834,
                      "src": "422:20:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 6752,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "422:7:55",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6757,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6755,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6748,
                        "src": "455:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      ],
                      "id": 6754,
                      "name": "parseData",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6852,
                      "src": "445:9:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_address_$",
                        "typeString": "function (bytes memory) pure returns (address)"
                      }
                    },
                    "id": 6756,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "445:15:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "422:38:55"
                },
                {
                  "assignments": [
                    6759
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6759,
                      "mutability": "mutable",
                      "name": "inputAmount",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6834,
                      "src": "464:16:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6758,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "464:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6769,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 6766,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -28,
                            "src": "514:4:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_PairStableSwap_$6907",
                              "typeString": "contract PairStableSwap"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_PairStableSwap_$6907",
                              "typeString": "contract PairStableSwap"
                            }
                          ],
                          "id": 6765,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "506:7:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": {
                            "id": 6764,
                            "name": "address",
                            "nodeType": "ElementaryTypeName",
                            "src": "506:7:55",
                            "typeDescriptions": {
                              "typeIdentifier": null,
                              "typeString": null
                            }
                          }
                        },
                        "id": 6767,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "506:13:55",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 6761,
                            "name": "input",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6742,
                            "src": "489:5:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "id": 6760,
                          "name": "ERC20",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 725,
                          "src": "483:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                            "typeString": "type(contract ERC20)"
                          }
                        },
                        "id": 6762,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "483:12:55",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ERC20_$725",
                          "typeString": "contract ERC20"
                        }
                      },
                      "id": 6763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "balanceOf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 325,
                      "src": "483:22:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                        "typeString": "function (address) view external returns (uint256)"
                      }
                    },
                    "id": 6768,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "483:37:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "464:56:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 6775,
                            "name": "swapPoolAddr",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6753,
                            "src": "557:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 6776,
                            "name": "inputAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6759,
                            "src": "571:11:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 6772,
                                "name": "input",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6742,
                                "src": "542:5:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 6771,
                              "name": "ERC20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 725,
                              "src": "536:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                                "typeString": "type(contract ERC20)"
                              }
                            },
                            "id": 6773,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "536:12:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$725",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 6774,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "approve",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 385,
                          "src": "536:20:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 6777,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "536:47:55",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "50616972537461626c65537761703a20617070726f7665206661696c656421",
                        "id": 6778,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "588:33:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_83d0a4b192727c7cd8a2654fe5caba12e612139a0786a1e791338f41d2d10083",
                          "typeString": "literal_string \"PairStableSwap: approve failed!\""
                        },
                        "value": "PairStableSwap: approve failed!"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_83d0a4b192727c7cd8a2654fe5caba12e612139a0786a1e791338f41d2d10083",
                          "typeString": "literal_string \"PairStableSwap: approve failed!\""
                        }
                      ],
                      "id": 6770,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "524:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6779,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "524:98:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6780,
                  "nodeType": "ExpressionStatement",
                  "src": "524:98:55"
                },
                {
                  "assignments": [
                    6782
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6782,
                      "mutability": "mutable",
                      "name": "swapPool",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6834,
                      "src": "626:14:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ISwap_$1866",
                        "typeString": "contract ISwap"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 6781,
                        "name": "ISwap",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 1866,
                        "src": "626:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ISwap_$1866",
                          "typeString": "contract ISwap"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6786,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6784,
                        "name": "swapPoolAddr",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6753,
                        "src": "649:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 6783,
                      "name": "ISwap",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1866,
                      "src": "643:5:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_contract$_ISwap_$1866_$",
                        "typeString": "type(contract ISwap)"
                      }
                    },
                    "id": 6785,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "643:19:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ISwap_$1866",
                      "typeString": "contract ISwap"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "626:36:55"
                },
                {
                  "assignments": [
                    6788
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6788,
                      "mutability": "mutable",
                      "name": "outputAmount",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6834,
                      "src": "666:17:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6787,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "666:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6789,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "666:17:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 6795,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 6792,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "783:1:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 6790,
                          "name": "swapPool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6782,
                          "src": "765:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ISwap_$1866",
                            "typeString": "contract ISwap"
                          }
                        },
                        "id": 6791,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "getToken",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1823,
                        "src": "765:17:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_uint8_$returns$_t_address_$",
                          "typeString": "function (uint8) view external returns (address)"
                        }
                      },
                      "id": 6793,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "765:20:55",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 6794,
                      "name": "input",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6742,
                      "src": "789:5:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "765:29:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 6821,
                    "nodeType": "Block",
                    "src": "879:77:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 6819,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 6809,
                            "name": "outputAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6788,
                            "src": "884:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 6812,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "913:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 6813,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "916:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "id": 6814,
                                "name": "inputAmount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6759,
                                "src": "919:11:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 6815,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "932:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 6816,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "935:5:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 6817,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "935:15:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 6810,
                                "name": "swapPool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6782,
                                "src": "899:8:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_ISwap_$1866",
                                  "typeString": "contract ISwap"
                                }
                              },
                              "id": 6811,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "swap",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1854,
                              "src": "899:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint8,uint8,uint256,uint256,uint256) external returns (uint256)"
                              }
                            },
                            "id": 6818,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "899:52:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "884:67:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6820,
                        "nodeType": "ExpressionStatement",
                        "src": "884:67:55"
                      }
                    ]
                  },
                  "id": 6822,
                  "nodeType": "IfStatement",
                  "src": "761:195:55",
                  "trueBody": {
                    "id": 6808,
                    "nodeType": "Block",
                    "src": "796:77:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 6806,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 6796,
                            "name": "outputAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6788,
                            "src": "801:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 6799,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "830:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 6800,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "833:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              {
                                "argumentTypes": null,
                                "id": 6801,
                                "name": "inputAmount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6759,
                                "src": "836:11:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 6802,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "849:1:55",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 6803,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "852:5:55",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 6804,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "852:15:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 6797,
                                "name": "swapPool",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6782,
                                "src": "816:8:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_contract$_ISwap_$1866",
                                  "typeString": "contract ISwap"
                                }
                              },
                              "id": 6798,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "swap",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 1854,
                              "src": "816:13:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_external_nonpayable$_t_uint8_$_t_uint8_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint8,uint8,uint256,uint256,uint256) external returns (uint256)"
                              }
                            },
                            "id": 6805,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "816:52:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "801:67:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6807,
                        "nodeType": "ExpressionStatement",
                        "src": "801:67:55"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 6828,
                            "name": "to",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6746,
                            "src": "994:2:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 6829,
                            "name": "outputAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6788,
                            "src": "998:12:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 6825,
                                "name": "output",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6744,
                                "src": "977:6:55",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "id": 6824,
                              "name": "ERC20",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 725,
                              "src": "971:5:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                                "typeString": "type(contract ERC20)"
                              }
                            },
                            "id": 6826,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "971:13:55",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_ERC20_$725",
                              "typeString": "contract ERC20"
                            }
                          },
                          "id": 6827,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "transfer",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 346,
                          "src": "971:22:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                            "typeString": "function (address,uint256) external returns (bool)"
                          }
                        },
                        "id": 6830,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "971:40:55",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "50616972537461626c65537761703a207472616e73666572206661696c656421",
                        "id": 6831,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1016:34:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_bbf884f1b53613ab7704fce2d878c8190eccdb34157806e067029f52b847ffb1",
                          "typeString": "literal_string \"PairStableSwap: transfer failed!\""
                        },
                        "value": "PairStableSwap: transfer failed!"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_bbf884f1b53613ab7704fce2d878c8190eccdb34157806e067029f52b847ffb1",
                          "typeString": "literal_string \"PairStableSwap: transfer failed!\""
                        }
                      ],
                      "id": 6823,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "959:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6832,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "959:92:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6833,
                  "nodeType": "ExpressionStatement",
                  "src": "959:92:55"
                }
              ]
            },
            "documentation": null,
            "functionSelector": "32ef8314",
            "id": 6835,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "swap",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6750,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "409:8:55"
            },
            "parameters": {
              "id": 6749,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6742,
                  "mutability": "mutable",
                  "name": "input",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6835,
                  "src": "328:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6741,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "328:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6744,
                  "mutability": "mutable",
                  "name": "output",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6835,
                  "src": "345:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6743,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "345:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6746,
                  "mutability": "mutable",
                  "name": "to",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6835,
                  "src": "363:10:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6745,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "363:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6748,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6835,
                  "src": "377:19:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6747,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "377:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "324:75:55"
            },
            "returnParameters": {
              "id": 6751,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "418:0:55"
            },
            "scope": 6907,
            "src": "311:744:55",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 6851,
              "nodeType": "Block",
              "src": "1140:131:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6846,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6843,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6837,
                            "src": "1152:4:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 6844,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "1152:11:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "hexValue": "3230",
                          "id": 6845,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1167:2:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_20_by_1",
                            "typeString": "int_const 20"
                          },
                          "value": "20"
                        },
                        "src": "1152:17:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "50616972537461626c65537761703a20696e76616c6964206461746121",
                        "id": 6847,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1171:31:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_e2b17505fb5afe3686b15f26be3ba2e92812891745d41a0cf8ca23d70b235c5c",
                          "typeString": "literal_string \"PairStableSwap: invalid data!\""
                        },
                        "value": "PairStableSwap: invalid data!"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_e2b17505fb5afe3686b15f26be3ba2e92812891745d41a0cf8ca23d70b235c5c",
                          "typeString": "literal_string \"PairStableSwap: invalid data!\""
                        }
                      ],
                      "id": 6842,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "1144:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6848,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1144:59:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6849,
                  "nodeType": "ExpressionStatement",
                  "src": "1144:59:55"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "1218:50:55",
                    "statements": [
                      {
                        "nodeType": "YulAssignment",
                        "src": "1226:36:55",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "1252:4:55"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "1258:2:55",
                                  "type": "",
                                  "value": "20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "1248:3:55"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "1248:13:55"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "1242:5:55"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1242:20:55"
                        },
                        "variableNames": [
                          {
                            "name": "swapPoolAddr",
                            "nodeType": "YulIdentifier",
                            "src": "1226:12:55"
                          }
                        ]
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6837,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1252:4:55",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6840,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1226:12:55",
                      "valueSize": 1
                    }
                  ],
                  "id": 6850,
                  "nodeType": "InlineAssembly",
                  "src": "1209:59:55"
                }
              ]
            },
            "documentation": null,
            "id": 6852,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "parseData",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 6838,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6837,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6852,
                  "src": "1077:17:55",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6836,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1077:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1076:19:55"
            },
            "returnParameters": {
              "id": 6841,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6840,
                  "mutability": "mutable",
                  "name": "swapPoolAddr",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6852,
                  "src": "1118:20:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6839,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1118:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1117:22:55"
            },
            "scope": 6907,
            "src": "1058:213:55",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "baseFunctions": [
              5324
            ],
            "body": {
              "id": 6901,
              "nodeType": "Block",
              "src": "1413:314:55",
              "statements": [
                {
                  "assignments": [
                    6867
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6867,
                      "mutability": "mutable",
                      "name": "swapPoolAddr",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6901,
                      "src": "1417:20:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "typeName": {
                        "id": 6866,
                        "name": "address",
                        "nodeType": "ElementaryTypeName",
                        "src": "1417:7:55",
                        "stateMutability": "nonpayable",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6871,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6869,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6860,
                        "src": "1450:4:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes_calldata_ptr",
                          "typeString": "bytes calldata"
                        }
                      ],
                      "id": 6868,
                      "name": "parseData",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6852,
                      "src": "1440:9:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_address_$",
                        "typeString": "function (bytes memory) pure returns (address)"
                      }
                    },
                    "id": 6870,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1440:15:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1417:38:55"
                },
                {
                  "assignments": [
                    6873
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6873,
                      "mutability": "mutable",
                      "name": "swapPool",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 6901,
                      "src": "1459:14:55",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_ISwap_$1866",
                        "typeString": "contract ISwap"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 6872,
                        "name": "ISwap",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 1866,
                        "src": "1459:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_ISwap_$1866",
                          "typeString": "contract ISwap"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6877,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6875,
                        "name": "swapPoolAddr",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6867,
                        "src": "1482:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 6874,
                      "name": "ISwap",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1866,
                      "src": "1476:5:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_contract$_ISwap_$1866_$",
                        "typeString": "type(contract ISwap)"
                      }
                    },
                    "id": 6876,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1476:19:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_ISwap_$1866",
                      "typeString": "contract ISwap"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1459:36:55"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 6883,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 6880,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "1595:1:55",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 6878,
                          "name": "swapPool",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6873,
                          "src": "1577:8:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_ISwap_$1866",
                            "typeString": "contract ISwap"
                          }
                        },
                        "id": 6879,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "getToken",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1823,
                        "src": "1577:17:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_uint8_$returns$_t_address_$",
                          "typeString": "function (uint8) view external returns (address)"
                        }
                      },
                      "id": 6881,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1577:20:55",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 6882,
                      "name": "input",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6854,
                      "src": "1601:5:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1577:29:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 6899,
                    "nodeType": "Block",
                    "src": "1669:55:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "31",
                              "id": 6894,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1704:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 6895,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1707:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "id": 6896,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6858,
                              "src": "1710:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 6892,
                              "name": "swapPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6873,
                              "src": "1681:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ISwap_$1866",
                                "typeString": "contract ISwap"
                              }
                            },
                            "id": 6893,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "calculateSwap",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1865,
                            "src": "1681:22:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint8_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint8,uint8,uint256) view external returns (uint256)"
                            }
                          },
                          "id": 6897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1681:38:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6865,
                        "id": 6898,
                        "nodeType": "Return",
                        "src": "1674:45:55"
                      }
                    ]
                  },
                  "id": 6900,
                  "nodeType": "IfStatement",
                  "src": "1573:151:55",
                  "trueBody": {
                    "id": 6891,
                    "nodeType": "Block",
                    "src": "1608:55:55",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 6886,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1643:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "31",
                              "id": 6887,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1646:1:55",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            {
                              "argumentTypes": null,
                              "id": 6888,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6858,
                              "src": "1649:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 6884,
                              "name": "swapPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6873,
                              "src": "1620:8:55",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ISwap_$1866",
                                "typeString": "contract ISwap"
                              }
                            },
                            "id": 6885,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "calculateSwap",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1865,
                            "src": "1620:22:55",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_uint8_$_t_uint8_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint8,uint8,uint256) view external returns (uint256)"
                            }
                          },
                          "id": 6889,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1620:38:55",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6865,
                        "id": 6890,
                        "nodeType": "Return",
                        "src": "1613:45:55"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": null,
            "functionSelector": "7eace892",
            "id": 6902,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getOutputAmount",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 6862,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "1379:8:55"
            },
            "parameters": {
              "id": 6861,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6854,
                  "mutability": "mutable",
                  "name": "input",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6902,
                  "src": "1302:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6853,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1302:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6856,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6902,
                  "src": "1319:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6855,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1319:7:55",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6858,
                  "mutability": "mutable",
                  "name": "amountIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6902,
                  "src": "1330:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6857,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1330:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6860,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6902,
                  "src": "1347:19:55",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_calldata_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6859,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1347:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1298:71:55"
            },
            "returnParameters": {
              "id": 6865,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6864,
                  "mutability": "mutable",
                  "name": "amountOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 6902,
                  "src": "1397:14:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6863,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1397:4:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1396:16:55"
            },
            "scope": 6907,
            "src": "1274:453:55",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 6905,
              "nodeType": "Block",
              "src": "1757:2:55",
              "statements": []
            },
            "documentation": null,
            "id": 6906,
            "implemented": true,
            "kind": "receive",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 6903,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1737:2:55"
            },
            "returnParameters": {
              "id": 6904,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1757:0:55"
            },
            "scope": 6907,
            "src": "1730:29:55",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          }
        ],
        "scope": 6908,
        "src": "240:1521:55"
      }
    ],
    "src": "32:1729:55"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/swappa/PairStableSwap.sol",
      "exportedSymbols": {
        "PairStableSwap": [
          6907
        ]
      },
      "license": "MIT"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "0.6",
            ".8"
          ]
        },
        "id": 6731,
        "name": "PragmaDirective",
        "src": "32:22:55"
      },
      {
        "attributes": {
          "SourceUnit": 219,
          "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
          "file": "@openzeppelin/contracts/math/SafeMath.sol",
          "scope": 6908,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 6732,
        "name": "ImportDirective",
        "src": "56:51:55"
      },
      {
        "attributes": {
          "SourceUnit": 726,
          "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
          "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
          "scope": 6908,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 6733,
        "name": "ImportDirective",
        "src": "108:55:55"
      },
      {
        "attributes": {
          "SourceUnit": 1867,
          "absolutePath": "project:/contracts/interfaces/stableswap/ISwap.sol",
          "file": "../interfaces/stableswap/ISwap.sol",
          "scope": 6908,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 6734,
        "name": "ImportDirective",
        "src": "164:44:55"
      },
      {
        "attributes": {
          "SourceUnit": 5326,
          "absolutePath": "project:/contracts/swappa/ISwappaPairV1.sol",
          "file": "./ISwappaPairV1.sol",
          "scope": 6908,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 6735,
        "name": "ImportDirective",
        "src": "209:29:55"
      },
      {
        "attributes": {
          "abstract": false,
          "contractDependencies": [
            5325
          ],
          "contractKind": "contract",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            6907,
            5325
          ],
          "name": "PairStableSwap",
          "scope": 6908
        },
        "children": [
          {
            "attributes": {
              "arguments": null
            },
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "ISwappaPairV1",
                  "referencedDeclaration": 5325,
                  "type": "contract ISwappaPairV1"
                },
                "id": 6736,
                "name": "UserDefinedTypeName",
                "src": "267:13:55"
              }
            ],
            "id": 6737,
            "name": "InheritanceSpecifier",
            "src": "267:13:55"
          },
          {
            "children": [
              {
                "attributes": {
                  "contractScope": null,
                  "name": "SafeMath",
                  "referencedDeclaration": 218,
                  "type": "library SafeMath"
                },
                "id": 6738,
                "name": "UserDefinedTypeName",
                "src": "290:8:55"
              },
              {
                "attributes": {
                  "name": "uint",
                  "type": "uint256"
                },
                "id": 6739,
                "name": "ElementaryTypeName",
                "src": "303:4:55"
              }
            ],
            "id": 6740,
            "name": "UsingForDirective",
            "src": "284:24:55"
          },
          {
            "attributes": {
              "baseFunctions": [
                5311
              ],
              "documentation": null,
              "functionSelector": "32ef8314",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "swap",
              "scope": 6907,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 6750,
                "name": "OverrideSpecifier",
                "src": "409:8:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "input",
                      "overrides": null,
                      "scope": 6835,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6741,
                        "name": "ElementaryTypeName",
                        "src": "328:7:55"
                      }
                    ],
                    "id": 6742,
                    "name": "VariableDeclaration",
                    "src": "328:13:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "output",
                      "overrides": null,
                      "scope": 6835,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6743,
                        "name": "ElementaryTypeName",
                        "src": "345:7:55"
                      }
                    ],
                    "id": 6744,
                    "name": "VariableDeclaration",
                    "src": "345:14:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "to",
                      "overrides": null,
                      "scope": 6835,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6745,
                        "name": "ElementaryTypeName",
                        "src": "363:7:55"
                      }
                    ],
                    "id": 6746,
                    "name": "VariableDeclaration",
                    "src": "363:10:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "overrides": null,
                      "scope": 6835,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 6747,
                        "name": "ElementaryTypeName",
                        "src": "377:5:55"
                      }
                    ],
                    "id": 6748,
                    "name": "VariableDeclaration",
                    "src": "377:19:55"
                  }
                ],
                "id": 6749,
                "name": "ParameterList",
                "src": "324:75:55"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6751,
                "name": "ParameterList",
                "src": "418:0:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        6753
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "swapPoolAddr",
                          "overrides": null,
                          "scope": 6834,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "address",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "address",
                              "stateMutability": "nonpayable",
                              "type": "address"
                            },
                            "id": 6752,
                            "name": "ElementaryTypeName",
                            "src": "422:7:55"
                          }
                        ],
                        "id": 6753,
                        "name": "VariableDeclaration",
                        "src": "422:20:55"
                      },
                      {
                        "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_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6852,
                              "type": "function (bytes memory) pure returns (address)",
                              "value": "parseData"
                            },
                            "id": 6754,
                            "name": "Identifier",
                            "src": "445:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6748,
                              "type": "bytes calldata",
                              "value": "data"
                            },
                            "id": 6755,
                            "name": "Identifier",
                            "src": "455:4:55"
                          }
                        ],
                        "id": 6756,
                        "name": "FunctionCall",
                        "src": "445:15:55"
                      }
                    ],
                    "id": 6757,
                    "name": "VariableDeclarationStatement",
                    "src": "422:38:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        6759
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "inputAmount",
                          "overrides": null,
                          "scope": 6834,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 6758,
                            "name": "ElementaryTypeName",
                            "src": "464:4:55"
                          }
                        ],
                        "id": 6759,
                        "name": "VariableDeclaration",
                        "src": "464:16:55"
                      },
                      {
                        "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_payable",
                                  "typeString": "address payable"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "balanceOf",
                              "referencedDeclaration": 325,
                              "type": "function (address) view external returns (uint256)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "contract ERC20",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address",
                                          "typeString": "address"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 725,
                                      "type": "type(contract ERC20)",
                                      "value": "ERC20"
                                    },
                                    "id": 6760,
                                    "name": "Identifier",
                                    "src": "483:5:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6742,
                                      "type": "address",
                                      "value": "input"
                                    },
                                    "id": 6761,
                                    "name": "Identifier",
                                    "src": "489:5:55"
                                  }
                                ],
                                "id": 6762,
                                "name": "FunctionCall",
                                "src": "483:12:55"
                              }
                            ],
                            "id": 6763,
                            "name": "MemberAccess",
                            "src": "483:22:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "address payable",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_PairStableSwap_$6907",
                                      "typeString": "contract PairStableSwap"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "address",
                                      "type": null
                                    },
                                    "id": 6764,
                                    "name": "ElementaryTypeName",
                                    "src": "506:7:55"
                                  }
                                ],
                                "id": 6765,
                                "name": "ElementaryTypeNameExpression",
                                "src": "506:7:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": -28,
                                  "type": "contract PairStableSwap",
                                  "value": "this"
                                },
                                "id": 6766,
                                "name": "Identifier",
                                "src": "514:4:55"
                              }
                            ],
                            "id": 6767,
                            "name": "FunctionCall",
                            "src": "506:13:55"
                          }
                        ],
                        "id": 6768,
                        "name": "FunctionCall",
                        "src": "483:37:55"
                      }
                    ],
                    "id": 6769,
                    "name": "VariableDeclarationStatement",
                    "src": "464:56:55"
                  },
                  {
                    "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_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_83d0a4b192727c7cd8a2654fe5caba12e612139a0786a1e791338f41d2d10083",
                                  "typeString": "literal_string \"PairStableSwap: approve failed!\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6770,
                            "name": "Identifier",
                            "src": "524:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "bool",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "approve",
                                  "referencedDeclaration": 385,
                                  "type": "function (address,uint256) external returns (bool)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "contract ERC20",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 725,
                                          "type": "type(contract ERC20)",
                                          "value": "ERC20"
                                        },
                                        "id": 6771,
                                        "name": "Identifier",
                                        "src": "536:5:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6742,
                                          "type": "address",
                                          "value": "input"
                                        },
                                        "id": 6772,
                                        "name": "Identifier",
                                        "src": "542:5:55"
                                      }
                                    ],
                                    "id": 6773,
                                    "name": "FunctionCall",
                                    "src": "536:12:55"
                                  }
                                ],
                                "id": 6774,
                                "name": "MemberAccess",
                                "src": "536:20:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6753,
                                  "type": "address",
                                  "value": "swapPoolAddr"
                                },
                                "id": 6775,
                                "name": "Identifier",
                                "src": "557:12:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6759,
                                  "type": "uint256",
                                  "value": "inputAmount"
                                },
                                "id": 6776,
                                "name": "Identifier",
                                "src": "571:11:55"
                              }
                            ],
                            "id": 6777,
                            "name": "FunctionCall",
                            "src": "536:47:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "50616972537461626c65537761703a20617070726f7665206661696c656421",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"PairStableSwap: approve failed!\"",
                              "value": "PairStableSwap: approve failed!"
                            },
                            "id": 6778,
                            "name": "Literal",
                            "src": "588:33:55"
                          }
                        ],
                        "id": 6779,
                        "name": "FunctionCall",
                        "src": "524:98:55"
                      }
                    ],
                    "id": 6780,
                    "name": "ExpressionStatement",
                    "src": "524:98:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        6782
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "swapPool",
                          "overrides": null,
                          "scope": 6834,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "contract ISwap",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "ISwap",
                              "referencedDeclaration": 1866,
                              "type": "contract ISwap"
                            },
                            "id": 6781,
                            "name": "UserDefinedTypeName",
                            "src": "626:5:55"
                          }
                        ],
                        "id": 6782,
                        "name": "VariableDeclaration",
                        "src": "626:14:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "contract ISwap",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1866,
                              "type": "type(contract ISwap)",
                              "value": "ISwap"
                            },
                            "id": 6783,
                            "name": "Identifier",
                            "src": "643:5:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6753,
                              "type": "address",
                              "value": "swapPoolAddr"
                            },
                            "id": 6784,
                            "name": "Identifier",
                            "src": "649:12:55"
                          }
                        ],
                        "id": 6785,
                        "name": "FunctionCall",
                        "src": "643:19:55"
                      }
                    ],
                    "id": 6786,
                    "name": "VariableDeclarationStatement",
                    "src": "626:36:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        6788
                      ],
                      "initialValue": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "outputAmount",
                          "overrides": null,
                          "scope": 6834,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 6787,
                            "name": "ElementaryTypeName",
                            "src": "666:4:55"
                          }
                        ],
                        "id": 6788,
                        "name": "VariableDeclaration",
                        "src": "666:17:55"
                      }
                    ],
                    "id": 6789,
                    "name": "VariableDeclarationStatement",
                    "src": "666:17:55"
                  },
                  {
                    "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,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "address",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "getToken",
                                  "referencedDeclaration": 1823,
                                  "type": "function (uint8) view external returns (address)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6782,
                                      "type": "contract ISwap",
                                      "value": "swapPool"
                                    },
                                    "id": 6790,
                                    "name": "Identifier",
                                    "src": "765:8:55"
                                  }
                                ],
                                "id": 6791,
                                "name": "MemberAccess",
                                "src": "765:17:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 6792,
                                "name": "Literal",
                                "src": "783:1:55"
                              }
                            ],
                            "id": 6793,
                            "name": "FunctionCall",
                            "src": "765:20:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6742,
                              "type": "address",
                              "value": "input"
                            },
                            "id": 6794,
                            "name": "Identifier",
                            "src": "789:5:55"
                          }
                        ],
                        "id": 6795,
                        "name": "BinaryOperation",
                        "src": "765:29:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6788,
                                      "type": "uint256",
                                      "value": "outputAmount"
                                    },
                                    "id": 6796,
                                    "name": "Identifier",
                                    "src": "801:12:55"
                                  },
                                  {
                                    "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_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_1_by_1",
                                              "typeString": "int_const 1"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "swap",
                                          "referencedDeclaration": 1854,
                                          "type": "function (uint8,uint8,uint256,uint256,uint256) external returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6782,
                                              "type": "contract ISwap",
                                              "value": "swapPool"
                                            },
                                            "id": 6797,
                                            "name": "Identifier",
                                            "src": "816:8:55"
                                          }
                                        ],
                                        "id": 6798,
                                        "name": "MemberAccess",
                                        "src": "816:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 6799,
                                        "name": "Literal",
                                        "src": "830:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "31",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 1",
                                          "value": "1"
                                        },
                                        "id": 6800,
                                        "name": "Literal",
                                        "src": "833:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6759,
                                          "type": "uint256",
                                          "value": "inputAmount"
                                        },
                                        "id": 6801,
                                        "name": "Identifier",
                                        "src": "836:11:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 6802,
                                        "name": "Literal",
                                        "src": "849:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "timestamp",
                                          "referencedDeclaration": null,
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": -4,
                                              "type": "block",
                                              "value": "block"
                                            },
                                            "id": 6803,
                                            "name": "Identifier",
                                            "src": "852:5:55"
                                          }
                                        ],
                                        "id": 6804,
                                        "name": "MemberAccess",
                                        "src": "852:15:55"
                                      }
                                    ],
                                    "id": 6805,
                                    "name": "FunctionCall",
                                    "src": "816:52:55"
                                  }
                                ],
                                "id": 6806,
                                "name": "Assignment",
                                "src": "801:67:55"
                              }
                            ],
                            "id": 6807,
                            "name": "ExpressionStatement",
                            "src": "801:67:55"
                          }
                        ],
                        "id": 6808,
                        "name": "Block",
                        "src": "796:77:55"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6788,
                                      "type": "uint256",
                                      "value": "outputAmount"
                                    },
                                    "id": 6809,
                                    "name": "Identifier",
                                    "src": "884:12:55"
                                  },
                                  {
                                    "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_rational_1_by_1",
                                              "typeString": "int_const 1"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_rational_0_by_1",
                                              "typeString": "int_const 0"
                                            },
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "swap",
                                          "referencedDeclaration": 1854,
                                          "type": "function (uint8,uint8,uint256,uint256,uint256) external returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6782,
                                              "type": "contract ISwap",
                                              "value": "swapPool"
                                            },
                                            "id": 6810,
                                            "name": "Identifier",
                                            "src": "899:8:55"
                                          }
                                        ],
                                        "id": 6811,
                                        "name": "MemberAccess",
                                        "src": "899:13:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "31",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 1",
                                          "value": "1"
                                        },
                                        "id": 6812,
                                        "name": "Literal",
                                        "src": "913:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 6813,
                                        "name": "Literal",
                                        "src": "916:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6759,
                                          "type": "uint256",
                                          "value": "inputAmount"
                                        },
                                        "id": 6814,
                                        "name": "Identifier",
                                        "src": "919:11:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "30",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 0",
                                          "value": "0"
                                        },
                                        "id": 6815,
                                        "name": "Literal",
                                        "src": "932:1:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "timestamp",
                                          "referencedDeclaration": null,
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": -4,
                                              "type": "block",
                                              "value": "block"
                                            },
                                            "id": 6816,
                                            "name": "Identifier",
                                            "src": "935:5:55"
                                          }
                                        ],
                                        "id": 6817,
                                        "name": "MemberAccess",
                                        "src": "935:15:55"
                                      }
                                    ],
                                    "id": 6818,
                                    "name": "FunctionCall",
                                    "src": "899:52:55"
                                  }
                                ],
                                "id": 6819,
                                "name": "Assignment",
                                "src": "884:67:55"
                              }
                            ],
                            "id": 6820,
                            "name": "ExpressionStatement",
                            "src": "884:67:55"
                          }
                        ],
                        "id": 6821,
                        "name": "Block",
                        "src": "879:77:55"
                      }
                    ],
                    "id": 6822,
                    "name": "IfStatement",
                    "src": "761:195:55"
                  },
                  {
                    "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_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_bbf884f1b53613ab7704fce2d878c8190eccdb34157806e067029f52b847ffb1",
                                  "typeString": "literal_string \"PairStableSwap: transfer failed!\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6823,
                            "name": "Identifier",
                            "src": "959:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "bool",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "transfer",
                                  "referencedDeclaration": 346,
                                  "type": "function (address,uint256) external returns (bool)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "contract ERC20",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_address",
                                              "typeString": "address"
                                            }
                                          ],
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 725,
                                          "type": "type(contract ERC20)",
                                          "value": "ERC20"
                                        },
                                        "id": 6824,
                                        "name": "Identifier",
                                        "src": "971:5:55"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6744,
                                          "type": "address",
                                          "value": "output"
                                        },
                                        "id": 6825,
                                        "name": "Identifier",
                                        "src": "977:6:55"
                                      }
                                    ],
                                    "id": 6826,
                                    "name": "FunctionCall",
                                    "src": "971:13:55"
                                  }
                                ],
                                "id": 6827,
                                "name": "MemberAccess",
                                "src": "971:22:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6746,
                                  "type": "address",
                                  "value": "to"
                                },
                                "id": 6828,
                                "name": "Identifier",
                                "src": "994:2:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6788,
                                  "type": "uint256",
                                  "value": "outputAmount"
                                },
                                "id": 6829,
                                "name": "Identifier",
                                "src": "998:12:55"
                              }
                            ],
                            "id": 6830,
                            "name": "FunctionCall",
                            "src": "971:40:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "50616972537461626c65537761703a207472616e73666572206661696c656421",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"PairStableSwap: transfer failed!\"",
                              "value": "PairStableSwap: transfer failed!"
                            },
                            "id": 6831,
                            "name": "Literal",
                            "src": "1016:34:55"
                          }
                        ],
                        "id": 6832,
                        "name": "FunctionCall",
                        "src": "959:92:55"
                      }
                    ],
                    "id": 6833,
                    "name": "ExpressionStatement",
                    "src": "959:92:55"
                  }
                ],
                "id": 6834,
                "name": "Block",
                "src": "418:637:55"
              }
            ],
            "id": 6835,
            "name": "FunctionDefinition",
            "src": "311:744:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "parseData",
              "overrides": null,
              "scope": 6907,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "private"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "overrides": null,
                      "scope": 6852,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 6836,
                        "name": "ElementaryTypeName",
                        "src": "1077:5:55"
                      }
                    ],
                    "id": 6837,
                    "name": "VariableDeclaration",
                    "src": "1077:17:55"
                  }
                ],
                "id": 6838,
                "name": "ParameterList",
                "src": "1076:19:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "swapPoolAddr",
                      "overrides": null,
                      "scope": 6852,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6839,
                        "name": "ElementaryTypeName",
                        "src": "1118:7:55"
                      }
                    ],
                    "id": 6840,
                    "name": "VariableDeclaration",
                    "src": "1118:20:55"
                  }
                ],
                "id": 6841,
                "name": "ParameterList",
                "src": "1117:22:55"
              },
              {
                "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_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_e2b17505fb5afe3686b15f26be3ba2e92812891745d41a0cf8ca23d70b235c5c",
                                  "typeString": "literal_string \"PairStableSwap: invalid data!\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6842,
                            "name": "Identifier",
                            "src": "1144:7:55"
                          },
                          {
                            "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": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "referencedDeclaration": null,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6837,
                                      "type": "bytes memory",
                                      "value": "data"
                                    },
                                    "id": 6843,
                                    "name": "Identifier",
                                    "src": "1152:4:55"
                                  }
                                ],
                                "id": 6844,
                                "name": "MemberAccess",
                                "src": "1152:11:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "3230",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 20",
                                  "value": "20"
                                },
                                "id": 6845,
                                "name": "Literal",
                                "src": "1167:2:55"
                              }
                            ],
                            "id": 6846,
                            "name": "BinaryOperation",
                            "src": "1152:17:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "50616972537461626c65537761703a20696e76616c6964206461746121",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"PairStableSwap: invalid data!\"",
                              "value": "PairStableSwap: invalid data!"
                            },
                            "id": 6847,
                            "name": "Literal",
                            "src": "1171:31:55"
                          }
                        ],
                        "id": 6848,
                        "name": "FunctionCall",
                        "src": "1144:59:55"
                      }
                    ],
                    "id": 6849,
                    "name": "ExpressionStatement",
                    "src": "1144:59:55"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 6837,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "1252:4:55",
                          "valueSize": 1
                        },
                        {
                          "declaration": 6840,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "1226:12:55",
                          "valueSize": 1
                        }
                      ],
                      "operations": "{\n    swapPoolAddr := mload(add(data, 20))\n}"
                    },
                    "children": [],
                    "id": 6850,
                    "name": "InlineAssembly",
                    "src": "1209:59:55"
                  }
                ],
                "id": 6851,
                "name": "Block",
                "src": "1140:131:55"
              }
            ],
            "id": 6852,
            "name": "FunctionDefinition",
            "src": "1058:213:55"
          },
          {
            "attributes": {
              "baseFunctions": [
                5324
              ],
              "documentation": null,
              "functionSelector": "7eace892",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "getOutputAmount",
              "scope": 6907,
              "stateMutability": "nonpayable",
              "virtual": false,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "overrides": [
                    null
                  ]
                },
                "id": 6862,
                "name": "OverrideSpecifier",
                "src": "1379:8:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "input",
                      "overrides": null,
                      "scope": 6902,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6853,
                        "name": "ElementaryTypeName",
                        "src": "1302:7:55"
                      }
                    ],
                    "id": 6854,
                    "name": "VariableDeclaration",
                    "src": "1302:13:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "overrides": null,
                      "scope": 6902,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6855,
                        "name": "ElementaryTypeName",
                        "src": "1319:7:55"
                      }
                    ],
                    "id": 6856,
                    "name": "VariableDeclaration",
                    "src": "1319:7:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amountIn",
                      "overrides": null,
                      "scope": 6902,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 6857,
                        "name": "ElementaryTypeName",
                        "src": "1330:4:55"
                      }
                    ],
                    "id": 6858,
                    "name": "VariableDeclaration",
                    "src": "1330:13:55"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "overrides": null,
                      "scope": 6902,
                      "stateVariable": false,
                      "storageLocation": "calldata",
                      "type": "bytes",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 6859,
                        "name": "ElementaryTypeName",
                        "src": "1347:5:55"
                      }
                    ],
                    "id": 6860,
                    "name": "VariableDeclaration",
                    "src": "1347:19:55"
                  }
                ],
                "id": 6861,
                "name": "ParameterList",
                "src": "1298:71:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amountOut",
                      "overrides": null,
                      "scope": 6902,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 6863,
                        "name": "ElementaryTypeName",
                        "src": "1397:4:55"
                      }
                    ],
                    "id": 6864,
                    "name": "VariableDeclaration",
                    "src": "1397:14:55"
                  }
                ],
                "id": 6865,
                "name": "ParameterList",
                "src": "1396:16:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        6867
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "swapPoolAddr",
                          "overrides": null,
                          "scope": 6901,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "address",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "address",
                              "stateMutability": "nonpayable",
                              "type": "address"
                            },
                            "id": 6866,
                            "name": "ElementaryTypeName",
                            "src": "1417:7:55"
                          }
                        ],
                        "id": 6867,
                        "name": "VariableDeclaration",
                        "src": "1417:20:55"
                      },
                      {
                        "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_bytes_calldata_ptr",
                                  "typeString": "bytes calldata"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6852,
                              "type": "function (bytes memory) pure returns (address)",
                              "value": "parseData"
                            },
                            "id": 6868,
                            "name": "Identifier",
                            "src": "1440:9:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6860,
                              "type": "bytes calldata",
                              "value": "data"
                            },
                            "id": 6869,
                            "name": "Identifier",
                            "src": "1450:4:55"
                          }
                        ],
                        "id": 6870,
                        "name": "FunctionCall",
                        "src": "1440:15:55"
                      }
                    ],
                    "id": 6871,
                    "name": "VariableDeclarationStatement",
                    "src": "1417:38:55"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        6873
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "swapPool",
                          "overrides": null,
                          "scope": 6901,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "contract ISwap",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "ISwap",
                              "referencedDeclaration": 1866,
                              "type": "contract ISwap"
                            },
                            "id": 6872,
                            "name": "UserDefinedTypeName",
                            "src": "1459:5:55"
                          }
                        ],
                        "id": 6873,
                        "name": "VariableDeclaration",
                        "src": "1459:14:55"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "contract ISwap",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1866,
                              "type": "type(contract ISwap)",
                              "value": "ISwap"
                            },
                            "id": 6874,
                            "name": "Identifier",
                            "src": "1476:5:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6867,
                              "type": "address",
                              "value": "swapPoolAddr"
                            },
                            "id": 6875,
                            "name": "Identifier",
                            "src": "1482:12:55"
                          }
                        ],
                        "id": 6876,
                        "name": "FunctionCall",
                        "src": "1476:19:55"
                      }
                    ],
                    "id": 6877,
                    "name": "VariableDeclarationStatement",
                    "src": "1459:36:55"
                  },
                  {
                    "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,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "address",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "getToken",
                                  "referencedDeclaration": 1823,
                                  "type": "function (uint8) view external returns (address)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6873,
                                      "type": "contract ISwap",
                                      "value": "swapPool"
                                    },
                                    "id": 6878,
                                    "name": "Identifier",
                                    "src": "1577:8:55"
                                  }
                                ],
                                "id": 6879,
                                "name": "MemberAccess",
                                "src": "1577:17:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 6880,
                                "name": "Literal",
                                "src": "1595:1:55"
                              }
                            ],
                            "id": 6881,
                            "name": "FunctionCall",
                            "src": "1577:20:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6854,
                              "type": "address",
                              "value": "input"
                            },
                            "id": 6882,
                            "name": "Identifier",
                            "src": "1601:5:55"
                          }
                        ],
                        "id": 6883,
                        "name": "BinaryOperation",
                        "src": "1577:29:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 6865
                            },
                            "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_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "calculateSwap",
                                      "referencedDeclaration": 1865,
                                      "type": "function (uint8,uint8,uint256) view external returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6873,
                                          "type": "contract ISwap",
                                          "value": "swapPool"
                                        },
                                        "id": 6884,
                                        "name": "Identifier",
                                        "src": "1620:8:55"
                                      }
                                    ],
                                    "id": 6885,
                                    "name": "MemberAccess",
                                    "src": "1620:22:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6886,
                                    "name": "Literal",
                                    "src": "1643:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 6887,
                                    "name": "Literal",
                                    "src": "1646:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6858,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 6888,
                                    "name": "Identifier",
                                    "src": "1649:8:55"
                                  }
                                ],
                                "id": 6889,
                                "name": "FunctionCall",
                                "src": "1620:38:55"
                              }
                            ],
                            "id": 6890,
                            "name": "Return",
                            "src": "1613:45:55"
                          }
                        ],
                        "id": 6891,
                        "name": "Block",
                        "src": "1608:55:55"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 6865
                            },
                            "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_rational_1_by_1",
                                          "typeString": "int_const 1"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "calculateSwap",
                                      "referencedDeclaration": 1865,
                                      "type": "function (uint8,uint8,uint256) view external returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6873,
                                          "type": "contract ISwap",
                                          "value": "swapPool"
                                        },
                                        "id": 6892,
                                        "name": "Identifier",
                                        "src": "1681:8:55"
                                      }
                                    ],
                                    "id": 6893,
                                    "name": "MemberAccess",
                                    "src": "1681:22:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "31",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1",
                                      "value": "1"
                                    },
                                    "id": 6894,
                                    "name": "Literal",
                                    "src": "1704:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6895,
                                    "name": "Literal",
                                    "src": "1707:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6858,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 6896,
                                    "name": "Identifier",
                                    "src": "1710:8:55"
                                  }
                                ],
                                "id": 6897,
                                "name": "FunctionCall",
                                "src": "1681:38:55"
                              }
                            ],
                            "id": 6898,
                            "name": "Return",
                            "src": "1674:45:55"
                          }
                        ],
                        "id": 6899,
                        "name": "Block",
                        "src": "1669:55:55"
                      }
                    ],
                    "id": 6900,
                    "name": "IfStatement",
                    "src": "1573:151:55"
                  }
                ],
                "id": 6901,
                "name": "Block",
                "src": "1413:314:55"
              }
            ],
            "id": 6902,
            "name": "FunctionDefinition",
            "src": "1274:453:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "receive",
              "modifiers": [
                null
              ],
              "name": "",
              "overrides": null,
              "scope": 6907,
              "stateMutability": "payable",
              "virtual": false,
              "visibility": "external"
            },
            "children": [
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6903,
                "name": "ParameterList",
                "src": "1737:2:55"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6904,
                "name": "ParameterList",
                "src": "1757:0:55"
              },
              {
                "attributes": {
                  "statements": [
                    null
                  ]
                },
                "children": [],
                "id": 6905,
                "name": "Block",
                "src": "1757:2:55"
              }
            ],
            "id": 6906,
            "name": "FunctionDefinition",
            "src": "1730:29:55"
          }
        ],
        "id": 6907,
        "name": "ContractDefinition",
        "src": "240:1521:55"
      }
    ],
    "id": 6908,
    "name": "SourceUnit",
    "src": "32:1729:55"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.8+commit.0bbfe453.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2025-02-07T17:50:42.842Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}