{
    "contractName": "PairBPool",
    "abi": [
        {
            "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": "output",
                    "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\":\"output\",\"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\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/swappa/PairBPool.sol\":\"PairBPool\"},\"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/balancer/IBPool.sol\":{\"keccak256\":\"0x44aabc527a41d03edb6168085847ffcee7ef767403ad3967f3240f3a2ebc8406\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b9352a211a4925a54a9436cde96f92b6413e3c42b42e74cb4acf728a52059516\",\"dweb:/ipfs/QmdLz1gPMciRXhgoePHngg3J6iWELKbZ1XcZHsG4M5N4Ef\"]},\"project:/contracts/swappa/ISwappaPairV1.sol\":{\"keccak256\":\"0x3ad68981bda91ed83c5e9ee8617f08bb5e208208477fb755cc77077f127010ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8e4390b1bebc39f58bff34b9099a646ead67cef27b722ef61548487251cca719\",\"dweb:/ipfs/QmRWEuYyjHaS957VKWtTfDpzfqkXb2bvEsS33meAC76ZuU\"]},\"project:/contracts/swappa/PairBPool.sol\":{\"keccak256\":\"0x87f2831358fdfdc74ec8761cbc934d854b8b2b88a434badc6ab052605a867c87\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2a7cf356c14a5fe9a2084add0fea86f52e3a68b9168d64ed011b4268cf8d936e\",\"dweb:/ipfs/QmY61BkLvDMkXCrMXTKrY5aXf1gqWrNnSPZxVd8oJ11LpQ\"]}},\"version\":1}",
    "bytecode": "0x608060405234801561001057600080fd5b50610a42806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806332ef83141461003b5780637eace892146100db575b600080fd5b6100d96004803603608081101561005157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169181019060808101606082013564010000000081111561009a57600080fd5b8201836020820111156100ac57600080fd5b803590602001918460018302840111640100000000831117156100ce57600080fd5b50909250905061018a565b005b610178600480360360808110156100f157600080fd5b73ffffffffffffffffffffffffffffffffffffffff82358116926020810135909116916040820135919081019060808101606082013564010000000081111561013957600080fd5b82018360208201111561014b57600080fd5b8035906020019184600183028401116401000000008311171561016d57600080fd5b509092509050610572565b60408051918252519081900360200190f35b60006101cb83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061099292505050565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561023d57600080fd5b505afa158015610251573d6000803e3d6000fd5b505050506040513d602081101561026757600080fd5b5051604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509089169163095ea7b3916044808201926020929091908290030181600087803b1580156102e557600080fd5b505af11580156102f9573d6000803e3d6000fd5b505050506040513d602081101561030f57600080fd5b505161037c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f5061697242506f6f6c3a20617070726f7665206661696c656421000000000000604482015290519081900360640190fd5b604080517f8201aa3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820184905288811660448301526000606483018190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848401528351909391861692638201aa3f9260a480830193919282900301818787803b15801561042957600080fd5b505af115801561043d573d6000803e3d6000fd5b505050506040513d604081101561045357600080fd5b5051604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820184905291519293509089169163a9059cbb916044808201926020929091908290030181600087803b1580156104d157600080fd5b505af11580156104e5573d6000803e3d6000fd5b505050506040513d60208110156104fb57600080fd5b505161056857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5061697242506f6f6c3a207472616e73666572206661696c6564210000000000604482015290519081900360640190fd5b5050505050505050565b6000806105b484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061099292505050565b90508073ffffffffffffffffffffffffffffffffffffffff1663ba9530a68273ffffffffffffffffffffffffffffffffffffffff1663f8b2cb4f8a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561064f57600080fd5b505afa158015610663573d6000803e3d6000fd5b505050506040513d602081101561067957600080fd5b5051604080517f948d8ce600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015291519186169163948d8ce691602480820192602092909190829003018186803b1580156106eb57600080fd5b505afa1580156106ff573d6000803e3d6000fd5b505050506040513d602081101561071557600080fd5b5051604080517ff8b2cb4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015291519187169163f8b2cb4f91602480820192602092909190829003018186803b15801561078757600080fd5b505afa15801561079b573d6000803e3d6000fd5b505050506040513d60208110156107b157600080fd5b5051604080517f948d8ce600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d8116600483015291519188169163948d8ce691602480820192602092909190829003018186803b15801561082357600080fd5b505afa158015610837573d6000803e3d6000fd5b505050506040513d602081101561084d57600080fd5b5051604080517fd4cadf6800000000000000000000000000000000000000000000000000000000815290518c9173ffffffffffffffffffffffffffffffffffffffff8a169163d4cadf6891600480820192602092909190829003018186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d60208110156108e257600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08a901b1681526004810197909752602487019590955260448601939093526064850191909152608484015260a48301525160c4808301926020929190829003018186803b15801561095b57600080fd5b505afa15801561096f573d6000803e3d6000fd5b505050506040513d602081101561098557600080fd5b5051979650505050505050565b60008151601414610a0457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5061697242506f6f6c3a20696e76616c69642064617461210000000000000000604482015290519081900360640190fd5b50601401519056fea264697066735822122085d4999e19471f303d14f0f1fb41debfef9c2c935c24ac958ef27aa9fa590b3864736f6c63430006080033",
    "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806332ef83141461003b5780637eace892146100db575b600080fd5b6100d96004803603608081101561005157600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235811692602081013582169260408201359092169181019060808101606082013564010000000081111561009a57600080fd5b8201836020820111156100ac57600080fd5b803590602001918460018302840111640100000000831117156100ce57600080fd5b50909250905061018a565b005b610178600480360360808110156100f157600080fd5b73ffffffffffffffffffffffffffffffffffffffff82358116926020810135909116916040820135919081019060808101606082013564010000000081111561013957600080fd5b82018360208201111561014b57600080fd5b8035906020019184600183028401116401000000008311171561016d57600080fd5b509092509050610572565b60408051918252519081900360200190f35b60006101cb83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061099292505050565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b15801561023d57600080fd5b505afa158015610251573d6000803e3d6000fd5b505050506040513d602081101561026757600080fd5b5051604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526024820184905291519293509089169163095ea7b3916044808201926020929091908290030181600087803b1580156102e557600080fd5b505af11580156102f9573d6000803e3d6000fd5b505050506040513d602081101561030f57600080fd5b505161037c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f5061697242506f6f6c3a20617070726f7665206661696c656421000000000000604482015290519081900360640190fd5b604080517f8201aa3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820184905288811660448301526000606483018190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60848401528351909391861692638201aa3f9260a480830193919282900301818787803b15801561042957600080fd5b505af115801561043d573d6000803e3d6000fd5b505050506040513d604081101561045357600080fd5b5051604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526024820184905291519293509089169163a9059cbb916044808201926020929091908290030181600087803b1580156104d157600080fd5b505af11580156104e5573d6000803e3d6000fd5b505050506040513d60208110156104fb57600080fd5b505161056857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5061697242506f6f6c3a207472616e73666572206661696c6564210000000000604482015290519081900360640190fd5b5050505050505050565b6000806105b484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061099292505050565b90508073ffffffffffffffffffffffffffffffffffffffff1663ba9530a68273ffffffffffffffffffffffffffffffffffffffff1663f8b2cb4f8a6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561064f57600080fd5b505afa158015610663573d6000803e3d6000fd5b505050506040513d602081101561067957600080fd5b5051604080517f948d8ce600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015291519186169163948d8ce691602480820192602092909190829003018186803b1580156106eb57600080fd5b505afa1580156106ff573d6000803e3d6000fd5b505050506040513d602081101561071557600080fd5b5051604080517ff8b2cb4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015291519187169163f8b2cb4f91602480820192602092909190829003018186803b15801561078757600080fd5b505afa15801561079b573d6000803e3d6000fd5b505050506040513d60208110156107b157600080fd5b5051604080517f948d8ce600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8d8116600483015291519188169163948d8ce691602480820192602092909190829003018186803b15801561082357600080fd5b505afa158015610837573d6000803e3d6000fd5b505050506040513d602081101561084d57600080fd5b5051604080517fd4cadf6800000000000000000000000000000000000000000000000000000000815290518c9173ffffffffffffffffffffffffffffffffffffffff8a169163d4cadf6891600480820192602092909190829003018186803b1580156108b857600080fd5b505afa1580156108cc573d6000803e3d6000fd5b505050506040513d60208110156108e257600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08a901b1681526004810197909752602487019590955260448601939093526064850191909152608484015260a48301525160c4808301926020929190829003018186803b15801561095b57600080fd5b505afa15801561096f573d6000803e3d6000fd5b505050506040513d602081101561098557600080fd5b5051979650505050505050565b60008151601414610a0457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f5061697242506f6f6c3a20696e76616c69642064617461210000000000000000604482015290519081900360640190fd5b50601401519056fea264697066735822122085d4999e19471f303d14f0f1fb41debfef9c2c935c24ac958ef27aa9fa590b3864736f6c63430006080033",
    "immutableReferences": {},
    "sourceMap": "239:1207:49:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;239:1207:49;;;;;;;",
    "deployedSourceMap": "239:1207:49:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;239:1207:49;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;305:545:49;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;305:545:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;305:545:49;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;305:545:49;;;;;;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;305:545:49;;-1:-1:-1;305:545:49;-1:-1:-1;305:545:49;:::i;:::-;;1047:397;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;1047:397:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;1047:397:49;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;1047:397:49;;;;;;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;1047:397:49;;-1:-1:-1;1047:397:49;-1:-1:-1;1047:397:49;:::i;:::-;;;;;;;;;;;;;;;;305:545;416:16;435:15;445:4;;435:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;435:9:49;;-1:-1:-1;;;435:15:49:i;:::-;473:37;;;;;;504:4;473:37;;;;;;416:34;;-1:-1:-1;454:16:49;;473:22;;;;;;:37;;;;;;;;;;;;;;:22;:37;;;2:2:-1;;;;27:1;24;17:12;2:2;473:37:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;473:37:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;473:37:49;526:43;;;;;;:20;:43;;;;;;;;;;;;;;;473:37;;-1:-1:-1;526:20:49;;;;;;:43;;;;;473:37;;526:43;;;;;;;;-1:-1:-1;526:20:49;:43;;;2:2:-1;;;;27:1;24;17:12;2:2;526:43:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;526:43:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;526:43:49;514:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;630:125;;;;;;:34;:125;;;;;;;;;;;;;;;;;;;;608:17;630:125;;;;;;728:11;630:125;;;;;;608:17;;630:34;;;;;;:125;;;;;;;;;;;;608:17;630:34;:125;;;2:2:-1;;;;27:1;24;17:12;2:2;630:125:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;630:125:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;630:125:49;;771:40;;;;;:22;:40;;;;;;;;;;;;;;;630:125;;-1:-1:-1;771:22:49;;;;;;:40;;;;;630:125;;771:40;;;;;;;;-1:-1:-1;771:22:49;:40;;;2:2:-1;;;;27:1;24;17:12;2:2;771:40:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;771:40:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;771:40:49;759:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;305:545;;;;;;;;:::o;1047:397::-;1177:14;1197:11;1218:15;1228:4;;1218:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;1218:9:49;;-1:-1:-1;;;1218:15:49:i;:::-;1197:37;;1250:4;:19;;;1274:4;:15;;;1290:5;1274:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1274:22:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1274:22:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1274:22:49;1301:33;;;;;;:26;:33;;;;;;;;;:26;;;;;;:33;;;;;1274:22;;1301:33;;;;;;;;:26;:33;;;2:2:-1;;;;27:1;24;17:12;2:2;1301:33:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1301:33:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1301:33:49;1339:23;;;;;;:15;:23;;;;;;;;;:15;;;;;;:23;;;;;1301:33;;1339:23;;;;;;;;:15;:23;;;2:2:-1;;;;27:1;24;17:12;2:2;1339:23:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1339:23:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1339:23:49;1367:34;;;;;;:26;:34;;;;;;;;;:26;;;;;;:34;;;;;1339:23;;1367:34;;;;;;;;:26;:34;;;2:2:-1;;;;27:1;24;17:12;2:2;1367:34:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1367:34:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1367:34:49;1419:17;;;;;;;;1406:8;;1419:15;;;;;;:17;;;;;1367:34;;1419:17;;;;;;;;:15;:17;;;2:2:-1;;;;27:1;24;17:12;2:2;1419:17:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1419:17:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1419:17:49;1250:190;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1419:17;;1250:190;;;;;;;;;;;2:2:-1;;;;27:1;24;17:12;2:2;1250:190:49;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1250:190:49;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1250:190:49;;1047:397;-1:-1:-1;;;;;;;1047:397:49:o;853:191::-;913:16;943:4;:11;958:2;943:17;935:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1034:2:49;1024:13;1018:20;;1001:40::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/balancer/IBPool.sol\";\nimport \"./ISwappaPairV1.sol\";\n\ncontract PairBPool 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 poolAddr = parseData(data);\n\t\tuint inputAmount = ERC20(input).balanceOf(address(this));\n\t\trequire(\n\t\t\tERC20(input).approve(poolAddr, inputAmount),\n\t\t\t\"PairBPool: approve failed!\");\n\t\t(uint outputAmount,) = IBPool(poolAddr).swapExactAmountIn(\n\t\t\tinput,\n\t\t\tinputAmount,\n\t\t\toutput,\n\t\t\t0, // minAmountOut\n\t\t\t~uint256(0) // maxPrice\n\t\t);\n\t\trequire(\n\t\t\tERC20(output).transfer(to, outputAmount),\n\t\t\t\"PairBPool: transfer failed!\");\n\t}\n\n\tfunction parseData(bytes memory data) private pure returns (address poolAddr) {\n\t\trequire(data.length == 20, \"PairBPool: invalid data!\");\n\tassembly {\n\t  poolAddr := mload(add(data, 20))\n\t}\n\t}\n\n\tfunction getOutputAmount(\n\t\taddress input,\n\t\taddress output,\n\t\tuint amountIn,\n\t\tbytes calldata data\n\t) external override returns (uint amountOut) {\n\t\tIBPool pool = IBPool(parseData(data));\n\t\tamountOut = pool.calcOutGivenIn(\n\t\t\tpool.getBalance(input),\n\t\t\tpool.getDenormalizedWeight(input),\n\t\t\tpool.getBalance(output),\n\t\t\tpool.getDenormalizedWeight(output),\n\t\t\tamountIn,\n\t\t\tpool.getSwapFee()\n\t\t);\n\t}\n}\n",
    "sourcePath": "/home/thezviad_gmail_com/src/swappa/contracts/swappa/PairBPool.sol",
    "ast": {
        "absolutePath": "project:/contracts/swappa/PairBPool.sol",
        "exportedSymbols": {
            "PairBPool": [
                5860
            ]
        },
        "id": 5861,
        "license": "MIT",
        "nodeType": "SourceUnit",
        "nodes": [
            {
                "id": 5714,
                "literals": [
                    "solidity",
                    "0.6",
                    ".8"
                ],
                "nodeType": "PragmaDirective",
                "src": "32:22:49"
            },
            {
                "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
                "file": "@openzeppelin/contracts/math/SafeMath.sol",
                "id": 5715,
                "nodeType": "ImportDirective",
                "scope": 5861,
                "sourceUnit": 219,
                "src": "56:51:49",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
                "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
                "id": 5716,
                "nodeType": "ImportDirective",
                "scope": 5861,
                "sourceUnit": 726,
                "src": "108:55:49",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "project:/contracts/interfaces/balancer/IBPool.sol",
                "file": "../interfaces/balancer/IBPool.sol",
                "id": 5717,
                "nodeType": "ImportDirective",
                "scope": 5861,
                "sourceUnit": 1372,
                "src": "164:43:49",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "project:/contracts/swappa/ISwappaPairV1.sol",
                "file": "./ISwappaPairV1.sol",
                "id": 5718,
                "nodeType": "ImportDirective",
                "scope": 5861,
                "sourceUnit": 5326,
                "src": "208:29:49",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "abstract": false,
                "baseContracts": [
                    {
                        "arguments": null,
                        "baseName": {
                            "contractScope": null,
                            "id": 5719,
                            "name": "ISwappaPairV1",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5325,
                            "src": "261:13:49",
                            "typeDescriptions": {
                                "typeIdentifier": "t_contract$_ISwappaPairV1_$5325",
                                "typeString": "contract ISwappaPairV1"
                            }
                        },
                        "id": 5720,
                        "nodeType": "InheritanceSpecifier",
                        "src": "261:13:49"
                    }
                ],
                "contractDependencies": [
                    5325
                ],
                "contractKind": "contract",
                "documentation": null,
                "fullyImplemented": true,
                "id": 5860,
                "linearizedBaseContracts": [
                    5860,
                    5325
                ],
                "name": "PairBPool",
                "nodeType": "ContractDefinition",
                "nodes": [
                    {
                        "id": 5723,
                        "libraryName": {
                            "contractScope": null,
                            "id": 5721,
                            "name": "SafeMath",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 218,
                            "src": "284:8:49",
                            "typeDescriptions": {
                                "typeIdentifier": "t_contract$_SafeMath_$218",
                                "typeString": "library SafeMath"
                            }
                        },
                        "nodeType": "UsingForDirective",
                        "src": "278:24:49",
                        "typeName": {
                            "id": 5722,
                            "name": "uint",
                            "nodeType": "ElementaryTypeName",
                            "src": "297:4:49",
                            "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                            }
                        }
                    },
                    {
                        "baseFunctions": [
                            5311
                        ],
                        "body": {
                            "id": 5792,
                            "nodeType": "Block",
                            "src": "412:438:49",
                            "statements": [
                                {
                                    "assignments": [
                                        5736
                                    ],
                                    "declarations": [
                                        {
                                            "constant": false,
                                            "id": 5736,
                                            "mutability": "mutable",
                                            "name": "poolAddr",
                                            "nodeType": "VariableDeclaration",
                                            "overrides": null,
                                            "scope": 5792,
                                            "src": "416:16:49",
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                            },
                                            "typeName": {
                                                "id": 5735,
                                                "name": "address",
                                                "nodeType": "ElementaryTypeName",
                                                "src": "416:7:49",
                                                "stateMutability": "nonpayable",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            },
                                            "value": null,
                                            "visibility": "internal"
                                        }
                                    ],
                                    "id": 5740,
                                    "initialValue": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "id": 5738,
                                                "name": "data",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5731,
                                                "src": "445:4:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bytes_calldata_ptr",
                                                    "typeString": "bytes calldata"
                                                }
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bytes_calldata_ptr",
                                                    "typeString": "bytes calldata"
                                                }
                                            ],
                                            "id": 5737,
                                            "name": "parseData",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 5810,
                                            "src": "435:9:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_address_$",
                                                "typeString": "function (bytes memory) pure returns (address)"
                                            }
                                        },
                                        "id": 5739,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "435:15:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "416:34:49"
                                },
                                {
                                    "assignments": [
                                        5742
                                    ],
                                    "declarations": [
                                        {
                                            "constant": false,
                                            "id": 5742,
                                            "mutability": "mutable",
                                            "name": "inputAmount",
                                            "nodeType": "VariableDeclaration",
                                            "overrides": null,
                                            "scope": 5792,
                                            "src": "454:16:49",
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                            },
                                            "typeName": {
                                                "id": 5741,
                                                "name": "uint",
                                                "nodeType": "ElementaryTypeName",
                                                "src": "454:4:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            },
                                            "value": null,
                                            "visibility": "internal"
                                        }
                                    ],
                                    "id": 5752,
                                    "initialValue": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5749,
                                                        "name": "this",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": -28,
                                                        "src": "504:4:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_contract$_PairBPool_$5860",
                                                            "typeString": "contract PairBPool"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_contract$_PairBPool_$5860",
                                                            "typeString": "contract PairBPool"
                                                        }
                                                    ],
                                                    "id": 5748,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "lValueRequested": false,
                                                    "nodeType": "ElementaryTypeNameExpression",
                                                    "src": "496:7:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_address_$",
                                                        "typeString": "type(address)"
                                                    },
                                                    "typeName": {
                                                        "id": 5747,
                                                        "name": "address",
                                                        "nodeType": "ElementaryTypeName",
                                                        "src": "496:7:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": null,
                                                            "typeString": null
                                                        }
                                                    }
                                                },
                                                "id": 5750,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "496:13:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            ],
                                            "expression": {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5744,
                                                        "name": "input",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5725,
                                                        "src": "479:5:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    ],
                                                    "id": 5743,
                                                    "name": "ERC20",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 725,
                                                    "src": "473:5:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                                                        "typeString": "type(contract ERC20)"
                                                    }
                                                },
                                                "id": 5745,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "473:12:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_ERC20_$725",
                                                    "typeString": "contract ERC20"
                                                }
                                            },
                                            "id": 5746,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "balanceOf",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 325,
                                            "src": "473:22:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                                "typeString": "function (address) view external returns (uint256)"
                                            }
                                        },
                                        "id": 5751,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "473:37:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "454:56:49"
                                },
                                {
                                    "expression": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5758,
                                                        "name": "poolAddr",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5736,
                                                        "src": "547:8:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    },
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5759,
                                                        "name": "inputAmount",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5742,
                                                        "src": "557:11:49",
                                                        "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": 5755,
                                                                "name": "input",
                                                                "nodeType": "Identifier",
                                                                "overloadedDeclarations": [],
                                                                "referencedDeclaration": 5725,
                                                                "src": "532:5:49",
                                                                "typeDescriptions": {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            ],
                                                            "id": 5754,
                                                            "name": "ERC20",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 725,
                                                            "src": "526:5:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                                                                "typeString": "type(contract ERC20)"
                                                            }
                                                        },
                                                        "id": 5756,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "kind": "typeConversion",
                                                        "lValueRequested": false,
                                                        "names": [],
                                                        "nodeType": "FunctionCall",
                                                        "src": "526:12:49",
                                                        "tryCall": false,
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_contract$_ERC20_$725",
                                                            "typeString": "contract ERC20"
                                                        }
                                                    },
                                                    "id": 5757,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "memberName": "approve",
                                                    "nodeType": "MemberAccess",
                                                    "referencedDeclaration": 385,
                                                    "src": "526:20:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                                        "typeString": "function (address,uint256) external returns (bool)"
                                                    }
                                                },
                                                "id": 5760,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "526:43:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "hexValue": "5061697242506f6f6c3a20617070726f7665206661696c656421",
                                                "id": 5761,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "string",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "574:28:49",
                                                "subdenomination": null,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_stringliteral_0c820090bb66cb904823841f56e3d9d4076932861ed3041ba7cc8cb4a5a3cfb6",
                                                    "typeString": "literal_string \"PairBPool: approve failed!\""
                                                },
                                                "value": "PairBPool: approve failed!"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                },
                                                {
                                                    "typeIdentifier": "t_stringliteral_0c820090bb66cb904823841f56e3d9d4076932861ed3041ba7cc8cb4a5a3cfb6",
                                                    "typeString": "literal_string \"PairBPool: approve failed!\""
                                                }
                                            ],
                                            "id": 5753,
                                            "name": "require",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [
                                                -18,
                                                -18
                                            ],
                                            "referencedDeclaration": -18,
                                            "src": "514:7:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                                "typeString": "function (bool,string memory) pure"
                                            }
                                        },
                                        "id": 5762,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "514:89:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$__$",
                                            "typeString": "tuple()"
                                        }
                                    },
                                    "id": 5763,
                                    "nodeType": "ExpressionStatement",
                                    "src": "514:89:49"
                                },
                                {
                                    "assignments": [
                                        5765,
                                        null
                                    ],
                                    "declarations": [
                                        {
                                            "constant": false,
                                            "id": 5765,
                                            "mutability": "mutable",
                                            "name": "outputAmount",
                                            "nodeType": "VariableDeclaration",
                                            "overrides": null,
                                            "scope": 5792,
                                            "src": "608:17:49",
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                            },
                                            "typeName": {
                                                "id": 5764,
                                                "name": "uint",
                                                "nodeType": "ElementaryTypeName",
                                                "src": "608:4:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            },
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        null
                                    ],
                                    "id": 5780,
                                    "initialValue": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "id": 5770,
                                                "name": "input",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5725,
                                                "src": "669:5:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "id": 5771,
                                                "name": "inputAmount",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5742,
                                                "src": "679:11:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "id": 5772,
                                                "name": "output",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 5727,
                                                "src": "695:6:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "hexValue": "30",
                                                "id": 5773,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "number",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "706:1:49",
                                                "subdenomination": null,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_rational_0_by_1",
                                                    "typeString": "int_const 0"
                                                },
                                                "value": "0"
                                            },
                                            {
                                                "argumentTypes": null,
                                                "id": 5778,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "UnaryOperation",
                                                "operator": "~",
                                                "prefix": true,
                                                "src": "728:11:49",
                                                "subExpression": {
                                                    "argumentTypes": null,
                                                    "arguments": [
                                                        {
                                                            "argumentTypes": null,
                                                            "hexValue": "30",
                                                            "id": 5776,
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "kind": "number",
                                                            "lValueRequested": false,
                                                            "nodeType": "Literal",
                                                            "src": "737:1:49",
                                                            "subdenomination": null,
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_rational_0_by_1",
                                                                "typeString": "int_const 0"
                                                            },
                                                            "value": "0"
                                                        }
                                                    ],
                                                    "expression": {
                                                        "argumentTypes": [
                                                            {
                                                                "typeIdentifier": "t_rational_0_by_1",
                                                                "typeString": "int_const 0"
                                                            }
                                                        ],
                                                        "id": 5775,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": true,
                                                        "lValueRequested": false,
                                                        "nodeType": "ElementaryTypeNameExpression",
                                                        "src": "729:7:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_type$_t_uint256_$",
                                                            "typeString": "type(uint256)"
                                                        },
                                                        "typeName": {
                                                            "id": 5774,
                                                            "name": "uint256",
                                                            "nodeType": "ElementaryTypeName",
                                                            "src": "729:7:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": null,
                                                                "typeString": null
                                                            }
                                                        }
                                                    },
                                                    "id": 5777,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "kind": "typeConversion",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "729:10:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                },
                                                {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                },
                                                {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                },
                                                {
                                                    "typeIdentifier": "t_rational_0_by_1",
                                                    "typeString": "int_const 0"
                                                },
                                                {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            ],
                                            "expression": {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5767,
                                                        "name": "poolAddr",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5736,
                                                        "src": "637:8:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    ],
                                                    "id": 5766,
                                                    "name": "IBPool",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1371,
                                                    "src": "630:6:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_IBPool_$1371_$",
                                                        "typeString": "type(contract IBPool)"
                                                    }
                                                },
                                                "id": 5768,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "630:16:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IBPool_$1371",
                                                    "typeString": "contract IBPool"
                                                }
                                            },
                                            "id": 5769,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "swapExactAmountIn",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1283,
                                            "src": "630:34:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$returns$_t_uint256_$_t_uint256_$",
                                                "typeString": "function (address,uint256,address,uint256,uint256) external returns (uint256,uint256)"
                                            }
                                        },
                                        "id": 5779,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "630:125:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
                                            "typeString": "tuple(uint256,uint256)"
                                        }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "607:148:49"
                                },
                                {
                                    "expression": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5786,
                                                        "name": "to",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5729,
                                                        "src": "794:2:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    },
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5787,
                                                        "name": "outputAmount",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5765,
                                                        "src": "798:12:49",
                                                        "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": 5783,
                                                                "name": "output",
                                                                "nodeType": "Identifier",
                                                                "overloadedDeclarations": [],
                                                                "referencedDeclaration": 5727,
                                                                "src": "777:6:49",
                                                                "typeDescriptions": {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            ],
                                                            "id": 5782,
                                                            "name": "ERC20",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 725,
                                                            "src": "771:5:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_type$_t_contract$_ERC20_$725_$",
                                                                "typeString": "type(contract ERC20)"
                                                            }
                                                        },
                                                        "id": 5784,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "kind": "typeConversion",
                                                        "lValueRequested": false,
                                                        "names": [],
                                                        "nodeType": "FunctionCall",
                                                        "src": "771:13:49",
                                                        "tryCall": false,
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_contract$_ERC20_$725",
                                                            "typeString": "contract ERC20"
                                                        }
                                                    },
                                                    "id": 5785,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "memberName": "transfer",
                                                    "nodeType": "MemberAccess",
                                                    "referencedDeclaration": 346,
                                                    "src": "771:22:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
                                                        "typeString": "function (address,uint256) external returns (bool)"
                                                    }
                                                },
                                                "id": 5788,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "771:40:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "hexValue": "5061697242506f6f6c3a207472616e73666572206661696c656421",
                                                "id": 5789,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "string",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "816:29:49",
                                                "subdenomination": null,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_stringliteral_06c03380c4272fef6a4bbf204937ebd20a641d012b362d8fa30b0ac0039c0105",
                                                    "typeString": "literal_string \"PairBPool: transfer failed!\""
                                                },
                                                "value": "PairBPool: transfer failed!"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                },
                                                {
                                                    "typeIdentifier": "t_stringliteral_06c03380c4272fef6a4bbf204937ebd20a641d012b362d8fa30b0ac0039c0105",
                                                    "typeString": "literal_string \"PairBPool: transfer failed!\""
                                                }
                                            ],
                                            "id": 5781,
                                            "name": "require",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [
                                                -18,
                                                -18
                                            ],
                                            "referencedDeclaration": -18,
                                            "src": "759:7:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                                "typeString": "function (bool,string memory) pure"
                                            }
                                        },
                                        "id": 5790,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "759:87:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$__$",
                                            "typeString": "tuple()"
                                        }
                                    },
                                    "id": 5791,
                                    "nodeType": "ExpressionStatement",
                                    "src": "759:87:49"
                                }
                            ]
                        },
                        "documentation": null,
                        "functionSelector": "32ef8314",
                        "id": 5793,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "swap",
                        "nodeType": "FunctionDefinition",
                        "overrides": {
                            "id": 5733,
                            "nodeType": "OverrideSpecifier",
                            "overrides": [],
                            "src": "403:8:49"
                        },
                        "parameters": {
                            "id": 5732,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5725,
                                    "mutability": "mutable",
                                    "name": "input",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5793,
                                    "src": "322:13:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5724,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "322:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5727,
                                    "mutability": "mutable",
                                    "name": "output",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5793,
                                    "src": "339:14:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5726,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "339:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5729,
                                    "mutability": "mutable",
                                    "name": "to",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5793,
                                    "src": "357:10:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5728,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "357:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5731,
                                    "mutability": "mutable",
                                    "name": "data",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5793,
                                    "src": "371:19:49",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5730,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "371:5:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                }
                            ],
                            "src": "318:75:49"
                        },
                        "returnParameters": {
                            "id": 5734,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "412:0:49"
                        },
                        "scope": 5860,
                        "src": "305:545:49",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "body": {
                            "id": 5809,
                            "nodeType": "Block",
                            "src": "931:113:49",
                            "statements": [
                                {
                                    "expression": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "commonType": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                },
                                                "id": 5804,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                    "argumentTypes": null,
                                                    "expression": {
                                                        "argumentTypes": null,
                                                        "id": 5801,
                                                        "name": "data",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5795,
                                                        "src": "943:4:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_bytes_memory_ptr",
                                                            "typeString": "bytes memory"
                                                        }
                                                    },
                                                    "id": 5802,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "memberName": "length",
                                                    "nodeType": "MemberAccess",
                                                    "referencedDeclaration": null,
                                                    "src": "943:11:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "==",
                                                "rightExpression": {
                                                    "argumentTypes": null,
                                                    "hexValue": "3230",
                                                    "id": 5803,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "kind": "number",
                                                    "lValueRequested": false,
                                                    "nodeType": "Literal",
                                                    "src": "958:2:49",
                                                    "subdenomination": null,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_rational_20_by_1",
                                                        "typeString": "int_const 20"
                                                    },
                                                    "value": "20"
                                                },
                                                "src": "943:17:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                }
                                            },
                                            {
                                                "argumentTypes": null,
                                                "hexValue": "5061697242506f6f6c3a20696e76616c6964206461746121",
                                                "id": 5805,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "string",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "962:26:49",
                                                "subdenomination": null,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_stringliteral_14854c4ab46e8010e0f6aade82a18370341d16189ff9c6e530f97e35c8842ebe",
                                                    "typeString": "literal_string \"PairBPool: invalid data!\""
                                                },
                                                "value": "PairBPool: invalid data!"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                },
                                                {
                                                    "typeIdentifier": "t_stringliteral_14854c4ab46e8010e0f6aade82a18370341d16189ff9c6e530f97e35c8842ebe",
                                                    "typeString": "literal_string \"PairBPool: invalid data!\""
                                                }
                                            ],
                                            "id": 5800,
                                            "name": "require",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [
                                                -18,
                                                -18
                                            ],
                                            "referencedDeclaration": -18,
                                            "src": "935:7:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                                "typeString": "function (bool,string memory) pure"
                                            }
                                        },
                                        "id": 5806,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "935:54:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$__$",
                                            "typeString": "tuple()"
                                        }
                                    },
                                    "id": 5807,
                                    "nodeType": "ExpressionStatement",
                                    "src": "935:54:49"
                                },
                                {
                                    "AST": {
                                        "nodeType": "YulBlock",
                                        "src": "1001:40:49",
                                        "statements": [
                                            {
                                                "nodeType": "YulAssignment",
                                                "src": "1006:32:49",
                                                "value": {
                                                    "arguments": [
                                                        {
                                                            "arguments": [
                                                                {
                                                                    "name": "data",
                                                                    "nodeType": "YulIdentifier",
                                                                    "src": "1028:4:49"
                                                                },
                                                                {
                                                                    "kind": "number",
                                                                    "nodeType": "YulLiteral",
                                                                    "src": "1034:2:49",
                                                                    "type": "",
                                                                    "value": "20"
                                                                }
                                                            ],
                                                            "functionName": {
                                                                "name": "add",
                                                                "nodeType": "YulIdentifier",
                                                                "src": "1024:3:49"
                                                            },
                                                            "nodeType": "YulFunctionCall",
                                                            "src": "1024:13:49"
                                                        }
                                                    ],
                                                    "functionName": {
                                                        "name": "mload",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "1018:5:49"
                                                    },
                                                    "nodeType": "YulFunctionCall",
                                                    "src": "1018:20:49"
                                                },
                                                "variableNames": [
                                                    {
                                                        "name": "poolAddr",
                                                        "nodeType": "YulIdentifier",
                                                        "src": "1006:8:49"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "evmVersion": "istanbul",
                                    "externalReferences": [
                                        {
                                            "declaration": 5795,
                                            "isOffset": false,
                                            "isSlot": false,
                                            "src": "1028:4:49",
                                            "valueSize": 1
                                        },
                                        {
                                            "declaration": 5798,
                                            "isOffset": false,
                                            "isSlot": false,
                                            "src": "1006:8:49",
                                            "valueSize": 1
                                        }
                                    ],
                                    "id": 5808,
                                    "nodeType": "InlineAssembly",
                                    "src": "992:49:49"
                                }
                            ]
                        },
                        "documentation": null,
                        "id": 5810,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "parseData",
                        "nodeType": "FunctionDefinition",
                        "overrides": null,
                        "parameters": {
                            "id": 5796,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5795,
                                    "mutability": "mutable",
                                    "name": "data",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5810,
                                    "src": "872:17:49",
                                    "stateVariable": false,
                                    "storageLocation": "memory",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_memory_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5794,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "872:5:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                }
                            ],
                            "src": "871:19:49"
                        },
                        "returnParameters": {
                            "id": 5799,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5798,
                                    "mutability": "mutable",
                                    "name": "poolAddr",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5810,
                                    "src": "913:16:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5797,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "913:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                }
                            ],
                            "src": "912:18:49"
                        },
                        "scope": 5860,
                        "src": "853:191:49",
                        "stateMutability": "pure",
                        "virtual": false,
                        "visibility": "private"
                    },
                    {
                        "baseFunctions": [
                            5324
                        ],
                        "body": {
                            "id": 5858,
                            "nodeType": "Block",
                            "src": "1193:251:49",
                            "statements": [
                                {
                                    "assignments": [
                                        5825
                                    ],
                                    "declarations": [
                                        {
                                            "constant": false,
                                            "id": 5825,
                                            "mutability": "mutable",
                                            "name": "pool",
                                            "nodeType": "VariableDeclaration",
                                            "overrides": null,
                                            "scope": 5858,
                                            "src": "1197:11:49",
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                "typeString": "contract IBPool"
                                            },
                                            "typeName": {
                                                "contractScope": null,
                                                "id": 5824,
                                                "name": "IBPool",
                                                "nodeType": "UserDefinedTypeName",
                                                "referencedDeclaration": 1371,
                                                "src": "1197:6:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IBPool_$1371",
                                                    "typeString": "contract IBPool"
                                                }
                                            },
                                            "value": null,
                                            "visibility": "internal"
                                        }
                                    ],
                                    "id": 5831,
                                    "initialValue": {
                                        "argumentTypes": null,
                                        "arguments": [
                                            {
                                                "argumentTypes": null,
                                                "arguments": [
                                                    {
                                                        "argumentTypes": null,
                                                        "id": 5828,
                                                        "name": "data",
                                                        "nodeType": "Identifier",
                                                        "overloadedDeclarations": [],
                                                        "referencedDeclaration": 5818,
                                                        "src": "1228:4:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_bytes_calldata_ptr",
                                                            "typeString": "bytes calldata"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_bytes_calldata_ptr",
                                                            "typeString": "bytes calldata"
                                                        }
                                                    ],
                                                    "id": 5827,
                                                    "name": "parseData",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 5810,
                                                    "src": "1218:9:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_address_$",
                                                        "typeString": "function (bytes memory) pure returns (address)"
                                                    }
                                                },
                                                "id": 5829,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1218:15:49",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_address",
                                                    "typeString": "address"
                                                }
                                            ],
                                            "id": 5826,
                                            "name": "IBPool",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 1371,
                                            "src": "1211:6:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_contract$_IBPool_$1371_$",
                                                "typeString": "type(contract IBPool)"
                                            }
                                        },
                                        "id": 5830,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1211:23:49",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_contract$_IBPool_$1371",
                                            "typeString": "contract IBPool"
                                        }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "1197:37:49"
                                },
                                {
                                    "expression": {
                                        "argumentTypes": null,
                                        "id": 5856,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftHandSide": {
                                            "argumentTypes": null,
                                            "id": 5832,
                                            "name": "amountOut",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [],
                                            "referencedDeclaration": 5822,
                                            "src": "1238:9:49",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                            }
                                        },
                                        "nodeType": "Assignment",
                                        "operator": "=",
                                        "rightHandSide": {
                                            "argumentTypes": null,
                                            "arguments": [
                                                {
                                                    "argumentTypes": null,
                                                    "arguments": [
                                                        {
                                                            "argumentTypes": null,
                                                            "id": 5837,
                                                            "name": "input",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5812,
                                                            "src": "1290:5:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        }
                                                    ],
                                                    "expression": {
                                                        "argumentTypes": [
                                                            {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": null,
                                                            "id": 5835,
                                                            "name": "pool",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5825,
                                                            "src": "1274:4:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                                "typeString": "contract IBPool"
                                                            }
                                                        },
                                                        "id": 5836,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "getBalance",
                                                        "nodeType": "MemberAccess",
                                                        "referencedDeclaration": 1365,
                                                        "src": "1274:15:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                                            "typeString": "function (address) view external returns (uint256)"
                                                        }
                                                    },
                                                    "id": 5838,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "1274:22:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                {
                                                    "argumentTypes": null,
                                                    "arguments": [
                                                        {
                                                            "argumentTypes": null,
                                                            "id": 5841,
                                                            "name": "input",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5812,
                                                            "src": "1328:5:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        }
                                                    ],
                                                    "expression": {
                                                        "argumentTypes": [
                                                            {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": null,
                                                            "id": 5839,
                                                            "name": "pool",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5825,
                                                            "src": "1301:4:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                                "typeString": "contract IBPool"
                                                            }
                                                        },
                                                        "id": 5840,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "getDenormalizedWeight",
                                                        "nodeType": "MemberAccess",
                                                        "referencedDeclaration": 1348,
                                                        "src": "1301:26:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                                            "typeString": "function (address) view external returns (uint256)"
                                                        }
                                                    },
                                                    "id": 5842,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "1301:33:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                {
                                                    "argumentTypes": null,
                                                    "arguments": [
                                                        {
                                                            "argumentTypes": null,
                                                            "id": 5845,
                                                            "name": "output",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5814,
                                                            "src": "1355:6:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        }
                                                    ],
                                                    "expression": {
                                                        "argumentTypes": [
                                                            {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": null,
                                                            "id": 5843,
                                                            "name": "pool",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5825,
                                                            "src": "1339:4:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                                "typeString": "contract IBPool"
                                                            }
                                                        },
                                                        "id": 5844,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "getBalance",
                                                        "nodeType": "MemberAccess",
                                                        "referencedDeclaration": 1365,
                                                        "src": "1339:15:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                                            "typeString": "function (address) view external returns (uint256)"
                                                        }
                                                    },
                                                    "id": 5846,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "1339:23:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                {
                                                    "argumentTypes": null,
                                                    "arguments": [
                                                        {
                                                            "argumentTypes": null,
                                                            "id": 5849,
                                                            "name": "output",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5814,
                                                            "src": "1394:6:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        }
                                                    ],
                                                    "expression": {
                                                        "argumentTypes": [
                                                            {
                                                                "typeIdentifier": "t_address",
                                                                "typeString": "address"
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": null,
                                                            "id": 5847,
                                                            "name": "pool",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5825,
                                                            "src": "1367:4:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                                "typeString": "contract IBPool"
                                                            }
                                                        },
                                                        "id": 5848,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "getDenormalizedWeight",
                                                        "nodeType": "MemberAccess",
                                                        "referencedDeclaration": 1348,
                                                        "src": "1367:26:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
                                                            "typeString": "function (address) view external returns (uint256)"
                                                        }
                                                    },
                                                    "id": 5850,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "1367:34:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                {
                                                    "argumentTypes": null,
                                                    "id": 5851,
                                                    "name": "amountIn",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 5816,
                                                    "src": "1406:8:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                {
                                                    "argumentTypes": null,
                                                    "arguments": [],
                                                    "expression": {
                                                        "argumentTypes": [],
                                                        "expression": {
                                                            "argumentTypes": null,
                                                            "id": 5852,
                                                            "name": "pool",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 5825,
                                                            "src": "1419:4:49",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_contract$_IBPool_$1371",
                                                                "typeString": "contract IBPool"
                                                            }
                                                        },
                                                        "id": 5853,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "getSwapFee",
                                                        "nodeType": "MemberAccess",
                                                        "referencedDeclaration": 1370,
                                                        "src": "1419:15:49",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                                            "typeString": "function () view external returns (uint256)"
                                                        }
                                                    },
                                                    "id": 5854,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "kind": "functionCall",
                                                    "lValueRequested": false,
                                                    "names": [],
                                                    "nodeType": "FunctionCall",
                                                    "src": "1419:17:49",
                                                    "tryCall": false,
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                }
                                            ],
                                            "expression": {
                                                "argumentTypes": [
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    },
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    },
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    },
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    },
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    },
                                                    {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": null,
                                                    "id": 5833,
                                                    "name": "pool",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 5825,
                                                    "src": "1250:4:49",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_contract$_IBPool_$1371",
                                                        "typeString": "contract IBPool"
                                                    }
                                                },
                                                "id": 5834,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "memberName": "calcOutGivenIn",
                                                "nodeType": "MemberAccess",
                                                "referencedDeclaration": 1334,
                                                "src": "1250:19:49",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_function_external_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                                    "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure external returns (uint256)"
                                                }
                                            },
                                            "id": 5855,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "1250:190:49",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                            }
                                        },
                                        "src": "1238:202:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "id": 5857,
                                    "nodeType": "ExpressionStatement",
                                    "src": "1238:202:49"
                                }
                            ]
                        },
                        "documentation": null,
                        "functionSelector": "7eace892",
                        "id": 5859,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "getOutputAmount",
                        "nodeType": "FunctionDefinition",
                        "overrides": {
                            "id": 5820,
                            "nodeType": "OverrideSpecifier",
                            "overrides": [],
                            "src": "1159:8:49"
                        },
                        "parameters": {
                            "id": 5819,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5812,
                                    "mutability": "mutable",
                                    "name": "input",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5859,
                                    "src": "1075:13:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5811,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1075:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5814,
                                    "mutability": "mutable",
                                    "name": "output",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5859,
                                    "src": "1092:14:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 5813,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1092:7:49",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5816,
                                    "mutability": "mutable",
                                    "name": "amountIn",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5859,
                                    "src": "1110:13:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5815,
                                        "name": "uint",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1110:4:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                },
                                {
                                    "constant": false,
                                    "id": 5818,
                                    "mutability": "mutable",
                                    "name": "data",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5859,
                                    "src": "1127:19:49",
                                    "stateVariable": false,
                                    "storageLocation": "calldata",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bytes_calldata_ptr",
                                        "typeString": "bytes"
                                    },
                                    "typeName": {
                                        "id": 5817,
                                        "name": "bytes",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1127:5:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bytes_storage_ptr",
                                            "typeString": "bytes"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1071:78:49"
                        },
                        "returnParameters": {
                            "id": 5823,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 5822,
                                    "mutability": "mutable",
                                    "name": "amountOut",
                                    "nodeType": "VariableDeclaration",
                                    "overrides": null,
                                    "scope": 5859,
                                    "src": "1177:14:49",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 5821,
                                        "name": "uint",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1177:4:49",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "value": null,
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1176:16:49"
                        },
                        "scope": 5860,
                        "src": "1047:397:49",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "external"
                    }
                ],
                "scope": 5861,
                "src": "239:1207:49"
            }
        ],
        "src": "32:1415:49"
    },
    "legacyAST": {
        "attributes": {
            "absolutePath": "project:/contracts/swappa/PairBPool.sol",
            "exportedSymbols": {
                "PairBPool": [
                    5860
                ]
            },
            "license": "MIT"
        },
        "children": [
            {
                "attributes": {
                    "literals": [
                        "solidity",
                        "0.6",
                        ".8"
                    ]
                },
                "id": 5714,
                "name": "PragmaDirective",
                "src": "32:22:49"
            },
            {
                "attributes": {
                    "SourceUnit": 219,
                    "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
                    "file": "@openzeppelin/contracts/math/SafeMath.sol",
                    "scope": 5861,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 5715,
                "name": "ImportDirective",
                "src": "56:51:49"
            },
            {
                "attributes": {
                    "SourceUnit": 726,
                    "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
                    "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol",
                    "scope": 5861,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 5716,
                "name": "ImportDirective",
                "src": "108:55:49"
            },
            {
                "attributes": {
                    "SourceUnit": 1372,
                    "absolutePath": "project:/contracts/interfaces/balancer/IBPool.sol",
                    "file": "../interfaces/balancer/IBPool.sol",
                    "scope": 5861,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 5717,
                "name": "ImportDirective",
                "src": "164:43:49"
            },
            {
                "attributes": {
                    "SourceUnit": 5326,
                    "absolutePath": "project:/contracts/swappa/ISwappaPairV1.sol",
                    "file": "./ISwappaPairV1.sol",
                    "scope": 5861,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 5718,
                "name": "ImportDirective",
                "src": "208:29:49"
            },
            {
                "attributes": {
                    "abstract": false,
                    "contractDependencies": [
                        5325
                    ],
                    "contractKind": "contract",
                    "documentation": null,
                    "fullyImplemented": true,
                    "linearizedBaseContracts": [
                        5860,
                        5325
                    ],
                    "name": "PairBPool",
                    "scope": 5861
                },
                "children": [
                    {
                        "attributes": {
                            "arguments": null
                        },
                        "children": [
                            {
                                "attributes": {
                                    "contractScope": null,
                                    "name": "ISwappaPairV1",
                                    "referencedDeclaration": 5325,
                                    "type": "contract ISwappaPairV1"
                                },
                                "id": 5719,
                                "name": "UserDefinedTypeName",
                                "src": "261:13:49"
                            }
                        ],
                        "id": 5720,
                        "name": "InheritanceSpecifier",
                        "src": "261:13:49"
                    },
                    {
                        "children": [
                            {
                                "attributes": {
                                    "contractScope": null,
                                    "name": "SafeMath",
                                    "referencedDeclaration": 218,
                                    "type": "library SafeMath"
                                },
                                "id": 5721,
                                "name": "UserDefinedTypeName",
                                "src": "284:8:49"
                            },
                            {
                                "attributes": {
                                    "name": "uint",
                                    "type": "uint256"
                                },
                                "id": 5722,
                                "name": "ElementaryTypeName",
                                "src": "297:4:49"
                            }
                        ],
                        "id": 5723,
                        "name": "UsingForDirective",
                        "src": "278:24:49"
                    },
                    {
                        "attributes": {
                            "baseFunctions": [
                                5311
                            ],
                            "documentation": null,
                            "functionSelector": "32ef8314",
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "swap",
                            "scope": 5860,
                            "stateMutability": "nonpayable",
                            "virtual": false,
                            "visibility": "external"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "overrides": [
                                        null
                                    ]
                                },
                                "id": 5733,
                                "name": "OverrideSpecifier",
                                "src": "403:8:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "input",
                                            "overrides": null,
                                            "scope": 5793,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5724,
                                                "name": "ElementaryTypeName",
                                                "src": "322:7:49"
                                            }
                                        ],
                                        "id": 5725,
                                        "name": "VariableDeclaration",
                                        "src": "322:13:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "output",
                                            "overrides": null,
                                            "scope": 5793,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5726,
                                                "name": "ElementaryTypeName",
                                                "src": "339:7:49"
                                            }
                                        ],
                                        "id": 5727,
                                        "name": "VariableDeclaration",
                                        "src": "339:14:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "to",
                                            "overrides": null,
                                            "scope": 5793,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5728,
                                                "name": "ElementaryTypeName",
                                                "src": "357:7:49"
                                            }
                                        ],
                                        "id": 5729,
                                        "name": "VariableDeclaration",
                                        "src": "357:10:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "data",
                                            "overrides": null,
                                            "scope": 5793,
                                            "stateVariable": false,
                                            "storageLocation": "calldata",
                                            "type": "bytes",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "bytes",
                                                    "type": "bytes"
                                                },
                                                "id": 5730,
                                                "name": "ElementaryTypeName",
                                                "src": "371:5:49"
                                            }
                                        ],
                                        "id": 5731,
                                        "name": "VariableDeclaration",
                                        "src": "371:19:49"
                                    }
                                ],
                                "id": 5732,
                                "name": "ParameterList",
                                "src": "318:75:49"
                            },
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 5734,
                                "name": "ParameterList",
                                "src": "412:0:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "assignments": [
                                                5736
                                            ]
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "constant": false,
                                                    "mutability": "mutable",
                                                    "name": "poolAddr",
                                                    "overrides": null,
                                                    "scope": 5792,
                                                    "stateVariable": false,
                                                    "storageLocation": "default",
                                                    "type": "address",
                                                    "value": null,
                                                    "visibility": "internal"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "name": "address",
                                                            "stateMutability": "nonpayable",
                                                            "type": "address"
                                                        },
                                                        "id": 5735,
                                                        "name": "ElementaryTypeName",
                                                        "src": "416:7:49"
                                                    }
                                                ],
                                                "id": 5736,
                                                "name": "VariableDeclaration",
                                                "src": "416:16:49"
                                            },
                                            {
                                                "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": 5810,
                                                            "type": "function (bytes memory) pure returns (address)",
                                                            "value": "parseData"
                                                        },
                                                        "id": 5737,
                                                        "name": "Identifier",
                                                        "src": "435:9:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 5731,
                                                            "type": "bytes calldata",
                                                            "value": "data"
                                                        },
                                                        "id": 5738,
                                                        "name": "Identifier",
                                                        "src": "445:4:49"
                                                    }
                                                ],
                                                "id": 5739,
                                                "name": "FunctionCall",
                                                "src": "435:15:49"
                                            }
                                        ],
                                        "id": 5740,
                                        "name": "VariableDeclarationStatement",
                                        "src": "416:34:49"
                                    },
                                    {
                                        "attributes": {
                                            "assignments": [
                                                5742
                                            ]
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "constant": false,
                                                    "mutability": "mutable",
                                                    "name": "inputAmount",
                                                    "overrides": null,
                                                    "scope": 5792,
                                                    "stateVariable": false,
                                                    "storageLocation": "default",
                                                    "type": "uint256",
                                                    "value": null,
                                                    "visibility": "internal"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "name": "uint",
                                                            "type": "uint256"
                                                        },
                                                        "id": 5741,
                                                        "name": "ElementaryTypeName",
                                                        "src": "454:4:49"
                                                    }
                                                ],
                                                "id": 5742,
                                                "name": "VariableDeclaration",
                                                "src": "454:16:49"
                                            },
                                            {
                                                "attributes": {
                                                    "argumentTypes": null,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "uint256",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            ],
                                                            "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": 5743,
                                                                        "name": "Identifier",
                                                                        "src": "473:5:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5725,
                                                                            "type": "address",
                                                                            "value": "input"
                                                                        },
                                                                        "id": 5744,
                                                                        "name": "Identifier",
                                                                        "src": "479:5:49"
                                                                    }
                                                                ],
                                                                "id": 5745,
                                                                "name": "FunctionCall",
                                                                "src": "473:12:49"
                                                            }
                                                        ],
                                                        "id": 5746,
                                                        "name": "MemberAccess",
                                                        "src": "473:22:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "isStructConstructorCall": false,
                                                            "lValueRequested": false,
                                                            "names": [
                                                                null
                                                            ],
                                                            "tryCall": false,
                                                            "type": "address",
                                                            "type_conversion": true
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": [
                                                                        {
                                                                            "typeIdentifier": "t_contract$_PairBPool_$5860",
                                                                            "typeString": "contract PairBPool"
                                                                        }
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": true,
                                                                    "lValueRequested": false,
                                                                    "type": "type(address)"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "name": "address",
                                                                            "type": null
                                                                        },
                                                                        "id": 5747,
                                                                        "name": "ElementaryTypeName",
                                                                        "src": "496:7:49"
                                                                    }
                                                                ],
                                                                "id": 5748,
                                                                "name": "ElementaryTypeNameExpression",
                                                                "src": "496:7:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": -28,
                                                                    "type": "contract PairBPool",
                                                                    "value": "this"
                                                                },
                                                                "id": 5749,
                                                                "name": "Identifier",
                                                                "src": "504:4:49"
                                                            }
                                                        ],
                                                        "id": 5750,
                                                        "name": "FunctionCall",
                                                        "src": "496:13:49"
                                                    }
                                                ],
                                                "id": 5751,
                                                "name": "FunctionCall",
                                                "src": "473:37:49"
                                            }
                                        ],
                                        "id": 5752,
                                        "name": "VariableDeclarationStatement",
                                        "src": "454:56:49"
                                    },
                                    {
                                        "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_0c820090bb66cb904823841f56e3d9d4076932861ed3041ba7cc8cb4a5a3cfb6",
                                                                    "typeString": "literal_string \"PairBPool: approve failed!\""
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                -18,
                                                                -18
                                                            ],
                                                            "referencedDeclaration": -18,
                                                            "type": "function (bool,string memory) pure",
                                                            "value": "require"
                                                        },
                                                        "id": 5753,
                                                        "name": "Identifier",
                                                        "src": "514:7:49"
                                                    },
                                                    {
                                                        "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": 5754,
                                                                                "name": "Identifier",
                                                                                "src": "526:5:49"
                                                                            },
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5725,
                                                                                    "type": "address",
                                                                                    "value": "input"
                                                                                },
                                                                                "id": 5755,
                                                                                "name": "Identifier",
                                                                                "src": "532:5:49"
                                                                            }
                                                                        ],
                                                                        "id": 5756,
                                                                        "name": "FunctionCall",
                                                                        "src": "526:12:49"
                                                                    }
                                                                ],
                                                                "id": 5757,
                                                                "name": "MemberAccess",
                                                                "src": "526:20:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5736,
                                                                    "type": "address",
                                                                    "value": "poolAddr"
                                                                },
                                                                "id": 5758,
                                                                "name": "Identifier",
                                                                "src": "547:8:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5742,
                                                                    "type": "uint256",
                                                                    "value": "inputAmount"
                                                                },
                                                                "id": 5759,
                                                                "name": "Identifier",
                                                                "src": "557:11:49"
                                                            }
                                                        ],
                                                        "id": 5760,
                                                        "name": "FunctionCall",
                                                        "src": "526:43:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "hexvalue": "5061697242506f6f6c3a20617070726f7665206661696c656421",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "subdenomination": null,
                                                            "token": "string",
                                                            "type": "literal_string \"PairBPool: approve failed!\"",
                                                            "value": "PairBPool: approve failed!"
                                                        },
                                                        "id": 5761,
                                                        "name": "Literal",
                                                        "src": "574:28:49"
                                                    }
                                                ],
                                                "id": 5762,
                                                "name": "FunctionCall",
                                                "src": "514:89:49"
                                            }
                                        ],
                                        "id": 5763,
                                        "name": "ExpressionStatement",
                                        "src": "514:89:49"
                                    },
                                    {
                                        "attributes": {
                                            "assignments": [
                                                5765,
                                                null
                                            ]
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "constant": false,
                                                    "mutability": "mutable",
                                                    "name": "outputAmount",
                                                    "overrides": null,
                                                    "scope": 5792,
                                                    "stateVariable": false,
                                                    "storageLocation": "default",
                                                    "type": "uint256",
                                                    "value": null,
                                                    "visibility": "internal"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "name": "uint",
                                                            "type": "uint256"
                                                        },
                                                        "id": 5764,
                                                        "name": "ElementaryTypeName",
                                                        "src": "608:4:49"
                                                    }
                                                ],
                                                "id": 5765,
                                                "name": "VariableDeclaration",
                                                "src": "608:17:49"
                                            },
                                            {
                                                "attributes": {
                                                    "argumentTypes": null,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "tuple(uint256,uint256)",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                },
                                                                {
                                                                    "typeIdentifier": "t_uint256",
                                                                    "typeString": "uint256"
                                                                },
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                },
                                                                {
                                                                    "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": "swapExactAmountIn",
                                                            "referencedDeclaration": 1283,
                                                            "type": "function (address,uint256,address,uint256,uint256) external returns (uint256,uint256)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "contract IBPool",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address",
                                                                                    "typeString": "address"
                                                                                }
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1371,
                                                                            "type": "type(contract IBPool)",
                                                                            "value": "IBPool"
                                                                        },
                                                                        "id": 5766,
                                                                        "name": "Identifier",
                                                                        "src": "630:6:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5736,
                                                                            "type": "address",
                                                                            "value": "poolAddr"
                                                                        },
                                                                        "id": 5767,
                                                                        "name": "Identifier",
                                                                        "src": "637:8:49"
                                                                    }
                                                                ],
                                                                "id": 5768,
                                                                "name": "FunctionCall",
                                                                "src": "630:16:49"
                                                            }
                                                        ],
                                                        "id": 5769,
                                                        "name": "MemberAccess",
                                                        "src": "630:34:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 5725,
                                                            "type": "address",
                                                            "value": "input"
                                                        },
                                                        "id": 5770,
                                                        "name": "Identifier",
                                                        "src": "669:5:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 5742,
                                                            "type": "uint256",
                                                            "value": "inputAmount"
                                                        },
                                                        "id": 5771,
                                                        "name": "Identifier",
                                                        "src": "679:11:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 5727,
                                                            "type": "address",
                                                            "value": "output"
                                                        },
                                                        "id": 5772,
                                                        "name": "Identifier",
                                                        "src": "695:6:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "hexvalue": "30",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "subdenomination": null,
                                                            "token": "number",
                                                            "type": "int_const 0",
                                                            "value": "0"
                                                        },
                                                        "id": 5773,
                                                        "name": "Literal",
                                                        "src": "706:1:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "operator": "~",
                                                            "prefix": true,
                                                            "type": "uint256"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": true,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_rational_0_by_1",
                                                                                    "typeString": "int_const 0"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": true,
                                                                            "lValueRequested": false,
                                                                            "type": "type(uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "name": "uint256",
                                                                                    "type": null
                                                                                },
                                                                                "id": 5774,
                                                                                "name": "ElementaryTypeName",
                                                                                "src": "729:7:49"
                                                                            }
                                                                        ],
                                                                        "id": 5775,
                                                                        "name": "ElementaryTypeNameExpression",
                                                                        "src": "729:7:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "hexvalue": "30",
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": true,
                                                                            "lValueRequested": false,
                                                                            "subdenomination": null,
                                                                            "token": "number",
                                                                            "type": "int_const 0",
                                                                            "value": "0"
                                                                        },
                                                                        "id": 5776,
                                                                        "name": "Literal",
                                                                        "src": "737:1:49"
                                                                    }
                                                                ],
                                                                "id": 5777,
                                                                "name": "FunctionCall",
                                                                "src": "729:10:49"
                                                            }
                                                        ],
                                                        "id": 5778,
                                                        "name": "UnaryOperation",
                                                        "src": "728:11:49"
                                                    }
                                                ],
                                                "id": 5779,
                                                "name": "FunctionCall",
                                                "src": "630:125:49"
                                            }
                                        ],
                                        "id": 5780,
                                        "name": "VariableDeclarationStatement",
                                        "src": "607:148:49"
                                    },
                                    {
                                        "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_06c03380c4272fef6a4bbf204937ebd20a641d012b362d8fa30b0ac0039c0105",
                                                                    "typeString": "literal_string \"PairBPool: transfer failed!\""
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                -18,
                                                                -18
                                                            ],
                                                            "referencedDeclaration": -18,
                                                            "type": "function (bool,string memory) pure",
                                                            "value": "require"
                                                        },
                                                        "id": 5781,
                                                        "name": "Identifier",
                                                        "src": "759:7:49"
                                                    },
                                                    {
                                                        "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": 5782,
                                                                                "name": "Identifier",
                                                                                "src": "771:5:49"
                                                                            },
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5727,
                                                                                    "type": "address",
                                                                                    "value": "output"
                                                                                },
                                                                                "id": 5783,
                                                                                "name": "Identifier",
                                                                                "src": "777:6:49"
                                                                            }
                                                                        ],
                                                                        "id": 5784,
                                                                        "name": "FunctionCall",
                                                                        "src": "771:13:49"
                                                                    }
                                                                ],
                                                                "id": 5785,
                                                                "name": "MemberAccess",
                                                                "src": "771:22:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5729,
                                                                    "type": "address",
                                                                    "value": "to"
                                                                },
                                                                "id": 5786,
                                                                "name": "Identifier",
                                                                "src": "794:2:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5765,
                                                                    "type": "uint256",
                                                                    "value": "outputAmount"
                                                                },
                                                                "id": 5787,
                                                                "name": "Identifier",
                                                                "src": "798:12:49"
                                                            }
                                                        ],
                                                        "id": 5788,
                                                        "name": "FunctionCall",
                                                        "src": "771:40:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "hexvalue": "5061697242506f6f6c3a207472616e73666572206661696c656421",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "subdenomination": null,
                                                            "token": "string",
                                                            "type": "literal_string \"PairBPool: transfer failed!\"",
                                                            "value": "PairBPool: transfer failed!"
                                                        },
                                                        "id": 5789,
                                                        "name": "Literal",
                                                        "src": "816:29:49"
                                                    }
                                                ],
                                                "id": 5790,
                                                "name": "FunctionCall",
                                                "src": "759:87:49"
                                            }
                                        ],
                                        "id": 5791,
                                        "name": "ExpressionStatement",
                                        "src": "759:87:49"
                                    }
                                ],
                                "id": 5792,
                                "name": "Block",
                                "src": "412:438:49"
                            }
                        ],
                        "id": 5793,
                        "name": "FunctionDefinition",
                        "src": "305:545:49"
                    },
                    {
                        "attributes": {
                            "documentation": null,
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "parseData",
                            "overrides": null,
                            "scope": 5860,
                            "stateMutability": "pure",
                            "virtual": false,
                            "visibility": "private"
                        },
                        "children": [
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "data",
                                            "overrides": null,
                                            "scope": 5810,
                                            "stateVariable": false,
                                            "storageLocation": "memory",
                                            "type": "bytes",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "bytes",
                                                    "type": "bytes"
                                                },
                                                "id": 5794,
                                                "name": "ElementaryTypeName",
                                                "src": "872:5:49"
                                            }
                                        ],
                                        "id": 5795,
                                        "name": "VariableDeclaration",
                                        "src": "872:17:49"
                                    }
                                ],
                                "id": 5796,
                                "name": "ParameterList",
                                "src": "871:19:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "poolAddr",
                                            "overrides": null,
                                            "scope": 5810,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5797,
                                                "name": "ElementaryTypeName",
                                                "src": "913:7:49"
                                            }
                                        ],
                                        "id": 5798,
                                        "name": "VariableDeclaration",
                                        "src": "913:16:49"
                                    }
                                ],
                                "id": 5799,
                                "name": "ParameterList",
                                "src": "912:18:49"
                            },
                            {
                                "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_14854c4ab46e8010e0f6aade82a18370341d16189ff9c6e530f97e35c8842ebe",
                                                                    "typeString": "literal_string \"PairBPool: invalid data!\""
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                -18,
                                                                -18
                                                            ],
                                                            "referencedDeclaration": -18,
                                                            "type": "function (bool,string memory) pure",
                                                            "value": "require"
                                                        },
                                                        "id": 5800,
                                                        "name": "Identifier",
                                                        "src": "935:7:49"
                                                    },
                                                    {
                                                        "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": 5795,
                                                                            "type": "bytes memory",
                                                                            "value": "data"
                                                                        },
                                                                        "id": 5801,
                                                                        "name": "Identifier",
                                                                        "src": "943:4:49"
                                                                    }
                                                                ],
                                                                "id": 5802,
                                                                "name": "MemberAccess",
                                                                "src": "943:11:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "hexvalue": "3230",
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": true,
                                                                    "lValueRequested": false,
                                                                    "subdenomination": null,
                                                                    "token": "number",
                                                                    "type": "int_const 20",
                                                                    "value": "20"
                                                                },
                                                                "id": 5803,
                                                                "name": "Literal",
                                                                "src": "958:2:49"
                                                            }
                                                        ],
                                                        "id": 5804,
                                                        "name": "BinaryOperation",
                                                        "src": "943:17:49"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "hexvalue": "5061697242506f6f6c3a20696e76616c6964206461746121",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "subdenomination": null,
                                                            "token": "string",
                                                            "type": "literal_string \"PairBPool: invalid data!\"",
                                                            "value": "PairBPool: invalid data!"
                                                        },
                                                        "id": 5805,
                                                        "name": "Literal",
                                                        "src": "962:26:49"
                                                    }
                                                ],
                                                "id": 5806,
                                                "name": "FunctionCall",
                                                "src": "935:54:49"
                                            }
                                        ],
                                        "id": 5807,
                                        "name": "ExpressionStatement",
                                        "src": "935:54:49"
                                    },
                                    {
                                        "attributes": {
                                            "evmVersion": "istanbul",
                                            "externalReferences": [
                                                {
                                                    "declaration": 5795,
                                                    "isOffset": false,
                                                    "isSlot": false,
                                                    "src": "1028:4:49",
                                                    "valueSize": 1
                                                },
                                                {
                                                    "declaration": 5798,
                                                    "isOffset": false,
                                                    "isSlot": false,
                                                    "src": "1006:8:49",
                                                    "valueSize": 1
                                                }
                                            ],
                                            "operations": "{\n    poolAddr := mload(add(data, 20))\n}"
                                        },
                                        "children": [],
                                        "id": 5808,
                                        "name": "InlineAssembly",
                                        "src": "992:49:49"
                                    }
                                ],
                                "id": 5809,
                                "name": "Block",
                                "src": "931:113:49"
                            }
                        ],
                        "id": 5810,
                        "name": "FunctionDefinition",
                        "src": "853:191:49"
                    },
                    {
                        "attributes": {
                            "baseFunctions": [
                                5324
                            ],
                            "documentation": null,
                            "functionSelector": "7eace892",
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "getOutputAmount",
                            "scope": 5860,
                            "stateMutability": "nonpayable",
                            "virtual": false,
                            "visibility": "external"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "overrides": [
                                        null
                                    ]
                                },
                                "id": 5820,
                                "name": "OverrideSpecifier",
                                "src": "1159:8:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "input",
                                            "overrides": null,
                                            "scope": 5859,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5811,
                                                "name": "ElementaryTypeName",
                                                "src": "1075:7:49"
                                            }
                                        ],
                                        "id": 5812,
                                        "name": "VariableDeclaration",
                                        "src": "1075:13:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "output",
                                            "overrides": null,
                                            "scope": 5859,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 5813,
                                                "name": "ElementaryTypeName",
                                                "src": "1092:7:49"
                                            }
                                        ],
                                        "id": 5814,
                                        "name": "VariableDeclaration",
                                        "src": "1092:14:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "amountIn",
                                            "overrides": null,
                                            "scope": 5859,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "uint256",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "uint",
                                                    "type": "uint256"
                                                },
                                                "id": 5815,
                                                "name": "ElementaryTypeName",
                                                "src": "1110:4:49"
                                            }
                                        ],
                                        "id": 5816,
                                        "name": "VariableDeclaration",
                                        "src": "1110:13:49"
                                    },
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "data",
                                            "overrides": null,
                                            "scope": 5859,
                                            "stateVariable": false,
                                            "storageLocation": "calldata",
                                            "type": "bytes",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "bytes",
                                                    "type": "bytes"
                                                },
                                                "id": 5817,
                                                "name": "ElementaryTypeName",
                                                "src": "1127:5:49"
                                            }
                                        ],
                                        "id": 5818,
                                        "name": "VariableDeclaration",
                                        "src": "1127:19:49"
                                    }
                                ],
                                "id": 5819,
                                "name": "ParameterList",
                                "src": "1071:78:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "amountOut",
                                            "overrides": null,
                                            "scope": 5859,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "uint256",
                                            "value": null,
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "uint",
                                                    "type": "uint256"
                                                },
                                                "id": 5821,
                                                "name": "ElementaryTypeName",
                                                "src": "1177:4:49"
                                            }
                                        ],
                                        "id": 5822,
                                        "name": "VariableDeclaration",
                                        "src": "1177:14:49"
                                    }
                                ],
                                "id": 5823,
                                "name": "ParameterList",
                                "src": "1176:16:49"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "assignments": [
                                                5825
                                            ]
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "constant": false,
                                                    "mutability": "mutable",
                                                    "name": "pool",
                                                    "overrides": null,
                                                    "scope": 5858,
                                                    "stateVariable": false,
                                                    "storageLocation": "default",
                                                    "type": "contract IBPool",
                                                    "value": null,
                                                    "visibility": "internal"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "contractScope": null,
                                                            "name": "IBPool",
                                                            "referencedDeclaration": 1371,
                                                            "type": "contract IBPool"
                                                        },
                                                        "id": 5824,
                                                        "name": "UserDefinedTypeName",
                                                        "src": "1197:6:49"
                                                    }
                                                ],
                                                "id": 5825,
                                                "name": "VariableDeclaration",
                                                "src": "1197:11:49"
                                            },
                                            {
                                                "attributes": {
                                                    "argumentTypes": null,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "contract IBPool",
                                                    "type_conversion": true
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_address",
                                                                    "typeString": "address"
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 1371,
                                                            "type": "type(contract IBPool)",
                                                            "value": "IBPool"
                                                        },
                                                        "id": 5826,
                                                        "name": "Identifier",
                                                        "src": "1211:6:49"
                                                    },
                                                    {
                                                        "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": 5810,
                                                                    "type": "function (bytes memory) pure returns (address)",
                                                                    "value": "parseData"
                                                                },
                                                                "id": 5827,
                                                                "name": "Identifier",
                                                                "src": "1218:9:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5818,
                                                                    "type": "bytes calldata",
                                                                    "value": "data"
                                                                },
                                                                "id": 5828,
                                                                "name": "Identifier",
                                                                "src": "1228:4:49"
                                                            }
                                                        ],
                                                        "id": 5829,
                                                        "name": "FunctionCall",
                                                        "src": "1218:15:49"
                                                    }
                                                ],
                                                "id": 5830,
                                                "name": "FunctionCall",
                                                "src": "1211:23:49"
                                            }
                                        ],
                                        "id": 5831,
                                        "name": "VariableDeclarationStatement",
                                        "src": "1197:37:49"
                                    },
                                    {
                                        "children": [
                                            {
                                                "attributes": {
                                                    "argumentTypes": null,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "operator": "=",
                                                    "type": "uint256"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": null,
                                                            "overloadedDeclarations": [
                                                                null
                                                            ],
                                                            "referencedDeclaration": 5822,
                                                            "type": "uint256",
                                                            "value": "amountOut"
                                                        },
                                                        "id": 5832,
                                                        "name": "Identifier",
                                                        "src": "1238:9:49"
                                                    },
                                                    {
                                                        "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_uint256",
                                                                            "typeString": "uint256"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        }
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "lValueRequested": false,
                                                                    "member_name": "calcOutGivenIn",
                                                                    "referencedDeclaration": 1334,
                                                                    "type": "function (uint256,uint256,uint256,uint256,uint256,uint256) pure external returns (uint256)"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5825,
                                                                            "type": "contract IBPool",
                                                                            "value": "pool"
                                                                        },
                                                                        "id": 5833,
                                                                        "name": "Identifier",
                                                                        "src": "1250:4:49"
                                                                    }
                                                                ],
                                                                "id": 5834,
                                                                "name": "MemberAccess",
                                                                "src": "1250:19:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address",
                                                                                    "typeString": "address"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "getBalance",
                                                                            "referencedDeclaration": 1365,
                                                                            "type": "function (address) view external returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5825,
                                                                                    "type": "contract IBPool",
                                                                                    "value": "pool"
                                                                                },
                                                                                "id": 5835,
                                                                                "name": "Identifier",
                                                                                "src": "1274:4:49"
                                                                            }
                                                                        ],
                                                                        "id": 5836,
                                                                        "name": "MemberAccess",
                                                                        "src": "1274:15:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5812,
                                                                            "type": "address",
                                                                            "value": "input"
                                                                        },
                                                                        "id": 5837,
                                                                        "name": "Identifier",
                                                                        "src": "1290:5:49"
                                                                    }
                                                                ],
                                                                "id": 5838,
                                                                "name": "FunctionCall",
                                                                "src": "1274:22:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address",
                                                                                    "typeString": "address"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "getDenormalizedWeight",
                                                                            "referencedDeclaration": 1348,
                                                                            "type": "function (address) view external returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5825,
                                                                                    "type": "contract IBPool",
                                                                                    "value": "pool"
                                                                                },
                                                                                "id": 5839,
                                                                                "name": "Identifier",
                                                                                "src": "1301:4:49"
                                                                            }
                                                                        ],
                                                                        "id": 5840,
                                                                        "name": "MemberAccess",
                                                                        "src": "1301:26:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5812,
                                                                            "type": "address",
                                                                            "value": "input"
                                                                        },
                                                                        "id": 5841,
                                                                        "name": "Identifier",
                                                                        "src": "1328:5:49"
                                                                    }
                                                                ],
                                                                "id": 5842,
                                                                "name": "FunctionCall",
                                                                "src": "1301:33:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address",
                                                                                    "typeString": "address"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "getBalance",
                                                                            "referencedDeclaration": 1365,
                                                                            "type": "function (address) view external returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5825,
                                                                                    "type": "contract IBPool",
                                                                                    "value": "pool"
                                                                                },
                                                                                "id": 5843,
                                                                                "name": "Identifier",
                                                                                "src": "1339:4:49"
                                                                            }
                                                                        ],
                                                                        "id": 5844,
                                                                        "name": "MemberAccess",
                                                                        "src": "1339:15:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5814,
                                                                            "type": "address",
                                                                            "value": "output"
                                                                        },
                                                                        "id": 5845,
                                                                        "name": "Identifier",
                                                                        "src": "1355:6:49"
                                                                    }
                                                                ],
                                                                "id": 5846,
                                                                "name": "FunctionCall",
                                                                "src": "1339:23:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address",
                                                                                    "typeString": "address"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "getDenormalizedWeight",
                                                                            "referencedDeclaration": 1348,
                                                                            "type": "function (address) view external returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5825,
                                                                                    "type": "contract IBPool",
                                                                                    "value": "pool"
                                                                                },
                                                                                "id": 5847,
                                                                                "name": "Identifier",
                                                                                "src": "1367:4:49"
                                                                            }
                                                                        ],
                                                                        "id": 5848,
                                                                        "name": "MemberAccess",
                                                                        "src": "1367:26:49"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": null,
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 5814,
                                                                            "type": "address",
                                                                            "value": "output"
                                                                        },
                                                                        "id": 5849,
                                                                        "name": "Identifier",
                                                                        "src": "1394:6:49"
                                                                    }
                                                                ],
                                                                "id": 5850,
                                                                "name": "FunctionCall",
                                                                "src": "1367:34:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 5816,
                                                                    "type": "uint256",
                                                                    "value": "amountIn"
                                                                },
                                                                "id": 5851,
                                                                "name": "Identifier",
                                                                "src": "1406:8:49"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": null,
                                                                    "arguments": [
                                                                        null
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                null
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "getSwapFee",
                                                                            "referencedDeclaration": 1370,
                                                                            "type": "function () view external returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "argumentTypes": null,
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": 5825,
                                                                                    "type": "contract IBPool",
                                                                                    "value": "pool"
                                                                                },
                                                                                "id": 5852,
                                                                                "name": "Identifier",
                                                                                "src": "1419:4:49"
                                                                            }
                                                                        ],
                                                                        "id": 5853,
                                                                        "name": "MemberAccess",
                                                                        "src": "1419:15:49"
                                                                    }
                                                                ],
                                                                "id": 5854,
                                                                "name": "FunctionCall",
                                                                "src": "1419:17:49"
                                                            }
                                                        ],
                                                        "id": 5855,
                                                        "name": "FunctionCall",
                                                        "src": "1250:190:49"
                                                    }
                                                ],
                                                "id": 5856,
                                                "name": "Assignment",
                                                "src": "1238:202:49"
                                            }
                                        ],
                                        "id": 5857,
                                        "name": "ExpressionStatement",
                                        "src": "1238:202:49"
                                    }
                                ],
                                "id": 5858,
                                "name": "Block",
                                "src": "1193:251:49"
                            }
                        ],
                        "id": 5859,
                        "name": "FunctionDefinition",
                        "src": "1047:397:49"
                    }
                ],
                "id": 5860,
                "name": "ContractDefinition",
                "src": "239:1207:49"
            }
        ],
        "id": 5861,
        "name": "SourceUnit",
        "src": "32:1415:49"
    },
    "compiler": {
        "name": "solc",
        "version": "0.6.8+commit.0bbfe453.Emscripten.clang"
    },
    "networks": {},
    "schemaVersion": "3.4.16",
    "updatedAt": "2025-02-07T17:50:42.827Z",
    "devdoc": {
        "methods": {}
    },
    "userdoc": {
        "methods": {}
    }
}
