ocean-subgraph/abis/BPool.json

66949 lines
2.9 MiB

{
"contractName": "BPool",
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "amt",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_TOTAL_WEIGHT",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "BPOW_PRECISION",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MIN_WEIGHT",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "src",
"type": "address"
},
{
"name": "dst",
"type": "address"
},
{
"name": "amt",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceIn",
"type": "uint256"
},
{
"name": "tokenWeightIn",
"type": "uint256"
},
{
"name": "poolSupply",
"type": "uint256"
},
{
"name": "totalWeight",
"type": "uint256"
},
{
"name": "poolAmountOut",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcSingleInGivenPoolOut",
"outputs": [
{
"name": "tokenAmountIn",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "amt",
"type": "uint256"
}
],
"name": "decreaseApproval",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "whom",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MIN_FEE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceOut",
"type": "uint256"
},
{
"name": "tokenWeightOut",
"type": "uint256"
},
{
"name": "poolSupply",
"type": "uint256"
},
{
"name": "totalWeight",
"type": "uint256"
},
{
"name": "tokenAmountOut",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcPoolInGivenSingleOut",
"outputs": [
{
"name": "poolAmountIn",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceIn",
"type": "uint256"
},
{
"name": "tokenWeightIn",
"type": "uint256"
},
{
"name": "poolSupply",
"type": "uint256"
},
{
"name": "totalWeight",
"type": "uint256"
},
{
"name": "tokenAmountIn",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcPoolOutGivenSingleIn",
"outputs": [
{
"name": "poolAmountOut",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MIN_BALANCE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceOut",
"type": "uint256"
},
{
"name": "tokenWeightOut",
"type": "uint256"
},
{
"name": "poolSupply",
"type": "uint256"
},
{
"name": "totalWeight",
"type": "uint256"
},
{
"name": "poolAmountIn",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcSingleOutGivenPoolIn",
"outputs": [
{
"name": "tokenAmountOut",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "INIT_POOL_SUPPLY",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_OUT_RATIO",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceIn",
"type": "uint256"
},
{
"name": "tokenWeightIn",
"type": "uint256"
},
{
"name": "tokenBalanceOut",
"type": "uint256"
},
{
"name": "tokenWeightOut",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcSpotPrice",
"outputs": [
{
"name": "spotPrice",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "amt",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_BOUND_TOKENS",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MIN_BOUND_TOKENS",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MIN_BPOW_BASE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceIn",
"type": "uint256"
},
{
"name": "tokenWeightIn",
"type": "uint256"
},
{
"name": "tokenBalanceOut",
"type": "uint256"
},
{
"name": "tokenWeightOut",
"type": "uint256"
},
{
"name": "tokenAmountIn",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcOutGivenIn",
"outputs": [
{
"name": "tokenAmountOut",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_FEE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_BPOW_BASE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "BONE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "EXIT_FEE",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dst",
"type": "address"
},
{
"name": "amt",
"type": "uint256"
}
],
"name": "increaseApproval",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "src",
"type": "address"
},
{
"name": "dst",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_WEIGHT",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "MAX_IN_RATIO",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenBalanceIn",
"type": "uint256"
},
{
"name": "tokenWeightIn",
"type": "uint256"
},
{
"name": "tokenBalanceOut",
"type": "uint256"
},
{
"name": "tokenWeightOut",
"type": "uint256"
},
{
"name": "tokenAmountOut",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "calcInGivenOut",
"outputs": [
{
"name": "tokenAmountIn",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "caller",
"type": "address"
},
{
"indexed": true,
"name": "tokenIn",
"type": "address"
},
{
"indexed": true,
"name": "tokenOut",
"type": "address"
},
{
"indexed": false,
"name": "tokenAmountIn",
"type": "uint256"
},
{
"indexed": false,
"name": "tokenAmountOut",
"type": "uint256"
}
],
"name": "LOG_SWAP",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "caller",
"type": "address"
},
{
"indexed": true,
"name": "tokenIn",
"type": "address"
},
{
"indexed": false,
"name": "tokenAmountIn",
"type": "uint256"
}
],
"name": "LOG_JOIN",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "caller",
"type": "address"
},
{
"indexed": true,
"name": "tokenOut",
"type": "address"
},
{
"indexed": false,
"name": "tokenAmountOut",
"type": "uint256"
}
],
"name": "LOG_EXIT",
"type": "event"
},
{
"anonymous": true,
"inputs": [
{
"indexed": true,
"name": "sig",
"type": "bytes4"
},
{
"indexed": true,
"name": "caller",
"type": "address"
},
{
"indexed": false,
"name": "data",
"type": "bytes"
}
],
"name": "LOG_CALL",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"constant": true,
"inputs": [],
"name": "isInitialized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "controller",
"type": "address"
},
{
"name": "factory",
"type": "address"
},
{
"name": "swapFee",
"type": "uint256"
},
{
"name": "publicSwap",
"type": "bool"
},
{
"name": "finalized",
"type": "bool"
}
],
"name": "initialize",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "dataTokenAaddress",
"type": "address"
},
{
"name": "dataTokenAmount",
"type": "uint256"
},
{
"name": "dataTokenWeight",
"type": "uint256"
},
{
"name": "baseTokenAddress",
"type": "address"
},
{
"name": "baseTokenAmount",
"type": "uint256"
},
{
"name": "baseTokenWeight",
"type": "uint256"
},
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "setup",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isPublicSwap",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isFinalized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "t",
"type": "address"
}
],
"name": "isBound",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getNumTokens",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getCurrentTokens",
"outputs": [
{
"name": "tokens",
"type": "address[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getFinalTokens",
"outputs": [
{
"name": "tokens",
"type": "address[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getDenormalizedWeight",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getTotalDenormalizedWeight",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getNormalizedWeight",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "getBalance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getSwapFee",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getController",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "swapFee",
"type": "uint256"
}
],
"name": "setSwapFee",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "manager",
"type": "address"
}
],
"name": "setController",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "public_",
"type": "bool"
}
],
"name": "setPublicSwap",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "finalize",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
},
{
"name": "balance",
"type": "uint256"
},
{
"name": "denorm",
"type": "uint256"
}
],
"name": "bind",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
},
{
"name": "balance",
"type": "uint256"
},
{
"name": "denorm",
"type": "uint256"
}
],
"name": "rebind",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "unbind",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "token",
"type": "address"
}
],
"name": "gulp",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "tokenOut",
"type": "address"
}
],
"name": "getSpotPrice",
"outputs": [
{
"name": "spotPrice",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "tokenOut",
"type": "address"
}
],
"name": "getSpotPriceSansFee",
"outputs": [
{
"name": "spotPrice",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "poolAmountOut",
"type": "uint256"
},
{
"name": "maxAmountsIn",
"type": "uint256[]"
}
],
"name": "joinPool",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "poolAmountIn",
"type": "uint256"
},
{
"name": "minAmountsOut",
"type": "uint256[]"
}
],
"name": "exitPool",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "tokenAmountIn",
"type": "uint256"
},
{
"name": "tokenOut",
"type": "address"
},
{
"name": "minAmountOut",
"type": "uint256"
},
{
"name": "maxPrice",
"type": "uint256"
}
],
"name": "swapExactAmountIn",
"outputs": [
{
"name": "tokenAmountOut",
"type": "uint256"
},
{
"name": "spotPriceAfter",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "maxAmountIn",
"type": "uint256"
},
{
"name": "tokenOut",
"type": "address"
},
{
"name": "tokenAmountOut",
"type": "uint256"
},
{
"name": "maxPrice",
"type": "uint256"
}
],
"name": "swapExactAmountOut",
"outputs": [
{
"name": "tokenAmountIn",
"type": "uint256"
},
{
"name": "spotPriceAfter",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "tokenAmountIn",
"type": "uint256"
},
{
"name": "minPoolAmountOut",
"type": "uint256"
}
],
"name": "joinswapExternAmountIn",
"outputs": [
{
"name": "poolAmountOut",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenIn",
"type": "address"
},
{
"name": "poolAmountOut",
"type": "uint256"
},
{
"name": "maxAmountIn",
"type": "uint256"
}
],
"name": "joinswapPoolAmountOut",
"outputs": [
{
"name": "tokenAmountIn",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenOut",
"type": "address"
},
{
"name": "poolAmountIn",
"type": "uint256"
},
{
"name": "minAmountOut",
"type": "uint256"
}
],
"name": "exitswapPoolAmountIn",
"outputs": [
{
"name": "tokenAmountOut",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenOut",
"type": "address"
},
{
"name": "tokenAmountOut",
"type": "uint256"
},
{
"name": "maxPoolAmountIn",
"type": "uint256"
}
],
"name": "exitswapExternAmountOut",
"outputs": [
{
"name": "poolAmountIn",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.7+commit.6da8b019\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPoolAmountIn\",\"type\":\"uint256\"}],\"name\":\"exitswapExternAmountOut\",\"outputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenOut\",\"type\":\"address\"}],\"name\":\"getSpotPriceSansFee\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenOut\",\"type\":\"address\"}],\"name\":\"getSpotPrice\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"t\",\"type\":\"address\"}],\"name\":\"isBound\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getController\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"setSwapFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"denorm\",\"type\":\"uint256\"}],\"name\":\"rebind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"minAmountOut\",\"type\":\"uint256\"}],\"name\":\"exitswapPoolAmountIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"public_\",\"type\":\"bool\"}],\"name\":\"setPublicSwap\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finalize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"controller\",\"type\":\"address\"},{\"name\":\"factory\",\"type\":\"address\"},{\"name\":\"swapFee\",\"type\":\"uint256\"},{\"name\":\"publicSwap\",\"type\":\"bool\"},{\"name\":\"finalized\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleInGivenPoolOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"minPoolAmountOut\",\"type\":\"uint256\"}],\"name\":\"joinswapExternAmountIn\",\"outputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"poolAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxAmountIn\",\"type\":\"uint256\"}],\"name\":\"joinswapPoolAmountOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"whom\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"maxAmountIn\",\"type\":\"uint256\"},{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPrice\",\"type\":\"uint256\"}],\"name\":\"swapExactAmountOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"spotPriceAfter\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"tokenIn\",\"type\":\"address\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"tokenOut\",\"type\":\"address\"},{\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"name\":\"maxPrice\",\"type\":\"uint256\"}],\"name\":\"swapExactAmountIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"spotPriceAfter\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolInGivenSingleOut\",\"outputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcPoolOutGivenSingleIn\",\"outputs\":[{\"name\":\"poolAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"poolSupply\",\"type\":\"uint256\"},{\"name\":\"totalWeight\",\"type\":\"uint256\"},{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSingleOutGivenPoolIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"gulp\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isFinalized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"setController\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getTotalDenormalizedWeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDenormalizedWeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcSpotPrice\",\"outputs\":[{\"name\":\"spotPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"poolAmountIn\",\"type\":\"uint256\"},{\"name\":\"minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcOutGivenIn\",\"outputs\":[{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getFinalTokens\",\"outputs\":[{\"name\":\"tokens\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentTokens\",\"outputs\":[{\"name\":\"tokens\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNumTokens\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"unbind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dataTokenAaddress\",\"type\":\"address\"},{\"name\":\"dataTokenAmount\",\"type\":\"uint256\"},{\"name\":\"dataTokenWeight\",\"type\":\"uint256\"},{\"name\":\"baseTokenAddress\",\"type\":\"address\"},{\"name\":\"baseTokenAmount\",\"type\":\"uint256\"},{\"name\":\"baseTokenWeight\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"setup\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSwapFee\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"amt\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"denorm\",\"type\":\"uint256\"}],\"name\":\"bind\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getNormalizedWeight\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"tokenBalanceIn\",\"type\":\"uint256\"},{\"name\":\"tokenWeightIn\",\"type\":\"uint256\"},{\"name\":\"tokenBalanceOut\",\"type\":\"uint256\"},{\"name\":\"tokenWeightOut\",\"type\":\"uint256\"},{\"name\":\"tokenAmountOut\",\"type\":\"uint256\"},{\"name\":\"swapFee\",\"type\":\"uint256\"}],\"name\":\"calcInGivenOut\",\"outputs\":[{\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isPublicSwap\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"name\":\"LOG_SWAP\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountIn\",\"type\":\"uint256\"}],\"name\":\"LOG_JOIN\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"tokenOut\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"tokenAmountOut\",\"type\":\"uint256\"}],\"name\":\"LOG_EXIT\",\"type\":\"event\"},{\"anonymous\":true,\"inputs\":[{\"indexed\":true,\"name\":\"sig\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"LOG_CALL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Used by the (Ocean version) BFactory contract as a bytecode reference to deploy new BPools. * This contract is is nearly identical to the BPool.sol contract at [1] The only difference is the \\\"Proxy contract functionality\\\" section given below. We'd inherit from BPool if we could, for simplicity. But we can't, because the proxy section needs to access private variables declared in BPool, and Solidity disallows this. Therefore the best we can do for now is clearly demarcate the proxy section. * [1] https://github.com/balancer-labs/balancer-core/contracts/.\",\"methods\":{},\"title\":\"BPool \"},\"userdoc\":{\"methods\":{\"calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\\\ (wO / wI) \\\\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\\\ \\\\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************\"},\"calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\\\ (wI / wO) \\\\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\\\ \\\\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"},\"calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\\\\\ / wO \\\\ \\\\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\\\ | ---- | \\\\ // // tAo = tokenAmountOut pS - || \\\\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\\\ tW / * pS | // // ps = poolSupply \\\\\\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\\\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************\"},\"calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\\\ // // tAi = tokenAmountIn /// / // wI \\\\ \\\\\\\\ \\\\ wI \\\\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\\\ -- \\\\ // // tW = totalWeight pAo=|| \\\\ \\\\ \\\\\\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\\\\\ ------------------------------------- / / // // pS = poolSupply \\\\\\\\ tBi / / // // sF = swapFee \\\\ / //*********************************************************************************************\"},\"calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\\\ / 1 \\\\\\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\\\\\ pS / \\\\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\\\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\\\ tW / //*********************************************************************************************\"},\"calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\\\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\\\ / 1 \\\\ \\\\\\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\\\ \\\\\\\\ pS / \\\\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\\\ \\\\ // // // tW = totalWeight / / wO \\\\ \\\\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\\\ \\\\ tW / / //*********************************************************************************************\"},\"calcSpotPrice(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************\"}}}},\"settings\":{\"compilationTarget\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol\":\"BPool\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BConst.sol\":{\"keccak256\":\"0x21675a0793e0be762a27e09ed3b0bd86e035c73ac3078dd841c38804445d5f5a\",\"urls\":[\"bzzr://47016ef4a80276f320b28a058fc92e7d9d93433bb5e4aa934668383cbefad77e\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BMath.sol\":{\"keccak256\":\"0x2e3f07713561f2a0983999255794f5741c5854633b8524675767fde35f1b98c2\",\"urls\":[\"bzzr://e8c50205e3f6bd1d37fcdf178486f9560814e28ed8467af5a4ceb30651991cf8\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BNum.sol\":{\"keccak256\":\"0xc4e5c934d6b04c1fad116ea81c2fa65eaa2700e4e48bcc5045c8c96f55e729c8\",\"urls\":[\"bzzr://a3946b7fd2095ca3c7c4bb3daf3078cc48e20b0e107f113e10fb0c6ebaa77e74\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol\":{\"keccak256\":\"0x5317eb03e13ef8512444d550ce4811c67610fef0ece0d45f583fc14658bb2d92\",\"urls\":[\"bzzr://0557c64a1179384e994a9675724430e4db5b2dd15fdc7e59b9b6fdfa65f12dcb\"]},\"/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol\":{\"keccak256\":\"0xad046b7ad912f72a90330abb3abddc3aa711077c0021d6a9d0dba2c99534e51b\",\"urls\":[\"bzzr://159aed1b631f2af168fd17235b6827859cb5d6cb7e95abeff3cc3d8079710f41\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzzr://cf2d583b8dce38d0617fdcd65f2fd9f126fe17b7f683b5a515ea9d2762d8b062\"]}},\"version\":1}",
"bytecode": "0x60c0604052601360808190527f42616c616e63657220506f6f6c20546f6b656e0000000000000000000000000060a090815262000040916003919062000169565b506040805180820190915260038082527f42505400000000000000000000000000000000000000000000000000000000006020909201918252620000879160049162000169565b506005805460ff19908116601217909155600c80549091169055348015620000ae57600080fd5b50620000cd338064e8d4a51000600080640100000000620000d4810204565b506200020e565b6006805460058054600160a060020a0397881662010000026201000060b060020a0319909116179055600794909455911515740100000000000000000000000000000000000000000260a060020a60ff021995909416600160a060020a03199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001ac57805160ff1916838001178555620001dc565b82800160010185558215620001dc579182015b82811115620001dc578251825591602001919060010190620001bf565b50620001ea929150620001ee565b5090565b6200020b91905b80821115620001ea5760008155600101620001f5565b90565b615e7a806200021e6000396000f3fe608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a723058207bcbca44799ae1f6beadc2a7a0bab5e141b86fb59884e8cd794df13a11591fb70029",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061040e576000357c0100000000000000000000000000000000000000000000000000000000900480638c28cbe811610232578063be3bbd2e11610142578063d73dd623116100d5578063ec093021116100a4578063ec09302114610d35578063f1b8a9b714610d3d578063f8b2cb4f14610d63578063f8d6aed414610d89578063fde924f714610dc45761040e565b8063d73dd62314610ca9578063dd62ed3e14610cd5578063e4a28a5214610514578063e4e1e53814610d035761040e565b8063cd2ed8fb11610111578063cd2ed8fb14610c25578063cf5e7bd314610c2d578063d1d7bc9114610c53578063d4cadf6814610ca15761040e565b8063be3bbd2e14610bbd578063c36596a614610588578063c6580d1214610c15578063cc77828d14610c1d5761040e565b8063a221ee49116101c5578063b7b800a411610194578063b7b800a414610b62578063ba019dab14610b6a578063ba9530a614610b72578063bc063e1a14610bad578063bc694ea214610bb55761040e565b8063a221ee4914610a82578063a9059cbb14610ab7578063b02f0b7314610ae3578063b0e0d13614610b5a5761040e565b80639381cd2b116102015780639381cd2b14610a44578063948d8ce614610a4c57806395d89b4114610a72578063992e2a9214610a7a5761040e565b80638c28cbe8146109e85780638d4e408314610a0e57806392eefe9b14610a16578063936c347714610a3c5761040e565b806346ab38f11161032d5780636d06dfa0116102c05780638201aa3f1161028f5780638201aa3f146108ef57806382f652ad1461092f5780638656b6531461096a578063867378c5146109a557806389298012146109ad5761040e565b80636d06dfa01461083657806370a082311461086857806376c7a3c71461088e5780637c5e9ea4146108965761040e565b8063506de974116102fc578063506de974146107575780635c1bbaf71461079d5780635db34277146107d8578063661884631461080a5761040e565b806346ab38f11461068757806349b59552146106b95780634bb278f3146106d85780634f69c0d4146106e05761040e565b8063218b5382116103a5578063313ce56711610374578063313ce5671461061057806334e199071461062e578063392e53cd1461064d5780633fdddaa2146106555761040e565b8063218b53821461058857806323b872dd146105905780632f37b624146105c65780633018205f146105ec5761040e565b80631446a7ff116103e15780631446a7ff1461051c57806315e84af91461054a57806318160ddd14610578578063189d00ca146105805761040e565b806302c967481461041357806306fdde0314610457578063095ea7b3146104d457806309a3bbe414610514575b600080fd5b6104456004803603606081101561042957600080fd5b50600160a060020a038135169060208101359060400135610dcc565b60408051918252519081900360200190f35b61045f61113d565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610499578181015183820152602001610481565b50505050905090810190601f1680156104c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610500600480360360408110156104ea57600080fd5b50600160a060020a0381351690602001356111d3565b604080519115158252519081900360200190f35b610445611228565b6104456004803603604081101561053257600080fd5b50600160a060020a0381358116916020013516611235565b6104456004803603604081101561056057600080fd5b50600160a060020a038135811691602001351661138f565b6104456114e0565b6104456114e6565b6104456114fa565b610500600480360360608110156105a657600080fd5b50600160a060020a03813581169160208101359091169060400135611506565b610500600480360360208110156105dc57600080fd5b5035600160a060020a031661166b565b6105f4611689565b60408051600160a060020a039092168252519081900360200190f35b6106186116ea565b6040805160ff9092168252519081900360200190f35b61064b6004803603602081101561064457600080fd5b50356116f3565b005b610500611917565b61064b6004803603606081101561066b57600080fd5b50600160a060020a038135169060208101359060400135611920565b6104456004803603606081101561069d57600080fd5b50600160a060020a038135169060208101359060400135611d6c565b61064b600480360360208110156106cf57600080fd5b5035151561207c565b61064b61220d565b61064b600480360360408110156106f657600080fd5b8135919081019060408101602082013564010000000081111561071857600080fd5b82018360208201111561072a57600080fd5b8035906020019184602083028401116401000000008311171561074c57600080fd5b509092509050612424565b610500600480360360a081101561076d57600080fd5b50600160a060020a038135811691602081013590911690604081013590606081013515159060800135151561270b565b610445600480360360c08110156107b357600080fd5b5080359060208101359060408101359060608101359060808101359060a001356128f9565b610445600480360360608110156107ee57600080fd5b50600160a060020a0381351690602081013590604001356129b1565b6105006004803603604081101561082057600080fd5b50600160a060020a038135169060200135612c94565b6104456004803603606081101561084c57600080fd5b50600160a060020a038135169060208101359060400135612d6c565b6104456004803603602081101561087e57600080fd5b5035600160a060020a031661307d565b610445613098565b6108d6600480360360a08110156108ac57600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356130aa565b6040805192835260208301919091528051918290030190f35b6108d6600480360360a081101561090557600080fd5b50600160a060020a03813581169160208101359160408201351690606081013590608001356135ac565b610445600480360360c081101561094557600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613a95565b610445600480360360c081101561098057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613b54565b610445613bf5565b610445600480360360c08110156109c357600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613c09565b61064b600480360360208110156109fe57600080fd5b5035600160a060020a0316613cb9565b610500613e8a565b61064b60048036036020811015610a2c57600080fd5b5035600160a060020a0316613e93565b610445614039565b610445614091565b61044560048036036020811015610a6257600080fd5b5035600160a060020a031661409e565b61045f61416c565b6104456141cd565b610445600480360360a0811015610a9857600080fd5b50803590602081013590604081013590606081013590608001356141d9565b61050060048036036040811015610acd57600080fd5b50600160a060020a03813516906020013561423e565b61064b60048036036040811015610af957600080fd5b81359190810190604081016020820135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846020830284011164010000000083111715610b4f57600080fd5b509092509050614254565b61044561459a565b61044561459f565b6104456145a4565b610445600480360360c0811015610b8857600080fd5b5080359060208101359060408101359060608101359060808101359060a001356145a9565b61044561462a565b61044561463a565b610bc5614646565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610c01578181015183820152602001610be9565b505050509050019250505060405180910390f35b61044561473e565b610bc5614743565b610445614794565b61064b60048036036020811015610c4357600080fd5b5035600160a060020a031661479a565b61064b600480360360e0811015610c6957600080fd5b50600160a060020a03813581169160208101359160408201359160608101359091169060808101359060a08101359060c00135614b27565b610445614cd0565b61050060048036036040811015610cbf57600080fd5b50600160a060020a038135169060200135614d28565b61044560048036036040811015610ceb57600080fd5b50600160a060020a0381358116916020013516614da9565b61064b60048036036060811015610d1957600080fd5b50600160a060020a038135169060208101359060400135614dd4565b610445615058565b61044560048036036020811015610d5357600080fd5b5035600160a060020a0316615068565b61044560048036036020811015610d7957600080fd5b5035600160a060020a0316615148565b610445600480360360c0811015610d9f57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135615216565b610500615299565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615610e7d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16610ed4576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16610f32576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a60205260409020600390810154610f6791670de0b6b3a76400005b046001016152a9565b831115610fbe576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754610ff894939291908990613a95565b91508161103d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115611083576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b611091816003015485615392565b600382015560006110a283826152a9565b604080518781529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110f03384615403565b6111026110fd8483615392565b615411565b60055461111e90620100009004600160a060020a03168261541d565b611129863387615427565b50506005805461ff00191690559392505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b820191906000526020600020905b8154815290600101906020018083116111ac57829003601f168201915b5050505050905090565b336000818152600160209081526040808320600160a060020a03871680855290835281842086905581518681529151939490939092600080516020615dcf833981519152928290030190a35060015b92915050565b6802b5e3af16b188000081565b600554600090610100900460ff1615611286576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff166112e4576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16611342576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825281206003808401546002808601549284015490840154939461138694929392906141d9565b95945050505050565b600554600090610100900460ff16156113e0576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1661143e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661149c576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a038084166000908152600a6020526040808220928516825290206003808301546002808501549284015490840154600754611386949291906141d9565b60025490565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600033600160a060020a03851614806115425750600160a060020a03841660009081526001602090815260408083203384529091529020548211155b611596576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42544f4b454e5f4241445f43414c4c45520000000000000000000000604482015290519081900360640190fd5b6115a184848461551c565b33600160a060020a038516148015906115df5750600160a060020a038416600090815260016020908152604080832033845290915290205460001914155b1561166157600160a060020a03841660009081526001602090815260408083203384529091529020546116129083615392565b600160a060020a0385811660009081526001602090815260408083203380855290835292819020859055805194855251928716939192600080516020615dcf8339815191529281900390910190a35b5060019392505050565b600160a060020a03166000908152600a602052604090205460ff1690565b600554600090610100900460ff16156116da576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600654600160a060020a031690565b60055460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156117a2576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16156117fa576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a0316331461184a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b64e8d4a510008110156118a7576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a0000811115611907576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007556005805461ff0019169055565b600c5460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156119cf576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a0390911614611a30576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff16611a8e576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615611ad7576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b670de0b6b3a7640000811015611b37576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b98576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f574549474854000000000000000000000000000000000000604482015290519081900360640190fd5b620f4240821015611bf3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4d494e5f42414c414e43450000000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206002015480821115611c9657611c2c600b54611c278484615392565b615638565b600b8190556802b5e3af16b18800001015611c91576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f4d41585f544f54414c5f574549474854000000000000000000000000604482015290519081900360640190fd5b611cb7565b80821015611cb757611cb3600b54611cae8385615392565b615392565b600b555b600160a060020a0384166000908152600a602052604090206002810183905560030180549084905580841115611d0057611cfb8533611cf68785615392565b615695565b611d5a565b80841015611d5a576000611d148286615392565b90506000611d238260006152a9565b9050611d398733611d348585615392565b615427565b600554611d57908890620100009004600160a060020a031683615427565b50505b50506005805461ff0019169055505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615611e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16611e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16611ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754611f0c94939291908990613c09565b915082821015611f54576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a60205260409020600390810154611f8491670de0b6b3a7640000610f5e565b821115611fdb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b611fe9816003015483615392565b60038201556000611ffa85826152a9565b604080518581529051919250600160a060020a0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36120483386615403565b6120556110fd8683615392565b60055461207190620100009004600160a060020a03168261541d565b611129863385615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561212b576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1615612183576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600654600160a060020a031633146121d3576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805491151560a060020a0274ff0000000000000000000000000000000000000000199092169190911790556005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156122bc576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a039091161461231d576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b60085460ff1615612366576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600211156123c1576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d494e5f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b6008805460ff191660011790556006805474ff0000000000000000000000000000000000000000191660a060020a17905561240468056bc75e2d63100000615707565b6124173368056bc75e2d6310000061541d565b6005805461ff0019169055565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff16156124d3576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661252a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006125346114e0565b905060006125428583615710565b905080612587576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b60005b6009548110156126f7576000600982815481106125a357fe5b6000918252602080832090910154600160a060020a0316808352600a9091526040822060030154909250906125d885836152a9565b90508061261d576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87878581811061262957fe5b90506020020135811115612675576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090206003015461269b9082615638565b600160a060020a0384166000818152600a6020908152604091829020600301939093558051848152905191923392600080516020615d6f8339815191529281900390910190a36126ec833383615695565b50505060010161258a565b5061270185615707565b611d5a338661541d565b600c5460009060ff1615612769576040805160e560020a62461bcd02815260206004820152601760248201527f4552525f414c52454144595f494e495449414c495a4544000000000000000000604482015290519081900360640190fd5b600160a060020a0386166127c7576040805160e560020a62461bcd02815260206004820152601e60248201527f4552525f494e56414c49445f434f4e54524f4c4c45525f414444524553530000604482015290519081900360640190fd5b600160a060020a038516612825576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f464143544f52595f414444524553530000000000604482015290519081900360640190fd5b64e8d4a51000841015612882576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d494e5f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b67016345785d8a00008411156128e2576040805160e560020a62461bcd02815260206004820152600b60248201527f4552525f4d41585f464545000000000000000000000000000000000000000000604482015290519081900360640190fd5b6128ef868686868661584c565b9695505050505050565b6000806129068786615710565b905060006129148786615638565b905060006129228289615710565b90506000612938670de0b6b3a764000085615710565b9050600061294683836158f8565b90506000612954828e6152a9565b90506000612962828f615392565b9050600061298161297b670de0b6b3a76400008a615392565b8b6152a9565b905061299e82612999670de0b6b3a764000084615392565b615710565b9f9e505050505050505050505050505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612a62576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612ab9576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612b17576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060030154612b49906002670de0b6b3a76400005b046152a9565b831115612ba0576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612bda94939291908990613b54565b915082821015612c22576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b612c30816003015485615638565b6003820155604080518581529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a3612c6c82615707565b612c76338361541d565b612c81853386615695565b506005805461ff00191690559392505050565b336000908152600160209081526040808320600160a060020a038616845290915281205480831115612ce957336000908152600160209081526040808320600160a060020a0388168452909152812055612d18565b612cf38184615392565b336000908152600160209081526040808320600160a060020a03891684529091529020555b336000818152600160209081526040808320600160a060020a038916808552908352928190205481519081529051929392600080516020615dcf833981519152929181900390910190a35060019392505050565b600033600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615612e1d576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff16612e74576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a602052604090205460ff16612ed2576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0384166000908152600a6020526040902060038101546002808301549054600b54600754612f0c949392919089906128f9565b915081612f51576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b82821115612f97576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a6020526040902060030154612fc7906002670de0b6b3a7640000612b43565b82111561301e576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b61302c816003015483615638565b6003820155604080518381529051600160a060020a038716913391600080516020615d6f8339815191529181900360200190a361306884615707565b613072338561541d565b612c81853384615695565b600160a060020a031660009081526020819052604090205490565b620f4240670de0b6b3a76400006114f6565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561314a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166131b7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613215576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613276576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a6020526040808220928816825290206003808201546132af91670de0b6b3a7640000610f5e565b861115613306576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f4d41585f4f55545f524154494f000000000000000000000000000000604482015290519081900360640190fd5b600061332783600301548460020154846003015485600201546007546141d9565b905085811115613381576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6133a183600301548460020154846003015485600201548b600754615216565b9450888511156133e9576040805160e560020a62461bcd02815260206004820152600c6024820152600080516020615d4f833981519152604482015290519081900360640190fd5b6133f7836003015486615638565b836003018190555061340d826003015488615392565b6003808401829055840154600280860154908501546007546134309491906141d9565b935080841015613478576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156134d0576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6134da8588615710565b81111561351f576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a46135878a3387615695565b613592883389615427565b5050506005805461ff001916905590969095509350505050565b6040805160208082523690820181905260009283923392600160e060020a03198535169285929081908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff161561364c576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0387166000908152600a602052604090205460ff166136b9576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0385166000908152600a602052604090205460ff16613717576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60065460a060020a900460ff16613778576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f535741505f4e4f545f5055424c494300000000000000000000000000604482015290519081900360640190fd5b600160a060020a038088166000908152600a60205260408082209288168252902060038201546137b2906002670de0b6b3a7640000612b43565b881115613809576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d41585f494e5f524154494f00000000000000000000000000000000604482015290519081900360640190fd5b600061382a83600301548460020154846003015485600201546007546141d9565b905085811115613884576040805160e560020a62461bcd02815260206004820152601360248201527f4552525f4241445f4c494d49545f505249434500000000000000000000000000604482015290519081900360640190fd5b6138a483600301548460020154846003015485600201548d6007546145a9565b9450868510156138ec576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b6138fa83600301548a615638565b8360030181905550613910826003015486615392565b6003808401829055840154600280860154908501546007546139339491906141d9565b93508084101561397b576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b858411156139d3576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f4c494d49545f50524943450000000000000000000000000000000000604482015290519081900360640190fd5b6139dd8986615710565b811115613a22576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b87600160a060020a03168a600160a060020a031633600160a060020a03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a4613a8a8a338b615695565b613592883387615427565b600080613aa28786615710565b90506000613ab8670de0b6b3a764000083615392565b90506000613ac682866152a9565b90506000613ae087612999670de0b6b3a764000085615392565b90506000613aee8c83615392565b90506000613afc828e615710565b90506000613b0a82886158f8565b90506000613b18828e6152a9565b90506000613b268e83615392565b9050613b3f81612999670de0b6b3a76400006000615392565b99505050505050505050509695505050505050565b600080613b618786615710565b90506000613b80613b7a670de0b6b3a764000084615392565b856152a9565b90506000613b9f86613b9a670de0b6b3a764000085615392565b6152a9565b90506000613bad8b83615638565b90506000613bbb828d615710565b90506000613bc982876158f8565b90506000613bd7828d6152a9565b9050613be3818d615392565b9e9d5050505050505050505050505050565b64e8d4a51000670de0b6b3a76400006114f6565b600080613c168786615710565b90506000613c3185613b9a670de0b6b3a76400006000615392565b90506000613c3f8883615392565b90506000613c4d828a615710565b90506000613c6c82613c67670de0b6b3a764000088615710565b6158f8565b90506000613c7a828e6152a9565b90506000613c888e83615392565b90506000613ca161297b670de0b6b3a76400008a615392565b905061299e82613b9a670de0b6b3a764000084615392565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613d68576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a0381166000908152600a602052604090205460ff16613dd5576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038316916370a08231916024808301926020929190829003018186803b158015613e3457600080fd5b505afa158015613e48573d6000803e3d6000fd5b505050506040513d6020811015613e5e57600080fd5b5051600160a060020a039091166000908152600a60205260409020600301556005805461ff0019169055565b60085460ff1690565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613f42576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff001916610100179055600160a060020a038116613faf576040805160e560020a62461bcd02815260206004820152601b60248201527f4552525f494e56414c49445f4d414e414745525f414444524553530000000000604482015290519081900360640190fd5b600654600160a060020a03163314613fff576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556005805461ff0019169055565b600554600090610100900460ff161561408a576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b50600b5490565b68056bc75e2d6310000081565b600554600090610100900460ff16156140ef576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff1661414d576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206002015490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156111c95780601f1061119e576101008083540402835291602001916111c9565b6704a03ce68d21555681565b6000806141e68787615710565b905060006141f48686615710565b905060006142028383615710565b90506000614224670de0b6b3a7640000612999670de0b6b3a764000089615392565b905061423082826152a9565b9a9950505050505050505050565b600061424b33848461551c565b50600192915050565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614303576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560085460ff1661435a576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60006143646114e0565b905060006143738560006152a9565b905060006143818683615392565b9050600061438f8285615710565b9050806143d4576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b6143de3388615403565b6005546143fa90620100009004600160a060020a03168461541d565b61440382615411565b60005b6009548110156145855760006009828154811061441f57fe5b6000918252602080832090910154600160a060020a0316808352600a90915260408220600301549092509061445485836152a9565b905080614499576040805160e560020a62461bcd02815260206004820152600f6024820152600080516020615e2f833981519152604482015290519081900360640190fd5b8989858181106144a557fe5b905060200201358110156144f1576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615e0f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a60205260409020600301546145179082615392565b600160a060020a0384166000818152600a60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a361457a833383615427565b505050600101614406565b50506005805461ff0019169055505050505050565b600881565b600281565b600181565b6000806145b68786615710565b905060006145cc670de0b6b3a764000085615392565b90506145d885826152a9565b905060006145ea8a6129998c85615638565b905060006145f882856158f8565b9050600061460e670de0b6b3a764000083615392565b905061461a8a826152a9565b9c9b505050505050505050505050565b600a670de0b6b3a76400006114f6565b671bc16d674ec7ffff81565b600554606090610100900460ff1615614697576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60085460ff166146df576040805160e560020a62461bcd0281526020600482015260116024820152600080516020615d0f833981519152604482015290519081900360640190fd5b60098054806020026020016040519081016040528092919081815260200182805480156111c957602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311614717575050505050905090565b600081565b600554606090610100900460ff16156146df576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b60095490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615614849576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b6005805461ff00191661010017905560065433600160a060020a03909116146148aa576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a602052604090205460ff16614908576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b60085460ff1615614951576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600160a060020a0381166000908152600a60205260408120600301549061497882826152a9565b600b54600160a060020a0385166000908152600a60205260409020600201549192506149a391615392565b600b55600160a060020a0383166000908152600a60205260409020600101546009805460001981019190829081106149d757fe5b60009182526020909120015460098054600160a060020a0390921691849081106149fd57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a0316021790555081600a600060098581548110614a3d57fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600101556009805480614a7057fe5b600082815260208082206000199084018101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556040805160808101825283815280830184815281830185815260608301868152600160a060020a038c168752600a909552929094209051815460ff19169015151781559251600184015551600283015551600390910155614b098533611d348787615392565b600554611d5a908690620100009004600160a060020a031685615427565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600160a060020a038716614be6576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f44415441544f4b454e5f41444452455353000000604482015290519081900360640190fd5b600160a060020a038416614c44576040805160e560020a62461bcd02815260206004820152601d60248201527f4552525f494e56414c49445f42415345544f4b454e5f41444452455353000000604482015290519081900360640190fd5b614c4f878787614dd4565b604080518781529051600160a060020a038916913391600080516020615d6f8339815191529181900360200190a3614c88848484614dd4565b604080518481529051600160a060020a038616913391600080516020615d6f8339815191529181900360200190a3614cbf816116f3565b614cc761220d565b50505050505050565b600554600090610100900460ff1615614d21576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b5060075490565b336000908152600160209081526040808320600160a060020a0386168452909152812054614d569083615638565b336000818152600160209081526040808320600160a060020a038916808552908352928190208590558051948552519193600080516020615dcf833981519152929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b33600160a060020a0316600035600160e060020a031916600160e060020a03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600654600160a060020a03163314614e85576040805160e560020a62461bcd0281526020600482015260126024820152600080516020615d8f833981519152604482015290519081900360640190fd5b600160a060020a0383166000908152600a602052604090205460ff1615614ef6576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f49535f424f554e440000000000000000000000000000000000000000604482015290519081900360640190fd5b60085460ff1615614f3f576040805160e560020a62461bcd0281526020600482015260106024820152600080516020615def833981519152604482015290519081900360640190fd5b600954600811614f99576040805160e560020a62461bcd02815260206004820152600e60248201527f4552525f4d41585f544f4b454e53000000000000000000000000000000000000604482015290519081900360640190fd5b604080516080810182526001808252600980546020808501918252600085870181815260608701828152600160a060020a038c16808452600a9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805473ffffffffffffffffffffffffffffffffffffffff19169091179055615053838383611920565b505050565b6002670de0b6b3a76400006114f6565b600554600090610100900460ff16156150b9576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff16615117576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a6020526040902060020154600b54615141908290615710565b9392505050565b600554600090610100900460ff1615615199576040805160e560020a62461bcd02815260206004820152600b6024820152600080516020615d2f833981519152604482015290519081900360640190fd5b600160a060020a0382166000908152600a602052604090205460ff166151f7576040805160e560020a62461bcd02815260206004820152600d6024820152600080516020615daf833981519152604482015290519081900360640190fd5b50600160a060020a03166000908152600a602052604090206003015490565b6000806152238588615710565b905060006152318786615392565b9050600061523f8883615710565b9050600061524d82856158f8565b905061526181670de0b6b3a7640000615392565b9050615275670de0b6b3a764000087615392565b945061528a6152848c836152a9565b86615710565b9b9a5050505050505050505050565b60065460a060020a900460ff1690565b60008282028315806152c35750828482816152c057fe5b04145b615317576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6706f05b59d3b2000081018181101561537a576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4d554c5f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b6000670de0b6b3a7640000825b049695505050505050565b60008060006153a18585615a1b565b9150915080156153fb576040805160e560020a62461bcd02815260206004820152601160248201527f4552525f5355425f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b509392505050565b61540d8282615a40565b5050565b61541a81615a4b565b50565b61540d8282615b27565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015260248201849052915160009286169163a9059cbb91604480830192602092919082900301818787803b15801561549357600080fd5b505af11580156154a7573d6000803e3d6000fd5b505050506040513d60208110156154bd57600080fd5b5051905080615516576040805160e560020a62461bcd02815260206004820152600f60248201527f4552525f45524332305f46414c53450000000000000000000000000000000000604482015290519081900360640190fd5b50505050565b600160a060020a03831660009081526020819052604090205481111561558c576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b600160a060020a0383166000908152602081905260409020546155af9082615392565b600160a060020a0380851660009081526020819052604080822093909355908416815220546155de9082615638565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015615141576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4144445f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b15801561549357600080fd5b61541a81615b32565b600081615767576040805160e560020a62461bcd02815260206004820152600c60248201527f4552525f4449565f5a45524f0000000000000000000000000000000000000000604482015290519081900360640190fd5b670de0b6b3a7640000830283158061578f5750670de0b6b3a764000084828161578c57fe5b04145b6157e3576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b60028304810181811015615841576040805160e560020a62461bcd02815260206004820152601060248201527f4552525f4449565f494e5445524e414c00000000000000000000000000000000604482015290519081900360640190fd5b600084828161538757fe5b6006805460058054600160a060020a03978816620100000275ffffffffffffffffffffffffffffffffffffffff00001990911617905560079490945591151560a060020a0274ff0000000000000000000000000000000000000000199590941673ffffffffffffffffffffffffffffffffffffffff199093169290921793909316919091179091556008805491151560ff19928316179055600c80549091166001179081905560ff1690565b60006001831015615953576040805160e560020a62461bcd02815260206004820152601560248201527f4552525f42504f575f424153455f544f4f5f4c4f570000000000000000000000604482015290519081900360640190fd5b671bc16d674ec7ffff8311156159b3576040805160e560020a62461bcd02815260206004820152601660248201527f4552525f42504f575f424153455f544f4f5f4849474800000000000000000000604482015290519081900360640190fd5b60006159be83615ba7565b905060006159cc8483615392565b905060006159e2866159dd85615bc2565b615bd0565b9050816159f3579250611222915050565b6000615a0487846305f5e100615c30565b9050615a1082826152a9565b979650505050505050565b600080828410615a315750508082036000615a39565b505081810360015b9250929050565b61540d82308361551c565b30600090815260208190526040902054811115615ab2576040805160e560020a62461bcd02815260206004820152601460248201527f4552525f494e53554646494349454e545f42414c000000000000000000000000604482015290519081900360640190fd5b30600090815260208190526040902054615acc9082615392565b30600090815260208190526040902055600254615ae99082615392565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b61540d30838361551c565b30600090815260208190526040902054615b4c9082615638565b30600090815260208190526040902055600254615b699082615638565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b6000670de0b6b3a7640000615bbb83615bc2565b0292915050565b670de0b6b3a7640000900490565b6000828160028406615bea57670de0b6b3a7640000615bec565b815b90506002840493505b8315615c2857615c0582836152a9565b91506002840615615c1d57615c1a81836152a9565b90505b600284049350615bf5565b949350505050565b6000828180615c4787670de0b6b3a7640000615a1b565b9092509050670de0b6b3a764000080600060015b888410615cff576000670de0b6b3a764000082029050600080615c8f8a615c8a85670de0b6b3a7640000615392565b615a1b565b91509150615ca187613b9a848c6152a9565b9650615cad8784615710565b965086615cbc57505050615cff565b8715615cc6579315935b8015615cd0579315935b8415615ce757615ce08688615392565b9550615cf4565b615cf18688615638565b95505b505050600101615c5b565b5090999850505050505050505056fe4552525f4e4f545f46494e414c495a45440000000000000000000000000000004552525f5245454e5452590000000000000000000000000000000000000000004552525f4c494d49545f494e000000000000000000000000000000000000000063982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a4552525f4e4f545f434f4e54524f4c4c455200000000000000000000000000004552525f4e4f545f424f554e44000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9254552525f49535f46494e414c495a4544000000000000000000000000000000004552525f4c494d49545f4f5554000000000000000000000000000000000000004552525f4d4154485f415050524f580000000000000000000000000000000000a165627a7a723058207bcbca44799ae1f6beadc2a7a0bab5e141b86fb59884e8cd794df13a11591fb70029",
"sourceMap": "2857:49:7:-;854:25060:6;2857:49:7;;854:25060:6;2857:49:7;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2912:33:7;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2951:30:7;;;-1:-1:-1;;2951:30:7;;;2979:2;2951:30;;;;2646:32:6;;;;;;;;2972:96;5:2:-1;;;;30:1;27;20:12;5:2;-1:-1;3003:58:6;3015:10;;881:12:2;3048:5:6;;3003:11;;;;:58;:::i;:::-;;854:25060;;3935:417;4141:11;:24;;4175:8;:18;;-1:-1:-1;;;;;4175:18:6;;;;;-1:-1:-1;;;;;;4175:18:6;;;;;;4203:8;:18;;;;4231:24;;;;;-1:-1:-1;;;;;;4141:24:6;;;;-1:-1:-1;;;;;;4141:24:6;;;;;;;4231;;;;;;;;;;;4265:10;:22;;;;;-1:-1:-1;;4265:22:6;;;;;;4299:11;:18;;;;;-1:-1:-1;4299:18:6;;;;;4231:24;4334:11;;3935:417::o;854:25060::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;854:25060:6;;;-1:-1:-1;854:25060:6;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "854:25060:6:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;854:25060:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23617:1305;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;23617:1305:6;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2988:81:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2988:81:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3574:180;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3574:180:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1111:50:2;;;:::i;13056:555:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;13056:555:6;;;;;;;;;;:::i;12495:::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;12495:555:6;;;;;;;;;;:::i;3482:86:7:-;;;:::i;1403:54:2:-;;;:::i;1004:45::-;;;:::i;4544:565:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4544:565:7;;;;;;;;;;;;;;;;;:::i;5814:118:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5814:118:6;-1:-1:-1;;;;;5814:118:6;;:::i;7386:131::-;;;:::i;:::-;;;;-1:-1:-1;;;;;7386:131:6;;;;;;;;;;;;;;3166:80:7;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7523:339:6;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7523:339:6;;:::i;:::-;;2831:88;;;:::i;9570:1603::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;9570:1603:6;;;;;;;;;;;;;:::i;22364:1247::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;22364:1247:6;;;;;;;;;;;;;:::i;8175:240::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8175:240:6;;;;:::i;8421:416::-;;;:::i;13617:925::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13617:925:6;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;13617:925:6;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;13617:925:6;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;13617:925:6;;-1:-1:-1;13617:925:6;-1:-1:-1;13617:925:6;:::i;3239:630::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;3239:630:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;8601:1167:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;8601:1167:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;20052:1128:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;20052:1128:6;;;;;;;;;;;;;:::i;4014:388:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4014:388:7;;;;;;;;:::i;21186:1172:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;21186:1172:6;;;;;;;;;;;;;:::i;3376:100:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3376:100:7;-1:-1:-1;;;;;3376:100:7;;:::i;840:53:2:-;;;:::i;17848:2197:6:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;17848:2197:6;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;15649:2193;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;15649:2193:6;;;;;;;;;;;;;;;;;;;;;;;;;:::i;13284:1324:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;13284:1324:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;6455:1140::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;6455:1140:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1167:54:2:-;;;:::i;10874:1304:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;10874:1304:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;12271:218:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12271:218:6;-1:-1:-1;;;;;12271:218:6;;:::i;5702:106::-;;;:::i;7868:300::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7868:300:6;-1:-1:-1;;;;;7868:300:6;;:::i;6624:142::-;;;:::i;1228:51:2:-;;;:::i;6400:218:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6400:218:6;-1:-1:-1;;;;;6400:218:6;;:::i;3075:85:7:-;;;:::i;1519:59:2:-;;;:::i;1626:494:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1626:494:4;;;;;;;;;;;;;;;;;;;;;;:::i;4408:130:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;4408:130:7;;;;;;;;:::i;14548:1094:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;14548:1094:6;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;14548:1094:6;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;14548:1094:6;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;14548:1094:6;;-1:-1:-1;14548:1094:6;-1:-1:-1;14548:1094:6;:::i;791:42:2:-;;;:::i;743:::-;;;:::i;1286:46::-;;;:::i;3126:664:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;3126:664:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;899:50:2:-;;;:::i;1338:59::-;;;:::i;6200:194:6:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6200:194:6;;;;;;;;;;;;;;;;;955:42:2;;;:::i;6056:138:6:-;;;:::i;5938:112::-;;;:::i;11179:1010::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;11179:1010:6;-1:-1:-1;;;;;11179:1010:6;;:::i;4358:1101::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;4358:1101:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;7258:122::-;;;:::i;3760:248:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3760:248:7;;;;;;;;:::i;3252:118::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;3252:118:7;;;;;;;;;;:::i;8844:720:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8844:720:6;;;;;;;;;;;;;:::i;1464:49:2:-;;;:::i;6772:266:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6772:266:6;-1:-1:-1;;;;;6772:266:6;;:::i;7044:208::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7044:208:6;-1:-1:-1;;;;;7044:208:6;;:::i;4796:653:4:-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;4796:653:4;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;5588:108:6:-;;;:::i;23617:1305::-;23807:17;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;23848:10;;1865:13;23848:10;23840:40;;;;;-1:-1:-1;;;;;23840:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23840:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23898:18:6;;;;;;:8;:18;;;;;:24;;;23890:50;;;;;-1:-1:-1;;;;;23890:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;23890:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23994:18:6;;;;;;:8;:18;;;;;:26;;;;;23989:47;;730:6:2;1561:8;;1573:5;1560:18;23989:4:6;:47::i;:::-;23971:14;:65;;23950:130;;;;;-1:-1:-1;;;;;23950:130:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24118:18:6;;24091:24;24118:18;;;:8;:18;;;;;24200:17;;;;24231:16;;;;;24261:12;;24287;;24341:8;;24162:197;;24200:17;24231:16;24261:12;24287;24313:14;;24162:24;:197::i;:::-;24147:212;-1:-1:-1;24378:17:6;24370:45;;;;;-1:-1:-1;;;;;24370:45:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24370:45:6;;;;;;;;;;;;;;;24449:15;24433:12;:31;;24425:56;;;;;-1:-1:-1;;;;;24425:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;24425:56:6;;;;;;;;;;;;;;;24512:39;24517:9;:17;;;24536:14;24512:4;:39::i;:::-;24492:17;;;:59;24562:12;24577:28;24582:12;24562;24577:4;:28::i;:::-;24621:46;;;;;;;;24562:43;;-1:-1:-1;;;;;;24621:46:6;;;24630:10;;24621:46;;;;;;;;;;24678:40;24693:10;24705:12;24678:14;:40::i;:::-;24728:43;24743:27;24748:12;24762:7;24743:4;:27::i;:::-;24728:14;:43::i;:::-;24796:8;;24781:33;;24796:8;;;-1:-1:-1;;;;;24796:8:6;24806:7;24781:14;:33::i;:::-;24824:53;24840:8;24850:10;24862:14;24824:15;:53::i;:::-;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;23617:1305;;-1:-1:-1;;;23617:1305:6:o;2988:81:7:-;3057:5;3050:12;;;;;;;;-1:-1:-1;;3050:12:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3025:13;;3050:12;;3057:5;;3050:12;;3057:5;3050:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2988:81;:::o;3574:180::-;3659:10;3632:4;3648:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3648:27:7;;;;;;;;;;;:33;;;3696:30;;;;;;;3632:4;;3648:27;;3659:10;;-1:-1:-1;;;;;;;;;;;3696:30:7;;;;;;;-1:-1:-1;3743:4:7;3574:180;;;;;:::o;1111:50:2:-;1152:9;1111:50;:::o;13056:555:6:-;1967:6;;13178:14;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13216:17:6;;;;;;:8;:17;;;;;:23;;;13208:49;;;;;-1:-1:-1;;;;;13208:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13208:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13275:18:6;;;;;;:8;:18;;;;;:24;;;13267:50;;;;;-1:-1:-1;;;;;13267:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13267:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;13353:17:6;;;13327:23;13353:17;;;:8;:17;;;;;;13407:18;;;;;;;13469:16;;;;;13500:15;;;;;13530:17;;;;13562:16;;;;13407:18;;13442:162;;13469:16;;13500:15;13562:16;13442:13;:162::i;:::-;13435:169;13056:555;-1:-1:-1;;;;;13056:555:6:o;12495:::-;1967:6;;12610:14;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12648:17:6;;;;;;:8;:17;;;;;:23;;;12640:49;;;;;-1:-1:-1;;;;;12640:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12640:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12707:18:6;;;;;;:8;:18;;;;;:24;;;12699:50;;;;;-1:-1:-1;;;;;12699:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12699:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;12785:17:6;;;12759:23;12785:17;;;:8;:17;;;;;;12839:18;;;;;;;12901:16;;;;;12932:15;;;;;12962:17;;;;12994:16;;;;13025:8;;12874:169;;12932:15;12962:17;12994:16;12874:13;:169::i;3482:86:7:-;3549:12;;3482:86;:::o;1403:54:2:-;1451:6;730;1444:13;;1403:54;:::o;1004:45::-;730:6;1004:45;:::o;4544:565:7:-;4662:4;4704:10;-1:-1:-1;;;;;4704:17:7;;;;:55;;-1:-1:-1;;;;;;4732:15:7;;;;;;:10;:15;;;;;;;;4748:10;4732:27;;;;;;;;4725:34;;;4704:55;4683:124;;;;;-1:-1:-1;;;;;4683:124:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;4817:20;4823:3;4828;4833;4817:5;:20::i;:::-;4851:10;-1:-1:-1;;;;;4851:17:7;;;;;;:63;;-1:-1:-1;;;;;;4872:15:7;;;;;;:10;:15;;;;;;;;4888:10;4872:27;;;;;;;;-1:-1:-1;;4872:42:7;;4851:63;4847:235;;;-1:-1:-1;;;;;4965:15:7;;;;;;:10;:15;;;;;;;;4981:10;4965:27;;;;;;;;4960:38;;4994:3;4960:4;:38::i;:::-;-1:-1:-1;;;;;4930:15:7;;;;;;;:10;:15;;;;;;;;4946:10;4930:27;;;;;;;;;;:68;;;5017:54;;;;;;;;;;4946:10;;-1:-1:-1;;;;;;;;;;;5017:54:7;;;;;;;;;4847:235;-1:-1:-1;5098:4:7;4544:565;;;;;:::o;5814:118:6:-;-1:-1:-1;;;;;5908:11:6;5881:4;5908:11;;;:8;:11;;;;;:17;;;;5814:118::o;7386:131::-;1967:6;;7469:7;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;7499:11:6;;-1:-1:-1;;;;;7499:11:6;7386:131;:::o;3166:80:7:-;3230:9;;;;3166:80;:::o;7523:339:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;7626:10;;1865:13;7626:10;7625:11;7617:40;;;;;-1:-1:-1;;;;;7617:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7617:40:6;;;;;;;;;;;;;;;7689:11;;-1:-1:-1;;;;;7689:11:6;7675:10;:25;7667:56;;;;;-1:-1:-1;;;;;7667:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7667:56:6;;;;;;;;;;;;;;;881:12:2;7741:18:6;;;7733:42;;;;;-1:-1:-1;;;;;7733:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:9:2;7793:18:6;;;7785:42;;;;;-1:-1:-1;;;;;7785:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;7837:8;:18;1899:6;:14;;-1:-1:-1;;1899:14:6;;;7523:339::o;2831:88::-;2901:11;;;;2831:88;:::o;9570:1603::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;9710:11;;9696:10;-1:-1:-1;;;;;9710:11:6;;;9696:25;9688:56;;;;;-1:-1:-1;;;;;9688:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9688:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;9762:15:6;;;;;;:8;:15;;;;;:21;;;9754:47;;;;;-1:-1:-1;;;;;9754:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9754:47:6;;;;;;;;;;;;;;;9820:10;;;;9819:11;9811:40;;;;;-1:-1:-1;;;;;9811:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9811:40:6;;;;;;;;;;;;;;;730:6:2;9870::6;:20;;9862:47;;;;;-1:-1:-1;;;;;9862:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;1096:9:2;9927:20:6;;;9919:47;;;;;-1:-1:-1;;;;;9919:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;1208:13:2;9984:22:6;;;9976:50;;;;;-1:-1:-1;;;;;9976:50:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10099:15:6;;10082:14;10099:15;;;:8;:15;;;;;:22;;;10135:18;;;10131:299;;;10184:43;10189:12;;10203:23;10208:6;10216:9;10203:4;:23::i;:::-;10184:4;:43::i;:::-;10169:12;:58;;;1152:9:2;-1:-1:-1;10249:32:6;10241:65;;;;;-1:-1:-1;;;;;10241:65:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;10131:299;;;10336:9;10327:6;:18;10323:107;;;10376:43;10381:12;;10395:23;10400:9;10411:6;10395:4;:23::i;:::-;10376:4;:43::i;:::-;10361:12;:58;10323:107;-1:-1:-1;;;;;10447:15:6;;;;;;:8;:15;;;;;:22;;;:31;;;10569:23;;;;10602:33;;;;10649:20;;;10645:522;;;10685:61;10701:5;10708:10;10720:25;10725:7;10734:10;10720:4;:25::i;:::-;10685:15;:61::i;:::-;10645:522;;;10777:10;10767:7;:20;10763:404;;;10880:26;10909:25;10914:10;10926:7;10909:4;:25::i;:::-;10880:54;;10948:17;10968:37;10973:21;996:1:2;10968:4:6;:37::i;:::-;10948:57;;11019:77;11035:5;11042:10;11054:41;11059:21;11082:12;11054:4;:41::i;:::-;11019:15;:77::i;:::-;11133:8;;11110:46;;11126:5;;11133:8;;;-1:-1:-1;;;;;11133:8:6;11143:12;11110:15;:46::i;:::-;10763:404;;;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;-1:-1:-1;;;9570:1603:6:o;22364:1247::-;22546:19;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;22589:10;;1865:13;22589:10;22581:40;;;;;-1:-1:-1;;;;;22581:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22581:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;22639:18:6;;;;;;:8;:18;;;;;:24;;;22631:50;;;;;-1:-1:-1;;;;;22631:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22631:50:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;22719:18:6;;22692:24;22719:18;;;:8;:18;;;;;22803:17;;;;22834:16;;;;;22864:12;;22890;;22942:8;;22765:195;;22803:17;22834:16;22864:12;22890;22916;;22765:24;:195::i;:::-;22748:212;;22997:12;22979:14;:30;;22971:56;;;;;-1:-1:-1;;;;;22971:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;22971:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;23090:18:6;;;;;;:8;:18;;;;;:26;;;;;23085:47;;730:6:2;1561:8;;23085:47:6;23067:14;:65;;23046:130;;;;;-1:-1:-1;;;;;23046:130:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;23207:39;23212:9;:17;;;23231:14;23207:4;:39::i;:::-;23187:17;;;:59;23257:12;23272:28;23277:12;23257;23272:4;:28::i;:::-;23316:46;;;;;;;;23257:43;;-1:-1:-1;;;;;;23316:46:6;;;23325:10;;23316:46;;;;;;;;;;23373:40;23388:10;23400:12;23373:14;:40::i;:::-;23423:43;23438:27;23443:12;23457:7;23438:4;:27::i;23423:43::-;23491:8;;23476:33;;23491:8;;;-1:-1:-1;;;;;23491:8:6;23501:7;23476:14;:33::i;:::-;23519:53;23535:8;23545:10;23557:14;23519:15;:53::i;8175:240::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;8280:10;;1865:13;8280:10;8279:11;8271:40;;;;;-1:-1:-1;;;;;8271:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8271:40:6;;;;;;;;;;;;;;;8343:11;;-1:-1:-1;;;;;8343:11:6;8329:10;:25;8321:56;;;;;-1:-1:-1;;;;;8321:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8321:56:6;;;;;;;;;;;;;;;8387:11;:21;;;;;-1:-1:-1;;;8387:21:6;-1:-1:-1;;8387:21:6;;;;;;;;;1899:6;:14;;-1:-1:-1;;1899:14:6;;;8175:240::o;8421:416::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;8522:11;;8508:10;-1:-1:-1;;;;;8522:11:6;;;8508:25;8500:56;;;;;-1:-1:-1;;;;;8500:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8500:56:6;;;;;;;;;;;;;;;8575:10;;;;8574:11;8566:40;;;;;-1:-1:-1;;;;;8566:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8566:40:6;;;;;;;;;;;;;;;8624:7;:14;784:1:2;-1:-1:-1;8624:34:6;8616:61;;;;;-1:-1:-1;;;;;8616:61:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;8688:10;:17;;-1:-1:-1;;8688:17:6;8701:4;8688:17;;;8715:11;:18;;-1:-1:-1;;8715:18:6;-1:-1:-1;;;8715:18:6;;;8744:32;1269:10:2;8744:14:6;:32::i;:::-;8786:44;8801:10;1269::2;8786:14:6;:44::i;:::-;1899:6;:14;;-1:-1:-1;;1899:14:6;;;8421:416::o;13617:925::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;13754:10;;1865:13;13754:10;13746:40;;;;;-1:-1:-1;;;;;13746:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13746:40:6;;;;;;;;;;;;;;;13797:14;13814:13;:11;:13::i;:::-;13797:30;;13837:10;13850:30;13855:13;13870:9;13850:4;:30::i;:::-;13837:43;-1:-1:-1;13898:10:6;13890:38;;;;;-1:-1:-1;;;;;13890:38:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;13890:38:6;;;;;;;;;;;;;;;13944:6;13939:507;13960:7;:14;13956:18;;13939:507;;;13995:9;14007:7;14015:1;14007:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14007:10:6;14042:11;;;:8;:11;;;;;;:19;;;14007:10;;-1:-1:-1;14042:19:6;14096:16;14101:5;14042:19;14096:4;:16::i;:::-;14075:37;-1:-1:-1;14134:18:6;14126:46;;;;;-1:-1:-1;;;;;14126:46:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14126:46:6;;;;;;;;;;;;;;;14211:12;;14224:1;14211:15;;;;;;;;;;;;;14194:13;:32;;14186:57;;;;;-1:-1:-1;;;;;14186:57:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14186:57:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;14284:11:6;;;;;;:8;:11;;;;;:19;;;14279:40;;14305:13;14279:4;:40::i;:::-;-1:-1:-1;;;;;14257:11:6;;;;;;:8;:11;;;;;;;;;:19;;:62;;;;14338:38;;;;;;;14257:11;;14347:10;;-1:-1:-1;;;;;;;;;;;14338:38:6;;;;;;;;;14390:45;14406:1;14409:10;14421:13;14390:15;:45::i;:::-;-1:-1:-1;;;13976:3:6;;13939:507;;;;14455:29;14470:13;14455:14;:29::i;:::-;14494:41;14509:10;14521:13;14494:14;:41::i;3239:630::-;2747:11;;3451:4;;2747:11;;2746:12;2725:83;;;;;-1:-1:-1;;;;;2725:83:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3492:24:6;;3471:101;;;;;-1:-1:-1;;;;;3471:101:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3603:21:6;;3582:95;;;;;-1:-1:-1;;;;;3582:95:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;881:12:2;3695:18:6;;;3687:42;;;;;-1:-1:-1;;;;;3687:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;940:9:2;3747:18:6;;;3739:42;;;;;-1:-1:-1;;;;;3739:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;3798:64;3810:10;3822:7;3831;3840:10;3852:9;3798:11;:64::i;:::-;3791:71;3239:630;-1:-1:-1;;;;;;3239:630:6:o;8601:1167:4:-;8836:18;8870:21;8894:32;8899:13;8914:11;8894:4;:32::i;:::-;8870:56;;8936:18;8957:31;8962:10;8974:13;8957:4;:31::i;:::-;8936:52;;8998:14;9015:31;9020:13;9035:10;9015:4;:31::i;:::-;8998:48;;9121:8;9132:28;730:6:2;9143:16:4;9132:4;:28::i;:::-;9121:39;;9171:17;9191:20;9196:9;9207:3;9191:4;:20::i;:::-;9171:40;;9221:22;9246:34;9251:12;9265:14;9246:4;:34::i;:::-;9221:59;;9290:26;9319:39;9324:17;9343:14;9319:4;:39::i;:::-;9290:68;;9607:8;9618:43;9623:28;730:6:2;9634:16:4;9623:4;:28::i;:::-;9653:7;9618:4;:43::i;:::-;9607:54;;9687:44;9692:21;9715:15;730:6:2;9726:3:4;9715:4;:15::i;:::-;9687:4;:44::i;:::-;9671:60;8601:1167;-1:-1:-1;;;;;;;;;;;;;;;8601:1167:4:o;20052:1128:6:-;20240:18;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;20291:10;;1865:13;20291:10;20283:40;;;;;-1:-1:-1;;;;;20283:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20283:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;20341:17:6;;;;;;:8;:17;;;;;:23;;;20333:49;;;;;-1:-1:-1;;;;;20333:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20333:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;20435:17:6;;;;;;:8;:17;;;;;:25;;;20430:45;;1512:1:2;730:6;1505:8;;20430:4:6;:45::i;:::-;20413:13;:62;;20392:126;;;;;-1:-1:-1;;;;;20392:126:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20555:17:6;;20529:23;20555:17;;;:8;:17;;;;;20637:16;;;;20667:15;;;;;20696:12;;20722;;20775:8;;20599:194;;20637:16;20667:15;20696:12;20722;20748:13;;20599:24;:194::i;:::-;20583:210;;20829:16;20812:13;:33;;20804:59;;;;;-1:-1:-1;;;;;20804:59:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;20804:59:6;;;;;;;;;;;;;;;20893:37;20898:8;:16;;;20916:13;20893:4;:37::i;:::-;20874:16;;;:56;20946:44;;;;;;;;-1:-1:-1;;;;;20946:44:6;;;20955:10;;-1:-1:-1;;;;;;;;;;;20946:44:6;;;;;;;;21001:29;21016:13;21001:14;:29::i;:::-;21040:41;21055:10;21067:13;21040:14;:41::i;:::-;21091:51;21107:7;21116:10;21128:13;21091:15;:51::i;:::-;-1:-1:-1;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;20052:1128;;-1:-1:-1;;;20052:1128:6:o;4014:388:7:-;4124:10;4081:4;4113:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4113:27:7;;;;;;;;;;4154:14;;;4150:156;;;4195:10;4214:1;4184:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4184:27:7;;;;;;;;;:31;4150:156;;;4276:19;4281:8;4291:3;4276:4;:19::i;:::-;4257:10;4246:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4246:27:7;;;;;;;;;:49;4150:156;4329:10;4346:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;4320:54:7;;4346:27;;;;;;;;;;;4320:54;;;;;;;;;4329:10;-1:-1:-1;;;;;;;;;;;4320:54:7;;;;;;;;;;-1:-1:-1;4391:4:7;;4014:388;-1:-1:-1;;;4014:388:7:o;21186:1172:6:-;21368:18;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;21410:10;;1865:13;21410:10;21402:40;;;;;-1:-1:-1;;;;;21402:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21402:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21460:17:6;;;;;;:8;:17;;;;;:23;;;21452:49;;;;;-1:-1:-1;;;;;21452:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21452:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21538:17:6;;21512:23;21538:17;;;:8;:17;;;;;21620:16;;;;21650:15;;;;;21679:12;;21705;;21758:8;;21582:194;;21620:16;21650:15;21679:12;21705;21731:13;;21582:24;:194::i;:::-;21566:210;-1:-1:-1;21795:18:6;21787:46;;;;;-1:-1:-1;;;;;21787:46:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21787:46:6;;;;;;;;;;;;;;;21868:11;21851:13;:28;;21843:53;;;;;-1:-1:-1;;;;;21843:53:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;21843:53:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;21958:17:6;;;;;;:8;:17;;;;;:25;;;21953:45;;1512:1:2;730:6;1505:8;;21953:45:6;21936:13;:62;;21915:126;;;;;-1:-1:-1;;;;;21915:126:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;22071:37;22076:8;:16;;;22094:13;22071:4;:37::i;:::-;22052:16;;;:56;22124:44;;;;;;;;-1:-1:-1;;;;;22124:44:6;;;22133:10;;-1:-1:-1;;;;;;;;;;;22124:44:6;;;;;;;;22179:29;22194:13;22179:14;:29::i;:::-;22218:41;22233:10;22245:13;22218:14;:41::i;:::-;22269:51;22285:7;22294:10;22306:13;22269:15;:51::i;3376:100:7:-;-1:-1:-1;;;;;3455:14:7;3432:4;3455:14;;;;;;;;;;;;3376:100::o;840:53:2:-;888:5;730:6;881:12;;17848:2197:6;1698:39;;;;;;;1728:8;1698:39;;;;;;18076:18;;;;1716:10;;-1:-1:-1;;;;;;1707:7:6;;;;18076:18;;1698:39;;;;;18076:18;1728:8;;18076:18;1698:39;1:33:-1;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;18139:17:6;;1865:13;18139:17;;;:8;:17;;;;;:23;1865:13;18139:23;18131:49;;;;;-1:-1:-1;;;;;18131:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18131:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;18198:18:6;;;;;;:8;:18;;;;;:24;;;18190:50;;;;;-1:-1:-1;;;;;18190:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;18190:50:6;;;;;;;;;;;;;;;18258:11;;-1:-1:-1;;;18258:11:6;;;;18250:43;;;;;-1:-1:-1;;;;;18250:43:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18330:26:6;;;18304:23;18330:26;;;:8;:26;;;;;;18393:27;;;;;;;18475:17;;;;;18470:38;;730:6:2;1561:8;;18470:38:6;18452:14;:56;;18431:121;;;;;-1:-1:-1;;;;;18431:121:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;18563:20;18586:165;18613:8;:16;;;18643:8;:15;;;18672:9;:17;;;18703:9;:16;;;18733:8;;18586:13;:165::i;:::-;18563:188;;18797:8;18778:15;:27;;18770:59;;;;;-1:-1:-1;;;;;18770:59:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;18856:194;18884:8;:16;;;18914:8;:15;;;18943:9;:17;;;18974:9;:16;;;19004:14;19032:8;;18856:14;:194::i;:::-;18840:210;;19085:11;19068:13;:28;;19060:53;;;;;-1:-1:-1;;;;;19060:53:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19060:53:6;;;;;;;;;;;;;;;19143:37;19148:8;:16;;;19166:13;19143:4;:37::i;:::-;19124:8;:16;;:56;;;;19210:39;19215:9;:17;;;19234:14;19210:4;:39::i;:::-;19190:17;;;;:59;;;19304:16;;;19334:15;;;;;19394:16;;;;19424:8;;19277:165;;19190:59;19394:16;19277:13;:165::i;:::-;19260:182;;19478:15;19460:14;:33;;19452:61;;;;;-1:-1:-1;;;;;19452:61:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19452:61:6;;;;;;;;;;;;;;;19549:8;19531:14;:26;;19523:54;;;;;-1:-1:-1;;;;;19523:54:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;19627:35;19632:13;19647:14;19627:4;:35::i;:::-;19608:15;:54;;19587:117;;;;;-1:-1:-1;;;;;19587:117:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;19587:117:6;;;;;;;;;;;;;;;19789:8;-1:-1:-1;;;;;19720:144:6;19767:7;-1:-1:-1;;;;;19720:144:6;19742:10;-1:-1:-1;;;;;19720:144:6;;19812:13;19840:14;19720:144;;;;;;;;;;;;;;;;;;;;;;;;19875:51;19891:7;19900:10;19912:13;19875:15;:51::i;:::-;19936:53;19952:8;19962:10;19974:14;19936:15;:53::i;:::-;-1:-1:-1;;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;17848:2197;;;;-1:-1:-1;17848:2197:6;-1:-1:-1;;;;17848:2197:6:o;15649:2193::-;1698:39;;;;;;;1728:8;1698:39;;;;;;15875:19;;;;1716:10;;-1:-1:-1;;;;;;1707:7:6;;;;15875:19;;1698:39;;;;;15875:19;1728:8;;15875:19;1698:39;1:33:-1;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;15940:17:6;;1865:13;15940:17;;;:8;:17;;;;;:23;1865:13;15940:23;15932:49;;;;;-1:-1:-1;;;;;15932:49:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15932:49:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15999:18:6;;;;;;:8;:18;;;;;:24;;;15991:50;;;;;-1:-1:-1;;;;;15991:50:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15991:50:6;;;;;;;;;;;;;;;16059:11;;-1:-1:-1;;;16059:11:6;;;;16051:43;;;;;-1:-1:-1;;;;;16051:43:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16131:26:6;;;16105:23;16131:26;;;:8;:26;;;;;;16194:27;;;;;;;16275:16;;;;16270:36;;1512:1:2;730:6;1505:8;;16270:36:6;16253:13;:53;;16232:117;;;;;-1:-1:-1;;;;;16232:117:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;16360:20;16383:165;16410:8;:16;;;16440:8;:15;;;16469:9;:17;;;16500:9;:16;;;16530:8;;16383:13;:165::i;:::-;16360:188;;16585:8;16566:15;:27;;16558:59;;;;;-1:-1:-1;;;;;16558:59:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;16645:193;16673:8;:16;;;16703:8;:15;;;16732:9;:17;;;16763:9;:16;;;16793:13;16820:8;;16645:14;:193::i;:::-;16628:210;;16874:12;16856:14;:30;;16848:56;;;;;-1:-1:-1;;;;;16848:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;16848:56:6;;;;;;;;;;;;;;;16934:37;16939:8;:16;;;16957:13;16934:4;:37::i;:::-;16915:8;:16;;:56;;;;17001:39;17006:9;:17;;;17025:14;17001:4;:39::i;:::-;16981:17;;;;:59;;;17095:16;;;17125:15;;;;;17185:16;;;;17215:8;;17068:165;;16981:59;17185:16;17068:13;:165::i;:::-;17051:182;;17269:15;17251:14;:33;;17243:61;;;;;-1:-1:-1;;;;;17243:61:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;17243:61:6;;;;;;;;;;;;;;;17345:8;17327:14;:26;;17319:54;;;;;-1:-1:-1;;;;;17319:54:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;17423:35;17428:13;17443:14;17423:4;:35::i;:::-;17404:15;:54;;17383:117;;;;;-1:-1:-1;;;;;17383:117:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;17383:117:6;;;;;;;;;;;;;;;17585:8;-1:-1:-1;;;;;17516:144:6;17563:7;-1:-1:-1;;;;;17516:144:6;17538:10;-1:-1:-1;;;;;17516:144:6;;17608:13;17636:14;17516:144;;;;;;;;;;;;;;;;;;;;;;;;17671:51;17687:7;17696:10;17708:13;17671:15;:51::i;:::-;17732:53;17748:8;17758:10;17770:14;17732:15;:53::i;13284:1324:4:-;13522:17;13609:21;13633:33;13638:14;13654:11;13633:4;:33::i;:::-;13609:57;;13747:8;13758:28;730:6:2;13769:16:4;13758:4;:28::i;:::-;13747:39;;13796:8;13807:18;13812:3;13817:7;13807:4;:18::i;:::-;13796:29;;13836:32;13871:72;13889:14;13918:15;730:6:2;13929:3:4;13918:4;:15::i;13871:72::-;13836:107;;13954:23;13980:85;13998:15;14028:27;13980:4;:85::i;:::-;13954:111;;14075:18;14096:41;14101:18;14121:15;14096:4;:41::i;:::-;14075:62;;14214:14;14231:37;14236:13;14251:16;14231:4;:37::i;:::-;14214:54;;14278:18;14299:27;14304:9;14315:10;14299:4;:27::i;:::-;14278:48;;14336:29;14368:31;14373:10;14385:13;14368:4;:31::i;:::-;14336:63;;14520:52;14525:24;14551:20;730:6:2;996:1;14551:4:4;:20::i;14520:52::-;14505:67;-1:-1:-1;;;;;;;;;;13284:1324:4;;;;;;;;:::o;6455:1140::-;6690:18;6968:21;6992:32;6997:13;7012:11;6992:4;:32::i;:::-;6968:56;;7034:8;7045:43;7050:28;730:6:2;7061:16:4;7050:4;:28::i;:::-;7080:7;7045:4;:43::i;:::-;7034:54;;7099:26;7128:36;7133:13;7148:15;730:6:2;7159:3:4;7148:4;:15::i;:::-;7128:4;:36::i;:::-;7099:65;;7175:22;7200:43;7205:14;7221:21;7200:4;:43::i;:::-;7175:68;;7253:17;7273:39;7278:17;7297:14;7273:4;:39::i;:::-;7253:59;;7390:14;7407:36;7412:12;7426:16;7407:4;:36::i;:::-;7390:53;;7453:18;7474:27;7479:9;7490:10;7474:4;:27::i;:::-;7453:48;;7527:31;7532:13;7547:10;7527:4;:31::i;:::-;7511:47;6455:1140;-1:-1:-1;;;;;;;;;;;;;;6455:1140:4:o;1167:54:2:-;1215:6;730;1208:13;;10874:1304:4;11110:19;11145:21;11169:33;11174:14;11190:11;11169:4;:33::i;:::-;11145:57;;11307:29;11339:75;11357:12;11384:20;730:6:2;996:1;11384:4:4;:20::i;11339:75::-;11307:107;;11424:18;11445:42;11450:10;11462:24;11445:4;:42::i;:::-;11424:63;;11497:14;11514:31;11519:13;11534:10;11514:4;:31::i;:::-;11497:48;;11615:18;11636:45;11641:9;11652:28;730:6:2;11663:16:4;11652:4;:28::i;:::-;11636:4;:45::i;:::-;11615:66;;11691:23;11717:36;11722:13;11737:15;11717:4;:36::i;:::-;11691:62;;11764:32;11799:76;11817:15;11847:18;11799:4;:76::i;:::-;11764:111;;12008:8;12019:43;12024:28;730:6:2;12035:16:4;12024:4;:28::i;12019:43::-;12008:54;;12090:50;12095:27;12124:15;730:6:2;12135:3:4;12124:4;:15::i;12271:218:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;12369:15:6;;1865:13;12369:15;;;:8;:15;;;;;:21;1865:13;12369:21;12361:47;;;;;-1:-1:-1;;;;;12361:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;12361:47:6;;;;;;;;;;;;;;;12444:38;;;;;;12476:4;12444:38;;;;;;-1:-1:-1;;;;;12444:23:6;;;;;:38;;;;;;;;;;;;;;:23;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;12444:38:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12444:38:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;12444:38:6;-1:-1:-1;;;;;12418:15:6;;;;;;;:8;12444:38;12418:15;;;;:23;;:64;1899:6;:14;;-1:-1:-1;;1899:14:6;;;12271:218::o;5702:106::-;5791:10;;;;5702:106;:::o;7868:300::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;-1:-1:-1;;;;;7990:21:6;;7969:95;;;;;-1:-1:-1;;;;;7969:95:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;8096:11;;-1:-1:-1;;;;;8096:11:6;8082:10;:25;8074:56;;;;;-1:-1:-1;;;;;8074:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;8074:56:6;;;;;;;;;;;;;;;8140:11;:21;;-1:-1:-1;;8140:21:6;-1:-1:-1;;;;;8140:21:6;;;;;;;;;;1899:6;:14;;-1:-1:-1;;1899:14:6;;;7868:300::o;6624:142::-;1967:6;;6720:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;6747:12:6;;6624:142;:::o;1228:51:2:-;1269:10;1228:51;:::o;6400:218:6:-;1967:6;;6504:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6533:15:6;;;;;;:8;:15;;;;;:21;;;6525:47;;;;;-1:-1:-1;;;;;6525:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6525:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6589:15:6;;;;;:8;:15;;;;;:22;;;;6400:218::o;3075:85:7:-;3146:7;3139:14;;;;;;;;-1:-1:-1;;3139:14:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3114:13;;3139:14;;3146:7;;3139:14;;3146:7;3139:14;;;;;;;;;;;;;;;;;;;;;;;;1519:59:2;1560:18;1519:59;:::o;1626:494:4:-;1830:14;1860:10;1873:35;1878:14;1894:13;1873:4;:35::i;:::-;1860:48;;1918:10;1931:37;1936:15;1953:14;1931:4;:37::i;:::-;1918:50;;1978:10;1991:18;1996:5;2003;1991:4;:18::i;:::-;1978:31;;2019:10;2032:31;730:6:2;2043:19:4;730:6:2;2054:7:4;2043:4;:19::i;2032:31::-;2019:44;;2094:18;2099:5;2106;2094:4;:18::i;:::-;2082:30;1626:494;-1:-1:-1;;;;;;;;;;1626:494:4:o;4408:130:7:-;4467:4;4483:27;4489:10;4501:3;4506;4483:5;:27::i;:::-;-1:-1:-1;4527:4:7;4408:130;;;;:::o;14548:1094:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;14685:10;;1865:13;14685:10;14677:40;;;;;-1:-1:-1;;;;;14677:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14677:40:6;;;;;;;;;;;;;;;14728:14;14745:13;:11;:13::i;:::-;14728:30;;14768:12;14783:28;14788:12;996:1:2;14783:4:6;:28::i;:::-;14768:43;;14821:20;14844:27;14849:12;14863:7;14844:4;:27::i;:::-;14821:50;;14881:10;14894:32;14899:15;14916:9;14894:4;:32::i;:::-;14881:45;-1:-1:-1;14944:10:6;14936:38;;;;;-1:-1:-1;;;;;14936:38:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;14936:38:6;;;;;;;;;;;;;;;14985:40;15000:10;15012:12;14985:14;:40::i;:::-;15050:8;;15035:33;;15050:8;;;-1:-1:-1;;;;;15050:8:6;15060:7;15035:14;:33::i;:::-;15078:31;15093:15;15078:14;:31::i;:::-;15125:6;15120:515;15141:7;:14;15137:18;;15120:515;;;15176:9;15188:7;15196:1;15188:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;15188:10:6;15223:11;;;:8;:11;;;;;;:19;;;15188:10;;-1:-1:-1;15223:19:6;15278:16;15283:5;15223:19;15278:4;:16::i;:::-;15256:38;-1:-1:-1;15316:19:6;15308:47;;;;;-1:-1:-1;;;;;15308:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15308:47:6;;;;;;;;;;;;;;;15395:13;;15409:1;15395:16;;;;;;;;;;;;;15377:14;:34;;15369:60;;;;;-1:-1:-1;;;;;15369:60:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;15369:60:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;15470:11:6;;;;;;:8;:11;;;;;:19;;;15465:41;;15491:14;15465:4;:41::i;:::-;-1:-1:-1;;;;;15443:11:6;;;;;;:8;:11;;;;;;;;;:19;;:63;;;;15525:39;;;;;;;15443:11;;15534:10;;15525:39;;;;;;;;;;15578:46;15594:1;15597:10;15609:14;15578:15;:46::i;:::-;-1:-1:-1;;;15157:3:6;;15120:515;;;-1:-1:-1;;1899:6:6;:14;;-1:-1:-1;;1899:14:6;;;-1:-1:-1;;;;;;14548:1094:6:o;791:42:2:-;832:1;791:42;:::o;743:::-;784:1;743:42;:::o;1286:46::-;1327:5;1286:46;:::o;3126:664:4:-;3359:19;3394:16;3413:35;3418:13;3433:14;3413:4;:35::i;:::-;3394:54;;3458:15;3476:19;730:6:2;3487:7:4;3476:4;:19::i;:::-;3458:37;;3518:31;3523:13;3538:10;3518:4;:31::i;:::-;3505:44;;3559:6;3568:54;3573:14;3589:32;3594:14;3610:10;3589:4;:32::i;3568:54::-;3559:63;;3632:8;3643:20;3648:1;3651:11;3643:4;:20::i;:::-;3632:31;;3673:8;3684:15;730:6:2;3695:3:4;3684:4;:15::i;:::-;3673:26;;3726;3731:15;3748:3;3726:4;:26::i;:::-;3709:43;3126:664;-1:-1:-1;;;;;;;;;;;;3126:664:4:o;899:50:2:-;947:2;730:6;940:9;;1338:59;1379:18;1338:59;:::o;6200:194:6:-;1967:6;;6284:23;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;6331:10;;;;6323:40;;;;;-1:-1:-1;;;;;6323:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6323:40:6;;;;;;;;;;;;;;;6380:7;6373:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6373:14:6;;;;;;;;;;;;;;;;;;;;;;6200:194;:::o;955:42:2:-;996:1;955:42;:::o;6056:138:6:-;1967:6;;6134:23;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;5938:112;6029:7;:14;5938:112;:::o;11179:1010::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;1811:6;;;;;;;1810:7;1789:66;;;;;-1:-1:-1;;;;;1789:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1789:66:6;;;;;;;;;;;;;;;1865:6;:13;;-1:-1:-1;;1865:13:6;;;;;11294:11;;11280:10;-1:-1:-1;;;;;11294:11:6;;;11280:25;11272:56;;;;;-1:-1:-1;;;;;11272:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11272:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;11346:15:6;;;;;;:8;:15;;;;;:21;;;11338:47;;;;;-1:-1:-1;;;;;11338:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11338:47:6;;;;;;;;;;;;;;;11404:10;;;;11403:11;11395:40;;;;;-1:-1:-1;;;;;11395:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;11395:40:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;11466:15:6;;11446:17;11466:15;;;:8;:15;;;;;:23;;;;11519:28;11466:23;11446:17;11519:4;:28::i;:::-;11578:12;;-1:-1:-1;;;;;11592:15:6;;;;;;:8;:15;;;;;:22;;;11499:48;;-1:-1:-1;11573:42:6;;:4;:42::i;:::-;11558:12;:57;-1:-1:-1;;;;;11734:15:6;;11721:10;11734:15;;;:8;:15;;;;;:21;;;11777:7;:14;;-1:-1:-1;;11777:18:6;;;:7;:18;;11822:13;;;;;;;;;;;;;;;;11805:7;:14;;-1:-1:-1;;;;;11822:13:6;;;;11813:5;;11805:14;;;;;;;;;;;;;;:30;;;;;-1:-1:-1;;;;;11805:30:6;;;;;-1:-1:-1;;;;;11805:30:6;;;;;;11878:5;11845:8;:24;11854:7;11862:5;11854:14;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11854:14:6;11845:24;;;;;;;;;;;;11854:14;11845:30;:38;11893:7;:13;;;;;;;;;;;;;;;-1:-1:-1;;11893:13:6;;;;;;;-1:-1:-1;;11893:13:6;;;;;;;;;11934:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11916:15:6;;;;:8;:15;;;;;;;:131;;;;-1:-1:-1;;11916:131:6;;;;;;;;;-1:-1:-1;11916:131:6;;;;;;;;;;;;;;12058:68;11916:15;12081:10;12093:32;12098:12;12112;12093:4;:32::i;12058:68::-;12159:8;;12136:46;;12152:5;;12159:8;;;-1:-1:-1;;;;;12159:8:6;12169:12;12136:15;:46::i;4358:1101::-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;-1:-1:-1;;;;;4674:31:6;;4653:107;;;;;-1:-1:-1;;;;;4653:107:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4791:30:6;;4770:106;;;;;-1:-1:-1;;;;;4770:106:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;5000:103;5018:17;5049:15;5078;5000:4;:103::i;:::-;5118:56;;;;;;;;-1:-1:-1;;;;;5118:56:6;;;5127:10;;-1:-1:-1;;;;;;;;;;;5118:56:6;;;;;;;;5211:102;5229:16;5259:15;5288;5211:4;:102::i;:::-;5328:55;;;;;;;;-1:-1:-1;;;;;5328:55:6;;;5337:10;;-1:-1:-1;;;;;;;;;;;5328:55:6;;;;;;;;5393:19;5404:7;5393:10;:19::i;:::-;5442:10;:8;:10::i;:::-;4358:1101;;;;;;;:::o;7258:122::-;1967:6;;7338:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;7365:8:6;;7258:122;:::o;3760:248:7:-;3889:10;3827:4;3878:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3878:27:7;;;;;;;;;;3873:38;;3907:3;3873:4;:38::i;:::-;3854:10;3843:22;;;;:10;:22;;;;;;;;-1:-1:-1;;;;;3843:27:7;;;;;;;;;;;;:68;;;3926:54;;;;;;3843:27;;-1:-1:-1;;;;;;;;;;;3926:54:7;;;;;;;;;;-1:-1:-1;3997:4:7;3760:248;;;;:::o;3252:118::-;-1:-1:-1;;;;;3343:15:7;;;3320:4;3343:15;;;:10;:15;;;;;;;;:20;;;;;;;;;;;;;3252:118::o;8844:720:6:-;1716:10;-1:-1:-1;;;;;1698:39:6;1707:7;;-1:-1:-1;;;;;;1707:7:6;-1:-1:-1;;;;;1698:39:6;;1728:8;;1698:39;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;1698:39:6;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;1698:39:6;;;;-1:-1:-1;1698:39:6;;-1:-1:-1;;;;1698:39:6;9045:11;;-1:-1:-1;;;;;9045:11:6;9031:10;:25;9023:56;;;;;-1:-1:-1;;;;;9023:56:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9023:56:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;9098:15:6;;;;;;:8;:15;;;;;:21;;;9097:22;9089:47;;;;;-1:-1:-1;;;;;9089:47:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;9155:10;;;;9154:11;9146:40;;;;;-1:-1:-1;;;;;9146:40:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9146:40:6;;;;;;;;;;;;;;;9205:7;:14;832:1:2;-1:-1:-1;9197:60:6;;;;;-1:-1:-1;;;;;9197:60:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;9286:202;;;;;;;;9314:4;9286:202;;;9339:7;:14;;9286:202;;;;;;;-1:-1:-1;9286:202:6;;;;;;;;;;;;-1:-1:-1;;;;;9268:15:6;;;;;:8;:15;;;;;;:220;;;;-1:-1:-1;;9268:220:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;23:18;;;45:23;;9498:19:6;;;;;;;-1:-1:-1;;9498:19:6;;;;;;9527:30;9268:15;9541:7;9550:6;9527;:30::i;:::-;8844:720;;;:::o;1464:49:2:-;1512:1;730:6;1505:8;;6772:266:6;1967:6;;6874:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6903:15:6;;;;;;:8;:15;;;;;:21;;;6895:47;;;;;-1:-1:-1;;;;;6895:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;6895:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;6966:15:6;;6952:11;6966:15;;;:8;:15;;;;;:22;;;7018:12;;7005:26;;6966:22;;7005:4;:26::i;:::-;6998:33;6772:266;-1:-1:-1;;;6772:266:6:o;7044:208::-;1967:6;;7137:4;;1967:6;;;;;1966:7;1958:31;;;;;-1:-1:-1;;;;;1958:31:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1958:31:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;7166:15:6;;;;;;:8;:15;;;;;:21;;;7158:47;;;;;-1:-1:-1;;;;;7158:47:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7158:47:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;;7222:15:6;;;;;:8;:15;;;;;:23;;;;7044:208::o;4796:653:4:-;5030:18;5064:16;5083:35;5088:14;5104:13;5083:4;:35::i;:::-;5064:54;;5128:9;5140:37;5145:15;5162:14;5140:4;:37::i;:::-;5128:49;;5187:6;5196:27;5201:15;5218:4;5196;:27::i;:::-;5187:36;;5233:8;5244:20;5249:1;5252:11;5244:4;:20::i;:::-;5233:31;;5280:15;5285:3;730:6:2;5280:4:4;:15::i;:::-;5274:21;;5321:19;730:6:2;5332:7:4;5321:4;:19::i;:::-;5305:35;;5366:46;5371:25;5376:14;5392:3;5371:4;:25::i;:::-;5398:13;5366:4;:46::i;:::-;5350:62;4796:653;-1:-1:-1;;;;;;;;;;;4796:653:4:o;5588:108:6:-;5678:11;;-1:-1:-1;;;5678:11:6;;;;;5588:108::o;1549:301:5:-;1618:4;1648:5;;;1671:6;;;:21;;;1691:1;1686;1681:2;:6;;;;;;:11;1671:21;1663:50;;;;;-1:-1:-1;;;;;1663:50:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1739:8;1733:15;;1766:8;;;;1758:37;;;;;-1:-1:-1;;;;;1758:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1805:7;730:6:2;1815:2:5;:9;;;1549:301;-1:-1:-1;;;;;;1549:301:5:o;1128:195::-;1197:4;1218:6;1226:9;1239:14;1248:1;1251;1239:8;:14::i;:::-;1217:36;;;;1272:4;1271:5;1263:35;;;;;-1:-1:-1;;;;;1263:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1315:1:5;1128:195;-1:-1:-1;;;1128:195:5:o;25505:108:6:-;25587:19;25593:4;25599:6;25587:5;:19::i;:::-;25505:108;;:::o;25823:88::-;25891:13;25897:6;25891:5;:13::i;:::-;25823:88;:::o;25619:104::-;25699:17;25705:2;25709:6;25699:5;:17::i;25308:191::-;25416:34;;;;;;-1:-1:-1;;;;;25416:34:6;;;;;;;;;;;;;;;25404:9;;25416:22;;;;;:34;;;;;;;;;;;;;;25404:9;25416:22;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;25416:34:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;25416:34:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25416:34:6;;-1:-1:-1;25416:34:6;25460:32;;;;;-1:-1:-1;;;;;25460:32:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;25308:191;;;;:::o;2340:268:7:-;-1:-1:-1;;;;;2418:13:7;;:8;:13;;;;;;;;;;;:20;-1:-1:-1;2418:20:7;2410:53;;;;;-1:-1:-1;;;;;2410:53:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2494:13:7;;:8;:13;;;;;;;;;;;2489:24;;2509:3;2489:4;:24::i;:::-;-1:-1:-1;;;;;2473:13:7;;;:8;:13;;;;;;;;;;;:40;;;;2544:13;;;;;;;2539:24;;2559:3;2539:4;:24::i;:::-;-1:-1:-1;;;;;2523:13:7;;;:8;:13;;;;;;;;;;;;:40;;;;2578:23;;;;;;;2523:13;;2578:23;;;;;;;;;;;;;2340:268;;;:::o;949:173:5:-;1018:4;1047:5;;;1070:6;;;;1062:35;;;;;-1:-1:-1;;;;;1062:35:5;;;;;;;;;;;;;;;;;;;;;;;;;;;25088:214:6;25198:55;;;;;;-1:-1:-1;;;;;25198:55:6;;;;;;;25239:4;25198:55;;;;;;;;;;;;25186:9;;25198:26;;;;;:55;;;;;;;;;;;;;;25186:9;25198:26;:55;;;5:2:-1;;;;30:1;27;20:12;25729:88:6;25797:13;25803:6;25797:5;:13::i;1856:376:5:-;1925:4;1953:6;1945:31;;;;;-1:-1:-1;;;;;1945:31:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;730:6:2;1996:8:5;;2022:6;;;:24;;;730:6:2;2037:1:5;2032:2;:6;;;;;;:14;2022:24;2014:53;;;;;-1:-1:-1;;;;;2014:53:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2114:1;2110:5;;2104:12;;2134:8;;;;2126:37;;;;;-1:-1:-1;;;;;2126:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2190:7;2205:1;2200:2;:6;;;;3935:417:6;4141:11;:24;;4175:8;:18;;-1:-1:-1;;;;;4175:18:6;;;;;-1:-1:-1;;4175:18:6;;;;;;4203:8;:18;;;;4231:24;;;-1:-1:-1;;;4231:24:6;-1:-1:-1;;4141:24:6;;;;-1:-1:-1;;4141:24:6;;;;;;;4231;;;;;;;;;;;4265:10;:22;;;;;-1:-1:-1;;4265:22:6;;;;;;4299:11;:18;;;;;-1:-1:-1;4299:18:6;;;;;4231:24;4334:11;;3935:417::o;2733:537:5:-;2807:4;1327:5:2;2835:4:5;:21;;2827:55;;;;;-1:-1:-1;;;;;2827:55:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;1379:18:2;2900:21:5;;;2892:56;;;;;-1:-1:-1;;;;;2892:56:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;2959:10;2973:11;2980:3;2973:6;:11::i;:::-;2959:25;;2997:11;3011:16;3016:3;3021:5;3011:4;:16::i;:::-;2997:30;;3038:13;3054:24;3060:4;3066:11;3071:5;3066:4;:11::i;:::-;3054:5;:24::i;:::-;3038:40;-1:-1:-1;3093:11:5;3089:57;;3127:8;-1:-1:-1;3120:15:5;;-1:-1:-1;;3120:15:5;3089:57;3156:18;3177:40;3188:4;3194:6;1444:13:2;3177:10:5;:40::i;:::-;3156:61;;3234:29;3239:8;3249:13;3234:4;:29::i;:::-;3227:36;2733:537;-1:-1:-1;;;;;;;2733:537:5:o;1329:214::-;1402:4;1408;1437:1;1432;:6;1428:109;;-1:-1:-1;;1462:5:5;;;1469;1454:21;;1428:109;-1:-1:-1;;1514:5:5;;;1521:4;1428:109;1329:214;;;;;:::o;2712:96:7:-;2770:31;2776:4;2790;2797:3;2770:5;:31::i;2012:322::-;2094:4;2077:8;:23;;;;;;;;;;;:30;-1:-1:-1;2077:30:7;2056:98;;;;;-1:-1:-1;;;;;2056:98:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;2212:4;2195:8;:23;;;;;;;;;;;2190:34;;2220:3;2190:4;:34::i;:::-;2181:4;2164:8;:23;;;;;;;;;;:60;2254:12;;2249:23;;2268:3;2249:4;:23::i;:::-;2234:12;:38;2287:40;;;;;;;;2319:1;;2304:4;;2287:40;;;;;;;;;2012:322;:::o;2614:92::-;2670:29;2684:4;2691:2;2695:3;2670:5;:29::i;1792:214::-;1884:4;1867:8;:23;;;;;;;;;;;1862:34;;1892:3;1862:4;:34::i;:::-;1853:4;1836:8;:23;;;;;;;;;;:60;1926:12;;1921:23;;1940:3;1921:4;:23::i;:::-;1906:12;:38;1959:40;;;;;;;;1988:4;;1976:1;;1959:40;;;;;;;;;1792:214;:::o;832:111:5:-;895:4;730:6:2;922:7:5;927:1;922:4;:7::i;:::-;:14;;832:111;-1:-1:-1;;832:111:5:o;722:104::-;730:6:2;811:8:5;;;722:104::o;2257:320::-;2327:4;2356:1;2327:4;2380:1;2376;:5;:21;;730:6:2;2376:21:5;;;2389:1;2376:21;2367:30;-1:-1:-1;2418:1:5;2413:6;;;;2408:145;2421:6;;2408:145;;2455:10;2460:1;2463;2455:4;:10::i;:::-;2451:14;-1:-1:-1;2488:1:5;2484;:5;:10;2480:63;;2518:10;2523:1;2526;2518:4;:10::i;:::-;2514:14;;2480:63;2434:1;2429:6;;;;2408:145;;;2569:1;2257:320;-1:-1:-1;;;;2257:320:5:o;3276:1047::-;3372:4;3424:3;3372:4;;3460:20;3469:4;730:6:2;3460:8:5;:20::i;:::-;3437:43;;-1:-1:-1;3437:43:5;-1:-1:-1;730:6:2;;3490:9:5;3815:1;3801:495;3826:9;3818:4;:17;3801:495;;3856:9;730:6:2;3868:1:5;:8;3856:20;;3891:6;3899:9;3912:29;3921:1;3924:16;3929:4;730:6:2;3924:4:5;:16::i;:::-;3912:8;:29::i;:::-;3890:51;;;;3962:22;3967:4;3973:10;3978:1;3981;3973:4;:10::i;3962:22::-;3955:29;;4005:16;4010:4;4016;4005;:16::i;:::-;3998:23;-1:-1:-1;4039:9:5;4035:20;;4050:5;;;;;4035:20;4074:4;4070:30;;;4091:9;;;4070:30;4118:4;4114:30;;;4135:9;;;4114:30;4162:8;4158:128;;;4196:15;4201:3;4206:4;4196;:15::i;:::-;4190:21;;4158:128;;;4256:15;4261:3;4266:4;4256;:15::i;:::-;4250:21;;4158:128;-1:-1:-1;;;3837:3:5;;3801:495;;;-1:-1:-1;4313:3:5;;3276:1047;-1:-1:-1;;;;;;;;;3276:1047:5:o",
"source": "pragma solidity ^0.5.7;\n// Copyright BigchainDB GmbH and Ocean Protocol contributors\n// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)\n// Code is Apache-2.0 and docs are CC-BY-4.0\n\nimport './BToken.sol';\nimport './BMath.sol';\n\n/**\n* @title BPool\n* \n* @dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n* deploy new BPools.\n*\n* This contract is is nearly identical to the BPool.sol contract at [1]\n* The only difference is the \"Proxy contract functionality\" section \n* given below. We'd inherit from BPool if we could, for simplicity.\n* But we can't, because the proxy section needs to access private\n* variables declared in BPool, and Solidity disallows this. Therefore\n* the best we can do for now is clearly demarcate the proxy section. \n*\n* [1] https://github.com/balancer-labs/balancer-core/contracts/.\n*/\ncontract BPool is BToken, BMath {\n\n struct Record {\n bool bound; // is token bound to pool\n uint index; // private\n uint denorm; // denormalized weight\n uint balance;\n }\n\n event LOG_SWAP(\n address indexed caller,\n address indexed tokenIn,\n address indexed tokenOut,\n uint256 tokenAmountIn,\n uint256 tokenAmountOut\n );\n\n event LOG_JOIN(\n address indexed caller,\n address indexed tokenIn,\n uint256 tokenAmountIn\n );\n\n event LOG_EXIT(\n address indexed caller,\n address indexed tokenOut,\n uint256 tokenAmountOut\n );\n\n event LOG_CALL(\n bytes4 indexed sig,\n address indexed caller,\n bytes data\n ) anonymous;\n\n modifier _logs_() {\n emit LOG_CALL(msg.sig, msg.sender, msg.data);\n _;\n }\n\n modifier _lock_() {\n require(\n !_mutex, \n 'ERR_REENTRY'\n );\n _mutex = true;\n _;\n _mutex = false;\n }\n\n modifier _viewlock_() {\n require(!_mutex, 'ERR_REENTRY');\n _;\n }\n \n bool private _mutex;\n\n address private _factory; // BFactory address to push token exitFee to\n address private _controller; // has CONTROL role\n bool private _publicSwap; // true if PUBLIC can call SWAP functions\n\n // `setSwapFee` and `finalize` require CONTROL\n // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN`\n uint private _swapFee;\n bool private _finalized;\n\n address[] private _tokens;\n mapping(address=>Record) private _records;\n uint private _totalWeight;\n\n //-----------------------------------------------------------------------\n //Proxy contract functionality: begin\n bool private initialized = false; \n modifier onlyNotInitialized() {\n require(\n !initialized, \n 'ERR_ALREADY_INITIALIZED'\n );\n _;\n }\n function isInitialized() external view returns(bool) {\n return initialized;\n }\n \n // Called prior to contract deployment\n constructor() public {\n _initialize(msg.sender, msg.sender, MIN_FEE, false, false);\n }\n \n // Called prior to contract initialization (e.g creating new BPool instance)\n // Calls private _initialize function. Only if contract is not initialized.\n function initialize(\n address controller, \n address factory, \n uint swapFee,\n bool publicSwap,\n bool finalized\n )\n external\n onlyNotInitialized\n returns(bool)\n {\n require(\n controller != address(0),\n 'ERR_INVALID_CONTROLLER_ADDRESS'\n );\n require(\n factory != address(0),\n 'ERR_INVALID_FACTORY_ADDRESS'\n );\n require(swapFee >= MIN_FEE, 'ERR_MIN_FEE');\n require(swapFee <= MAX_FEE, 'ERR_MAX_FEE');\n return _initialize(controller, factory, swapFee, publicSwap, finalized);\n }\n\t\n // Private function called on contract initialization.\n function _initialize(\n address controller, \n address factory, \n uint swapFee,\n bool publicSwap, \n bool finalized\n )\n private\n returns(bool)\n {\n _controller = controller;\n _factory = factory;\n _swapFee = swapFee;\n _publicSwap = publicSwap;\n _finalized = finalized;\n\t\n initialized = true;\n return initialized;\n }\n\n function setup(\n address dataTokenAaddress, \n uint256 dataTokenAmount,\n uint256 dataTokenWeight,\n address baseTokenAddress, \n uint256 baseTokenAmount,\n uint256 baseTokenWeight,\n uint256 swapFee\n )\n external\n _logs_\n {\n require(\n dataTokenAaddress != address(0),\n 'ERR_INVALID_DATATOKEN_ADDRESS'\n );\n require(\n baseTokenAddress != address(0),\n 'ERR_INVALID_BASETOKEN_ADDRESS'\n );\n // other inputs will be validated prior\n // calling the below functions\n // bind data token\n bind(\n dataTokenAaddress,\n dataTokenAmount,\n dataTokenWeight\n );\n emit LOG_JOIN(msg.sender, dataTokenAaddress, dataTokenAmount);\n // bind base token\n bind(\n baseTokenAddress,\n baseTokenAmount,\n baseTokenWeight\n );\n emit LOG_JOIN(msg.sender, baseTokenAddress, baseTokenAmount);\n setSwapFee(swapFee);\n // finalize\n finalize();\n }\n \n //Proxy contract functionality: end\n //-----------------------------------------------------------------------\n\n function isPublicSwap()\n external view\n returns (bool)\n {\n return _publicSwap;\n }\n\n function isFinalized()\n external view\n returns (bool)\n {\n return _finalized;\n }\n\n function isBound(address t)\n external view\n returns (bool)\n {\n return _records[t].bound;\n }\n\n function getNumTokens()\n external view\n returns (uint) \n {\n return _tokens.length;\n }\n\n function getCurrentTokens()\n external view _viewlock_\n returns (address[] memory tokens)\n {\n return _tokens;\n }\n\n function getFinalTokens()\n external view\n _viewlock_\n returns (address[] memory tokens)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n return _tokens;\n }\n\n function getDenormalizedWeight(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n return _records[token].denorm;\n }\n\n function getTotalDenormalizedWeight()\n external view\n _viewlock_\n returns (uint)\n {\n return _totalWeight;\n }\n\n function getNormalizedWeight(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n uint denorm = _records[token].denorm;\n return bdiv(denorm, _totalWeight);\n }\n\n function getBalance(address token)\n external view\n _viewlock_\n returns (uint)\n {\n\n require(_records[token].bound, 'ERR_NOT_BOUND');\n return _records[token].balance;\n }\n\n function getSwapFee()\n external view\n _viewlock_\n returns (uint)\n {\n return _swapFee;\n }\n\n function getController()\n external view\n _viewlock_\n returns (address)\n {\n return _controller;\n }\n\n function setSwapFee(uint swapFee)\n public\n _logs_\n _lock_\n { \n require(!_finalized, 'ERR_IS_FINALIZED');\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(swapFee >= MIN_FEE, 'ERR_MIN_FEE');\n require(swapFee <= MAX_FEE, 'ERR_MAX_FEE');\n _swapFee = swapFee;\n }\n\n function setController(address manager)\n external\n _logs_\n _lock_\n {\n require(\n manager != address(0),\n 'ERR_INVALID_MANAGER_ADDRESS'\n );\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n _controller = manager;\n }\n\t\n function setPublicSwap(bool public_)\n public\n _logs_\n _lock_\n {\n require(!_finalized, 'ERR_IS_FINALIZED');\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n _publicSwap = public_;\n }\n\n function finalize()\n public\n _logs_\n _lock_\n {\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(!_finalized, 'ERR_IS_FINALIZED');\n require(_tokens.length >= MIN_BOUND_TOKENS, 'ERR_MIN_TOKENS');\n\n _finalized = true;\n _publicSwap = true;\n\n _mintPoolShare(INIT_POOL_SUPPLY);\n _pushPoolShare(msg.sender, INIT_POOL_SUPPLY);\n }\n\n\n function bind(address token, uint balance, uint denorm)\n public\n _logs_\n // _lock_ Bind does not lock because it jumps to `rebind`, which does\n {\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(!_records[token].bound, 'ERR_IS_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n require(_tokens.length < MAX_BOUND_TOKENS, 'ERR_MAX_TOKENS');\n\n _records[token] = Record({\n bound: true,\n index: _tokens.length,\n denorm: 0,\n // balance and denorm will be validated\n balance: 0 // and set by `rebind`\n });\n _tokens.push(token);\n rebind(token, balance, denorm);\n }\n\n function rebind(address token, uint balance, uint denorm)\n public\n _logs_\n _lock_\n {\n\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(_records[token].bound, 'ERR_NOT_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n require(denorm >= MIN_WEIGHT, 'ERR_MIN_WEIGHT');\n require(denorm <= MAX_WEIGHT, 'ERR_MAX_WEIGHT');\n require(balance >= MIN_BALANCE, 'ERR_MIN_BALANCE');\n\n // Adjust the denorm and totalWeight\n uint oldWeight = _records[token].denorm;\n if (denorm > oldWeight) {\n _totalWeight = badd(_totalWeight, bsub(denorm, oldWeight));\n require(_totalWeight <= MAX_TOTAL_WEIGHT, 'ERR_MAX_TOTAL_WEIGHT');\n } else if (denorm < oldWeight) {\n _totalWeight = bsub(_totalWeight, bsub(oldWeight, denorm));\n } \n _records[token].denorm = denorm;\n\n // Adjust the balance record and actual token balance\n uint oldBalance = _records[token].balance;\n _records[token].balance = balance;\n if (balance > oldBalance) {\n _pullUnderlying(token, msg.sender, bsub(balance, oldBalance));\n } else if (balance < oldBalance) {\n // In this case liquidity is being withdrawn, so charge EXIT_FEE\n uint tokenBalanceWithdrawn = bsub(oldBalance, balance);\n uint tokenExitFee = bmul(tokenBalanceWithdrawn, EXIT_FEE);\n _pushUnderlying(token, msg.sender, bsub(tokenBalanceWithdrawn, tokenExitFee));\n _pushUnderlying(token, _factory, tokenExitFee);\n }\n }\n\n function unbind(address token)\n external\n _logs_\n _lock_\n {\n\n require(msg.sender == _controller, 'ERR_NOT_CONTROLLER');\n require(_records[token].bound, 'ERR_NOT_BOUND');\n require(!_finalized, 'ERR_IS_FINALIZED');\n\n uint tokenBalance = _records[token].balance;\n uint tokenExitFee = bmul(tokenBalance, EXIT_FEE);\n\n _totalWeight = bsub(_totalWeight, _records[token].denorm);\n\n // Swap the token-to-unbind with the last token,\n // then delete the last token\n uint index = _records[token].index;\n uint last = _tokens.length - 1;\n _tokens[index] = _tokens[last];\n _records[_tokens[index]].index = index;\n _tokens.pop();\n _records[token] = Record({\n bound: false,\n index: 0,\n denorm: 0,\n balance: 0\n });\n\n _pushUnderlying(token, msg.sender, bsub(tokenBalance, tokenExitFee));\n _pushUnderlying(token, _factory, tokenExitFee);\n }\n\n // Absorb any tokens that have been sent to this contract into the pool\n function gulp(address token)\n external\n _logs_\n _lock_\n {\n require(_records[token].bound, 'ERR_NOT_BOUND');\n _records[token].balance = IERC20(token).balanceOf(address(this));\n }\n\n function getSpotPrice(address tokenIn, address tokenOut)\n external view\n _viewlock_\n returns (uint spotPrice)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n Record storage inRecord = _records[tokenIn];\n Record storage outRecord = _records[tokenOut];\n return calcSpotPrice(\n inRecord.balance, \n inRecord.denorm, \n outRecord.balance, \n outRecord.denorm, \n _swapFee\n );\n }\n\n function getSpotPriceSansFee(address tokenIn, address tokenOut)\n external view\n _viewlock_\n returns (uint spotPrice)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n Record storage inRecord = _records[tokenIn];\n Record storage outRecord = _records[tokenOut];\n return calcSpotPrice(\n inRecord.balance, \n inRecord.denorm, \n outRecord.balance, \n outRecord.denorm, \n 0\n );\n }\n\n function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn)\n external\n _logs_\n _lock_\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n\n uint poolTotal = totalSupply();\n uint ratio = bdiv(poolAmountOut, poolTotal);\n require(ratio != 0, 'ERR_MATH_APPROX');\n\n for (uint i = 0; i < _tokens.length; i++) {\n address t = _tokens[i];\n uint bal = _records[t].balance;\n uint tokenAmountIn = bmul(ratio, bal);\n require(tokenAmountIn != 0, 'ERR_MATH_APPROX');\n require(tokenAmountIn <= maxAmountsIn[i], 'ERR_LIMIT_IN');\n _records[t].balance = badd(_records[t].balance, tokenAmountIn);\n emit LOG_JOIN(msg.sender, t, tokenAmountIn);\n _pullUnderlying(t, msg.sender, tokenAmountIn);\n }\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n }\n\n function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut)\n external\n _logs_\n _lock_\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n\n uint poolTotal = totalSupply();\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n uint pAiAfterExitFee = bsub(poolAmountIn, exitFee);\n uint ratio = bdiv(pAiAfterExitFee, poolTotal);\n require(ratio != 0, 'ERR_MATH_APPROX');\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _pushPoolShare(_factory, exitFee);\n _burnPoolShare(pAiAfterExitFee);\n\n for (uint i = 0; i < _tokens.length; i++) {\n address t = _tokens[i];\n uint bal = _records[t].balance;\n uint tokenAmountOut = bmul(ratio, bal);\n require(tokenAmountOut != 0, 'ERR_MATH_APPROX');\n require(tokenAmountOut >= minAmountsOut[i], 'ERR_LIMIT_OUT');\n _records[t].balance = bsub(_records[t].balance, tokenAmountOut);\n emit LOG_EXIT(msg.sender, t, tokenAmountOut);\n _pushUnderlying(t, msg.sender, tokenAmountOut);\n }\n\n }\n\n\n function swapExactAmountIn(\n address tokenIn,\n uint tokenAmountIn,\n address tokenOut,\n uint minAmountOut,\n uint maxPrice\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountOut, uint spotPriceAfter)\n {\n\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(_publicSwap, 'ERR_SWAP_NOT_PUBLIC');\n\n Record storage inRecord = _records[address(tokenIn)];\n Record storage outRecord = _records[address(tokenOut)];\n\n require(\n tokenAmountIn <= bmul(inRecord.balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n uint spotPriceBefore = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceBefore <= maxPrice, 'ERR_BAD_LIMIT_PRICE');\n\n tokenAmountOut = calcOutGivenIn(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n tokenAmountIn,\n _swapFee\n );\n require(tokenAmountOut >= minAmountOut, 'ERR_LIMIT_OUT');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n spotPriceAfter = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceAfter >= spotPriceBefore, 'ERR_MATH_APPROX'); \n require(spotPriceAfter <= maxPrice, 'ERR_LIMIT_PRICE');\n require(\n spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), \n 'ERR_MATH_APPROX'\n );\n\n emit LOG_SWAP(\n msg.sender, \n tokenIn, \n tokenOut, \n tokenAmountIn, \n tokenAmountOut\n );\n\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return (tokenAmountOut, spotPriceAfter);\n }\n\n function swapExactAmountOut(\n address tokenIn,\n uint maxAmountIn,\n address tokenOut,\n uint tokenAmountOut,\n uint maxPrice\n )\n external\n _logs_\n _lock_ \n returns (uint tokenAmountIn, uint spotPriceAfter)\n {\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(_publicSwap, 'ERR_SWAP_NOT_PUBLIC');\n\n Record storage inRecord = _records[address(tokenIn)];\n Record storage outRecord = _records[address(tokenOut)];\n\n require(\n tokenAmountOut <= bmul(outRecord.balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n uint spotPriceBefore = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n \n require(spotPriceBefore <= maxPrice, 'ERR_BAD_LIMIT_PRICE');\n\n tokenAmountIn = calcInGivenOut(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n tokenAmountOut,\n _swapFee\n );\n require(tokenAmountIn <= maxAmountIn, 'ERR_LIMIT_IN');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n spotPriceAfter = calcSpotPrice(\n inRecord.balance,\n inRecord.denorm,\n outRecord.balance,\n outRecord.denorm,\n _swapFee\n );\n require(spotPriceAfter >= spotPriceBefore, 'ERR_MATH_APPROX');\n require(spotPriceAfter <= maxPrice, 'ERR_LIMIT_PRICE');\n require(\n spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), \n 'ERR_MATH_APPROX'\n );\n\n emit LOG_SWAP(\n msg.sender, \n tokenIn, \n tokenOut, \n tokenAmountIn, \n tokenAmountOut\n );\n\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return (tokenAmountIn, spotPriceAfter);\n }\n\n\n function joinswapExternAmountIn(\n address tokenIn, \n uint tokenAmountIn, \n uint minPoolAmountOut\n )\n external\n _logs_\n _lock_\n returns (uint poolAmountOut)\n\n { \n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n require(\n tokenAmountIn <= bmul(_records[tokenIn].balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n Record storage inRecord = _records[tokenIn];\n\n poolAmountOut = calcPoolOutGivenSingleIn(\n inRecord.balance,\n inRecord.denorm,\n _totalSupply,\n _totalWeight,\n tokenAmountIn,\n _swapFee\n );\n\n require(poolAmountOut >= minPoolAmountOut, 'ERR_LIMIT_OUT');\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n\n emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn);\n\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n\n return poolAmountOut;\n }\n\n function joinswapPoolAmountOut(\n address tokenIn, \n uint poolAmountOut, \n uint maxAmountIn\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountIn)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenIn].bound, 'ERR_NOT_BOUND');\n\n Record storage inRecord = _records[tokenIn];\n\n tokenAmountIn = calcSingleInGivenPoolOut(\n inRecord.balance,\n inRecord.denorm,\n _totalSupply,\n _totalWeight,\n poolAmountOut,\n _swapFee\n );\n\n require(tokenAmountIn != 0, 'ERR_MATH_APPROX');\n require(tokenAmountIn <= maxAmountIn, 'ERR_LIMIT_IN');\n \n require(\n tokenAmountIn <= bmul(_records[tokenIn].balance, MAX_IN_RATIO), \n 'ERR_MAX_IN_RATIO'\n );\n\n inRecord.balance = badd(inRecord.balance, tokenAmountIn);\n\n emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn);\n\n _mintPoolShare(poolAmountOut);\n _pushPoolShare(msg.sender, poolAmountOut);\n _pullUnderlying(tokenIn, msg.sender, tokenAmountIn);\n\n return tokenAmountIn;\n }\n\n function exitswapPoolAmountIn(\n address tokenOut, \n uint poolAmountIn, \n uint minAmountOut\n )\n external\n _logs_\n _lock_\n returns (uint tokenAmountOut)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n\n Record storage outRecord = _records[tokenOut];\n\n tokenAmountOut = calcSingleOutGivenPoolIn(\n outRecord.balance,\n outRecord.denorm,\n _totalSupply,\n _totalWeight,\n poolAmountIn,\n _swapFee\n );\n\n require(tokenAmountOut >= minAmountOut, 'ERR_LIMIT_OUT');\n \n require(\n tokenAmountOut <= bmul(_records[tokenOut].balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n\n emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut);\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _burnPoolShare(bsub(poolAmountIn, exitFee));\n _pushPoolShare(_factory, exitFee);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut);\n\n return tokenAmountOut;\n }\n\n function exitswapExternAmountOut(\n address tokenOut, \n uint tokenAmountOut, \n uint maxPoolAmountIn\n )\n external\n _logs_\n _lock_\n returns (uint poolAmountIn)\n {\n require(_finalized, 'ERR_NOT_FINALIZED');\n require(_records[tokenOut].bound, 'ERR_NOT_BOUND');\n require(\n tokenAmountOut <= bmul(_records[tokenOut].balance, MAX_OUT_RATIO), \n 'ERR_MAX_OUT_RATIO'\n );\n\n Record storage outRecord = _records[tokenOut];\n\n poolAmountIn = calcPoolInGivenSingleOut(\n outRecord.balance,\n outRecord.denorm,\n _totalSupply,\n _totalWeight,\n tokenAmountOut,\n _swapFee\n );\n\n require(poolAmountIn != 0, 'ERR_MATH_APPROX');\n require(poolAmountIn <= maxPoolAmountIn, 'ERR_LIMIT_IN');\n\n outRecord.balance = bsub(outRecord.balance, tokenAmountOut);\n\n uint exitFee = bmul(poolAmountIn, EXIT_FEE);\n\n emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut);\n\n _pullPoolShare(msg.sender, poolAmountIn);\n _burnPoolShare(bsub(poolAmountIn, exitFee));\n _pushPoolShare(_factory, exitFee);\n _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); \n\n return poolAmountIn;\n }\n\n\n // ==\n // 'Underlying' token-manipulation functions make external calls but are NOT locked\n // You must `_lock_` or otherwise ensure reentry-safety\n\n function _pullUnderlying(address erc20, address from, uint amount)\n internal\n {\n bool xfer = IERC20(erc20).transferFrom(from, address(this), amount);\n require(xfer, 'ERR_ERC20_FALSE');\n }\n\n function _pushUnderlying(address erc20, address to, uint amount)\n internal\n {\n bool xfer = IERC20(erc20).transfer(to, amount);\n require(xfer, 'ERR_ERC20_FALSE');\n }\n\n function _pullPoolShare(address from, uint amount)\n internal\n {\n _pull(from, amount);\n }\n\n function _pushPoolShare(address to, uint amount)\n internal\n {\n _push(to, amount);\n }\n\n function _mintPoolShare(uint amount)\n internal\n {\n _mint(amount);\n }\n\n function _burnPoolShare(uint amount)\n internal\n {\n _burn(amount);\n }\n\n}\n",
"sourcePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol",
"ast": {
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol",
"exportedSymbols": {
"BPool": [
3778
]
},
"id": 3779,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1424,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol",
"file": "./BToken.sol",
"id": 1425,
"nodeType": "ImportDirective",
"scope": 3779,
"sourceUnit": 4286,
"src": "186:22:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BMath.sol",
"file": "./BMath.sol",
"id": 1426,
"nodeType": "ImportDirective",
"scope": 3779,
"sourceUnit": 946,
"src": "209:21:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1427,
"name": "BToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4285,
"src": "872:6:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BToken_$4285",
"typeString": "contract BToken"
}
},
"id": 1428,
"nodeType": "InheritanceSpecifier",
"src": "872:6:6"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1429,
"name": "BMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 945,
"src": "880:5:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BMath_$945",
"typeString": "contract BMath"
}
},
"id": 1430,
"nodeType": "InheritanceSpecifier",
"src": "880:5:6"
}
],
"contractDependencies": [
280,
945,
1422,
3979,
4285,
6537
],
"contractKind": "contract",
"documentation": "@title BPool\n \n@dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n deploy new BPools.\n* This contract is is nearly identical to the BPool.sol contract at [1]\n The only difference is the \"Proxy contract functionality\" section \n given below. We'd inherit from BPool if we could, for simplicity.\n But we can't, because the proxy section needs to access private\n variables declared in BPool, and Solidity disallows this. Therefore\n the best we can do for now is clearly demarcate the proxy section. \n* [1] https://github.com/balancer-labs/balancer-core/contracts/.",
"fullyImplemented": true,
"id": 3778,
"linearizedBaseContracts": [
3778,
945,
4285,
6537,
3979,
1422,
280
],
"name": "BPool",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "BPool.Record",
"id": 1439,
"members": [
{
"constant": false,
"id": 1432,
"name": "bound",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "917:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1431,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "917:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1434,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "965:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1433,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "965:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1436,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "998:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1435,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "998:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1438,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "1043:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1437,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1043:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Record",
"nodeType": "StructDefinition",
"scope": 3778,
"src": "893:169:6",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 1451,
"name": "LOG_SWAP",
"nodeType": "EventDefinition",
"parameters": {
"id": 1450,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1441,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1092:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1440,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1092:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1443,
"indexed": true,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1124:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1442,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1124:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1445,
"indexed": true,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1157:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1444,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1157:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1447,
"indexed": false,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1191:29:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1446,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1191:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1449,
"indexed": false,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1230:30:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1448,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1230:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1082:184:6"
},
"src": "1068:199:6"
},
{
"anonymous": false,
"documentation": null,
"id": 1459,
"name": "LOG_JOIN",
"nodeType": "EventDefinition",
"parameters": {
"id": 1458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1453,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1297:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1452,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1297:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1455,
"indexed": true,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1329:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1329:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1457,
"indexed": false,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1362:29:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1456,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1362:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1287:110:6"
},
"src": "1273:125:6"
},
{
"anonymous": false,
"documentation": null,
"id": 1467,
"name": "LOG_EXIT",
"nodeType": "EventDefinition",
"parameters": {
"id": 1466,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1461,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1428:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1460,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1428:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1463,
"indexed": true,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1460:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1462,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1460:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1465,
"indexed": false,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1494:30:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1464,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1494:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1418:112:6"
},
"src": "1404:127:6"
},
{
"anonymous": true,
"documentation": null,
"id": 1475,
"name": "LOG_CALL",
"nodeType": "EventDefinition",
"parameters": {
"id": 1474,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1469,
"indexed": true,
"name": "sig",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1561:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1468,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1561:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1471,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1590:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1470,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1590:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1473,
"indexed": false,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1622:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1472,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1622:5:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1551:97:6"
},
"src": "1537:122:6"
},
{
"body": {
"id": 1487,
"nodeType": "Block",
"src": "1683:72:6",
"statements": [
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1478,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1707:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1479,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sig",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1707:7:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1480,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1716:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1481,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1716:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1482,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1728:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1728:8:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"id": 1477,
"name": "LOG_CALL",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1475,
"src": "1698:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes4,address,bytes memory)"
}
},
"id": 1484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1698:39:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1485,
"nodeType": "EmitStatement",
"src": "1693:44:6"
},
{
"id": 1486,
"nodeType": "PlaceholderStatement",
"src": "1747:1:6"
}
]
},
"documentation": null,
"id": 1488,
"name": "_logs_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1476,
"nodeType": "ParameterList",
"parameters": [],
"src": "1680:2:6"
},
"src": "1665:90:6",
"visibility": "internal"
},
{
"body": {
"id": 1505,
"nodeType": "Block",
"src": "1779:141:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1810:7:6",
"subExpression": {
"argumentTypes": null,
"id": 1491,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1811:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e545259",
"id": 1493,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1832:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
},
"value": "ERR_REENTRY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
}
],
"id": 1490,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "1789:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1494,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1789:66:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1495,
"nodeType": "ExpressionStatement",
"src": "1789:66:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1498,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1496,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1865:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1874:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1865:13:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1499,
"nodeType": "ExpressionStatement",
"src": "1865:13:6"
},
{
"id": 1500,
"nodeType": "PlaceholderStatement",
"src": "1888:1:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1501,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1899:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1502,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1908:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1899:14:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1504,
"nodeType": "ExpressionStatement",
"src": "1899:14:6"
}
]
},
"documentation": null,
"id": 1506,
"name": "_lock_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1489,
"nodeType": "ParameterList",
"parameters": [],
"src": "1776:2:6"
},
"src": "1761:159:6",
"visibility": "internal"
},
{
"body": {
"id": 1515,
"nodeType": "Block",
"src": "1948:59:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1966:7:6",
"subExpression": {
"argumentTypes": null,
"id": 1509,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1967:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e545259",
"id": 1511,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1975:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
},
"value": "ERR_REENTRY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
}
],
"id": 1508,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "1958:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1512,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1958:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1513,
"nodeType": "ExpressionStatement",
"src": "1958:31:6"
},
{
"id": 1514,
"nodeType": "PlaceholderStatement",
"src": "1999:1:6"
}
]
},
"documentation": null,
"id": 1516,
"name": "_viewlock_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1507,
"nodeType": "ParameterList",
"parameters": [],
"src": "1945:2:6"
},
"src": "1926:81:6",
"visibility": "internal"
},
{
"constant": false,
"id": 1518,
"name": "_mutex",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2017:19:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1517,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2017:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1520,
"name": "_factory",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2043:24:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1519,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2043:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1522,
"name": "_controller",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2121:27:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1521,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2121:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1524,
"name": "_publicSwap",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2174:24:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1523,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2174:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1526,
"name": "_swapFee",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2358:21:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1525,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2358:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1528,
"name": "_finalized",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2385:23:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1527,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2385:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1531,
"name": "_tokens",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2415:25:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1529,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2415:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1530,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2415:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1535,
"name": "_records",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2446:42:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record)"
},
"typeName": {
"id": 1534,
"keyType": {
"id": 1532,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2454:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "2446:24:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record)"
},
"valueType": {
"contractScope": null,
"id": 1533,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "2463:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1537,
"name": "_totalWeight",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2494:25:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1536,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2494:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1540,
"name": "initialized",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2646:32:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1538,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2646:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2673:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"visibility": "private"
},
{
"body": {
"id": 1549,
"nodeType": "Block",
"src": "2715:111:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2746:12:6",
"subExpression": {
"argumentTypes": null,
"id": 1543,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "2747:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f414c52454144595f494e495449414c495a4544",
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2773:25:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249",
"typeString": "literal_string \"ERR_ALREADY_INITIALIZED\""
},
"value": "ERR_ALREADY_INITIALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249",
"typeString": "literal_string \"ERR_ALREADY_INITIALIZED\""
}
],
"id": 1542,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "2725:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2725:83:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1547,
"nodeType": "ExpressionStatement",
"src": "2725:83:6"
},
{
"id": 1548,
"nodeType": "PlaceholderStatement",
"src": "2818:1:6"
}
]
},
"documentation": null,
"id": 1550,
"name": "onlyNotInitialized",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1541,
"nodeType": "ParameterList",
"parameters": [],
"src": "2712:2:6"
},
"src": "2685:141:6",
"visibility": "internal"
},
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "2884:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1555,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "2901:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1554,
"id": 1556,
"nodeType": "Return",
"src": "2894:18:6"
}
]
},
"documentation": null,
"id": 1558,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isInitialized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1551,
"nodeType": "ParameterList",
"parameters": [],
"src": "2853:2:6"
},
"returnParameters": {
"id": 1554,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1553,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "2878:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1552,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2878:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2877:6:6"
},
"scope": 3778,
"src": "2831:88:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1571,
"nodeType": "Block",
"src": "2993:75:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1562,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "3015:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1563,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3015:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1564,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "3027:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1565,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3027:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1566,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "3039:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1567,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3048:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3055:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1561,
"name": "_initialize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1672,
"src": "3003:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$",
"typeString": "function (address,address,uint256,bool,bool) returns (bool)"
}
},
"id": 1569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3003:58:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1570,
"nodeType": "ExpressionStatement",
"src": "3003:58:6"
}
]
},
"documentation": null,
"id": 1572,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1559,
"nodeType": "ParameterList",
"parameters": [],
"src": "2983:2:6"
},
"returnParameters": {
"id": 1560,
"nodeType": "ParameterList",
"parameters": [],
"src": "2993:0:6"
},
"scope": 3778,
"src": "2972:96:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1629,
"nodeType": "Block",
"src": "3461:408:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1590,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1574,
"src": "3492:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1592,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3514:1:6",
"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": 1591,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3506:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1593,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3506:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3492:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f434f4e54524f4c4c45525f41444452455353",
"id": 1595,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3530:32:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd",
"typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\""
},
"value": "ERR_INVALID_CONTROLLER_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd",
"typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\""
}
],
"id": 1589,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3471:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1596,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3471:101:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1597,
"nodeType": "ExpressionStatement",
"src": "3471:101:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1599,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1576,
"src": "3603:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1601,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3622:1:6",
"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": 1600,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3614:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3614:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3603:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f464143544f52595f41444452455353",
"id": 1604,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3638:29:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b",
"typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\""
},
"value": "ERR_INVALID_FACTORY_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b",
"typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\""
}
],
"id": 1598,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3582:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3582:95:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1606,
"nodeType": "ExpressionStatement",
"src": "3582:95:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1608,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3695:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 1609,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "3706:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3695:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f464545",
"id": 1611,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3715:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
},
"value": "ERR_MIN_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
}
],
"id": 1607,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3687:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1612,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3687:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1613,
"nodeType": "ExpressionStatement",
"src": "3687:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1615,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3747:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 1616,
"name": "MAX_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 220,
"src": "3758:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3747:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f464545",
"id": 1618,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3767:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
},
"value": "ERR_MAX_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
}
],
"id": 1614,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3739:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3739:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1620,
"nodeType": "ExpressionStatement",
"src": "3739:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1622,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1574,
"src": "3810:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1623,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1576,
"src": "3822:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1624,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3831:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1625,
"name": "publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1580,
"src": "3840:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 1626,
"name": "finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1582,
"src": "3852:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1621,
"name": "_initialize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1672,
"src": "3798:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$",
"typeString": "function (address,address,uint256,bool,bool) returns (bool)"
}
},
"id": 1627,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3798:64:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1588,
"id": 1628,
"nodeType": "Return",
"src": "3791:71:6"
}
]
},
"documentation": null,
"id": 1630,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1585,
"modifierName": {
"argumentTypes": null,
"id": 1584,
"name": "onlyNotInitialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1550,
"src": "3416:18:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3416:18:6"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1583,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1574,
"name": "controller",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3268:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1573,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3268:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1576,
"name": "factory",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3297:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1575,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3297:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1578,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3323:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1577,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3323:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1580,
"name": "publicSwap",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3345:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1579,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3345:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1582,
"name": "finalized",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3370:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1581,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3370:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3258:132:6"
},
"returnParameters": {
"id": 1588,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1587,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3451:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1586,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3451:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3450:6:6"
},
"scope": 3778,
"src": "3239:630:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1671,
"nodeType": "Block",
"src": "4131:221:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1647,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1645,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "4141:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1646,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1632,
"src": "4155:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4141:24:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1648,
"nodeType": "ExpressionStatement",
"src": "4141:24:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1649,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "4175:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1650,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "4186:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4175:18:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1652,
"nodeType": "ExpressionStatement",
"src": "4175:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1655,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1653,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "4203:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1654,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1636,
"src": "4214:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4203:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1656,
"nodeType": "ExpressionStatement",
"src": "4203:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1659,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1657,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "4231:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1658,
"name": "publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1638,
"src": "4245:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4231:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1660,
"nodeType": "ExpressionStatement",
"src": "4231:24:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1663,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1661,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "4265:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1662,
"name": "finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1640,
"src": "4278:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4265:22:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1664,
"nodeType": "ExpressionStatement",
"src": "4265:22:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1665,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "4299:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1666,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4313:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "4299:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1668,
"nodeType": "ExpressionStatement",
"src": "4299:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1669,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "4334:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1644,
"id": 1670,
"nodeType": "Return",
"src": "4327:18:6"
}
]
},
"documentation": null,
"id": 1672,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1632,
"name": "controller",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "3965:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1631,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3965:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1634,
"name": "factory",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "3994:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1633,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3994:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1636,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4020:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1635,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4020:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1638,
"name": "publicSwap",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4042:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1637,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4042:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1640,
"name": "finalized",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4068:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1639,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4068:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3955:133:6"
},
"returnParameters": {
"id": 1644,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1643,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4121:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1642,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4121:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4120:6:6"
},
"scope": 3778,
"src": "3935:417:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "private"
},
{
"body": {
"id": 1742,
"nodeType": "Block",
"src": "4643:816:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1696,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1692,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "4674:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4703:1:6",
"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": 1693,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4695:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1695,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4695:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4674:31:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f44415441544f4b454e5f41444452455353",
"id": 1697,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4719:31:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632",
"typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\""
},
"value": "ERR_INVALID_DATATOKEN_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632",
"typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\""
}
],
"id": 1691,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "4653:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4653:107:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1699,
"nodeType": "ExpressionStatement",
"src": "4653:107:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1705,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1701,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "4791:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1703,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4819:1:6",
"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": 1702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4811:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1704,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4811:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4791:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f42415345544f4b454e5f41444452455353",
"id": 1706,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4835:31:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072",
"typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\""
},
"value": "ERR_INVALID_BASETOKEN_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072",
"typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\""
}
],
"id": 1700,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "4770:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4770:106:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1708,
"nodeType": "ExpressionStatement",
"src": "4770:106:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1710,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "5018:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1711,
"name": "dataTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1676,
"src": "5049:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1712,
"name": "dataTokenWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1678,
"src": "5078:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1709,
"name": "bind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2130,
"src": "5000:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 1713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5000:103:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1714,
"nodeType": "ExpressionStatement",
"src": "5000:103:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1716,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "5127:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5127:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1718,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "5139:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1719,
"name": "dataTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1676,
"src": "5158:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1715,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "5118:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 1720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5118:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1721,
"nodeType": "EmitStatement",
"src": "5113:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1723,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "5229:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1724,
"name": "baseTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "5259:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1725,
"name": "baseTokenWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1684,
"src": "5288:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1722,
"name": "bind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2130,
"src": "5211:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 1726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5211:102:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1727,
"nodeType": "ExpressionStatement",
"src": "5211:102:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1729,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "5337:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5337:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1731,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "5349:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1732,
"name": "baseTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "5367:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1728,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "5328:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 1733,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5328:55:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1734,
"nodeType": "EmitStatement",
"src": "5323:60:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1736,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "5404:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1735,
"name": "setSwapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5393:10:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5393:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1738,
"nodeType": "ExpressionStatement",
"src": "5393:19:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1739,
"name": "finalize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2063,
"src": "5442:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5442:10:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1741,
"nodeType": "ExpressionStatement",
"src": "5442:10:6"
}
]
},
"documentation": null,
"id": 1743,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1689,
"modifierName": {
"argumentTypes": null,
"id": 1688,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "4632:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "4632:6:6"
}
],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1687,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1674,
"name": "dataTokenAaddress",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4382:25:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1673,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4382:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1676,
"name": "dataTokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4418:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1675,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4418:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1678,
"name": "dataTokenWeight",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4451:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1677,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4451:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1680,
"name": "baseTokenAddress",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4484:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4484:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1682,
"name": "baseTokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4519:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1681,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4519:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1684,
"name": "baseTokenWeight",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4552:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1683,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4552:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1686,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4585:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1685,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4585:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4372:234:6"
},
"returnParameters": {
"id": 1690,
"nodeType": "ParameterList",
"parameters": [],
"src": "4643:0:6"
},
"scope": 3778,
"src": "4358:1101:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1750,
"nodeType": "Block",
"src": "5661:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1748,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "5678:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1747,
"id": 1749,
"nodeType": "Return",
"src": "5671:18:6"
}
]
},
"documentation": null,
"id": 1751,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isPublicSwap",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1744,
"nodeType": "ParameterList",
"parameters": [],
"src": "5609:2:6"
},
"returnParameters": {
"id": 1747,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1746,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1751,
"src": "5651:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1745,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5651:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5650:6:6"
},
"scope": 3778,
"src": "5588:108:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1758,
"nodeType": "Block",
"src": "5774:34:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1756,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "5791:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1755,
"id": 1757,
"nodeType": "Return",
"src": "5784:17:6"
}
]
},
"documentation": null,
"id": 1759,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isFinalized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1752,
"nodeType": "ParameterList",
"parameters": [],
"src": "5722:2:6"
},
"returnParameters": {
"id": 1755,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1754,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1759,
"src": "5764:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1753,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5764:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5763:6:6"
},
"scope": 3778,
"src": "5702:106:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1771,
"nodeType": "Block",
"src": "5891:41:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1766,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "5908:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1768,
"indexExpression": {
"argumentTypes": null,
"id": 1767,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1761,
"src": "5917:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5908:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1769,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "5908:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1765,
"id": 1770,
"nodeType": "Return",
"src": "5901:24:6"
}
]
},
"documentation": null,
"id": 1772,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isBound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1762,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1761,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 1772,
"src": "5831:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1760,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5831:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5830:11:6"
},
"returnParameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1764,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1772,
"src": "5881:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1763,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5881:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5880:6:6"
},
"scope": 3778,
"src": "5814:118:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1780,
"nodeType": "Block",
"src": "6012:38:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1777,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6029:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 1778,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "6029:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1776,
"id": 1779,
"nodeType": "Return",
"src": "6022:21:6"
}
]
},
"documentation": null,
"id": 1781,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getNumTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1773,
"nodeType": "ParameterList",
"parameters": [],
"src": "5959:2:6"
},
"returnParameters": {
"id": 1776,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1775,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1781,
"src": "6001:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1774,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6001:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6000:6:6"
},
"scope": 3778,
"src": "5938:112:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1791,
"nodeType": "Block",
"src": "6163:31:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1789,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6180:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"functionReturnParameters": 1788,
"id": 1790,
"nodeType": "Return",
"src": "6173:14:6"
}
]
},
"documentation": null,
"id": 1792,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1784,
"modifierName": {
"argumentTypes": null,
"id": 1783,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6106:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6106:10:6"
}
],
"name": "getCurrentTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1782,
"nodeType": "ParameterList",
"parameters": [],
"src": "6081:2:6"
},
"returnParameters": {
"id": 1788,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1787,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1792,
"src": "6134:23:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1785,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6134:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1786,
"length": null,
"nodeType": "ArrayTypeName",
"src": "6134:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6133:25:6"
},
"scope": 3778,
"src": "6056:138:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1807,
"nodeType": "Block",
"src": "6313:81:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1801,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "6331:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 1802,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6343:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 1800,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6323:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6323:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1804,
"nodeType": "ExpressionStatement",
"src": "6323:40:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1805,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6380:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"functionReturnParameters": 1799,
"id": 1806,
"nodeType": "Return",
"src": "6373:14:6"
}
]
},
"documentation": null,
"id": 1808,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1795,
"modifierName": {
"argumentTypes": null,
"id": 1794,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6256:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6256:10:6"
}
],
"name": "getFinalTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1793,
"nodeType": "ParameterList",
"parameters": [],
"src": "6223:2:6"
},
"returnParameters": {
"id": 1799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1798,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1808,
"src": "6284:23:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1796,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6284:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1797,
"length": null,
"nodeType": "ArrayTypeName",
"src": "6284:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6283:25:6"
},
"scope": 3778,
"src": "6200:194:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1830,
"nodeType": "Block",
"src": "6514:104:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1818,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6533:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1820,
"indexExpression": {
"argumentTypes": null,
"id": 1819,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1810,
"src": "6542:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6533:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1821,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "6533:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1822,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6556:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1817,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6525:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6525:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1824,
"nodeType": "ExpressionStatement",
"src": "6525:47:6"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1825,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6589:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1827,
"indexExpression": {
"argumentTypes": null,
"id": 1826,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1810,
"src": "6598:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6589:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1828,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "6589:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1816,
"id": 1829,
"nodeType": "Return",
"src": "6582:29:6"
}
]
},
"documentation": null,
"id": 1831,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1813,
"modifierName": {
"argumentTypes": null,
"id": 1812,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6476:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6476:10:6"
}
],
"name": "getDenormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1811,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1810,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1831,
"src": "6431:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1809,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6431:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6430:15:6"
},
"returnParameters": {
"id": 1816,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1815,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1831,
"src": "6504:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1814,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6504:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6503:6:6"
},
"scope": 3778,
"src": "6400:218:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1840,
"nodeType": "Block",
"src": "6730:36:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1838,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "6747:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1837,
"id": 1839,
"nodeType": "Return",
"src": "6740:19:6"
}
]
},
"documentation": null,
"id": 1841,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1834,
"modifierName": {
"argumentTypes": null,
"id": 1833,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6692:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6692:10:6"
}
],
"name": "getTotalDenormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1832,
"nodeType": "ParameterList",
"parameters": [],
"src": "6659:2:6"
},
"returnParameters": {
"id": 1837,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1836,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1841,
"src": "6720:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1835,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6720:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6719:6:6"
},
"scope": 3778,
"src": "6624:142:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1870,
"nodeType": "Block",
"src": "6884:154:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1851,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6903:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1853,
"indexExpression": {
"argumentTypes": null,
"id": 1852,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1843,
"src": "6912:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6903:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1854,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "6903:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1855,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6926:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1850,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6895:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1856,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6895:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1857,
"nodeType": "ExpressionStatement",
"src": "6895:47:6"
},
{
"assignments": [
1859
],
"declarations": [
{
"constant": false,
"id": 1859,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 1870,
"src": "6952:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1858,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6952:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1864,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1860,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6966:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1862,
"indexExpression": {
"argumentTypes": null,
"id": 1861,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1843,
"src": "6975:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6966:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1863,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "6966:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6952:36:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1866,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1859,
"src": "7010:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1867,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "7018:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1865,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "7005:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1868,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7005:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1849,
"id": 1869,
"nodeType": "Return",
"src": "6998:33:6"
}
]
},
"documentation": null,
"id": 1871,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1846,
"modifierName": {
"argumentTypes": null,
"id": 1845,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6846:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6846:10:6"
}
],
"name": "getNormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1844,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1843,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1871,
"src": "6801:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1842,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6801:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6800:15:6"
},
"returnParameters": {
"id": 1849,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1848,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1871,
"src": "6874:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1847,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6874:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6873:6:6"
},
"scope": 3778,
"src": "6772:266:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1893,
"nodeType": "Block",
"src": "7147:105:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1881,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "7166:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1883,
"indexExpression": {
"argumentTypes": null,
"id": 1882,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1873,
"src": "7175:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7166:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1884,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "7166:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1885,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7189:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1880,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7158:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7158:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1887,
"nodeType": "ExpressionStatement",
"src": "7158:47:6"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1888,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "7222:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1890,
"indexExpression": {
"argumentTypes": null,
"id": 1889,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1873,
"src": "7231:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7222:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1891,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "7222:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1879,
"id": 1892,
"nodeType": "Return",
"src": "7215:30:6"
}
]
},
"documentation": null,
"id": 1894,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1876,
"modifierName": {
"argumentTypes": null,
"id": 1875,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7109:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7109:10:6"
}
],
"name": "getBalance",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1874,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1873,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "7064:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1872,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7064:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7063:15:6"
},
"returnParameters": {
"id": 1879,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1878,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "7137:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1877,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7137:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7136:6:6"
},
"scope": 3778,
"src": "7044:208:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1903,
"nodeType": "Block",
"src": "7348:32:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1901,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "7365:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1900,
"id": 1902,
"nodeType": "Return",
"src": "7358:15:6"
}
]
},
"documentation": null,
"id": 1904,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1897,
"modifierName": {
"argumentTypes": null,
"id": 1896,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7310:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7310:10:6"
}
],
"name": "getSwapFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1895,
"nodeType": "ParameterList",
"parameters": [],
"src": "7277:2:6"
},
"returnParameters": {
"id": 1900,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1904,
"src": "7338:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1898,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7338:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7337:6:6"
},
"scope": 3778,
"src": "7258:122:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1913,
"nodeType": "Block",
"src": "7482:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1911,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "7499:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 1910,
"id": 1912,
"nodeType": "Return",
"src": "7492:18:6"
}
]
},
"documentation": null,
"id": 1914,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1907,
"modifierName": {
"argumentTypes": null,
"id": 1906,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7441:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7441:10:6"
}
],
"name": "getController",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1905,
"nodeType": "ParameterList",
"parameters": [],
"src": "7408:2:6"
},
"returnParameters": {
"id": 1910,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1909,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1914,
"src": "7469:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1908,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7469:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7468:9:6"
},
"scope": 3778,
"src": "7386:131:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1955,
"nodeType": "Block",
"src": "7606:256:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "7625:11:6",
"subExpression": {
"argumentTypes": null,
"id": 1924,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "7626:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 1926,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7638:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 1923,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7617:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7617:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1928,
"nodeType": "ExpressionStatement",
"src": "7617:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1930,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "7675:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "7675:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1932,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "7689:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7675:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 1934,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7702:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 1929,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7667:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7667:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1936,
"nodeType": "ExpressionStatement",
"src": "7667:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1940,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1938,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7741:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 1939,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "7752:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7741:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f464545",
"id": 1941,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7761:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
},
"value": "ERR_MIN_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
}
],
"id": 1937,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7733:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7733:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1943,
"nodeType": "ExpressionStatement",
"src": "7733:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1945,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7793:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 1946,
"name": "MAX_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 220,
"src": "7804:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7793:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f464545",
"id": 1948,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7813:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
},
"value": "ERR_MAX_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
}
],
"id": 1944,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7785:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1949,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7785:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1950,
"nodeType": "ExpressionStatement",
"src": "7785:42:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1953,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1951,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "7837:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1952,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7848:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7837:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1954,
"nodeType": "ExpressionStatement",
"src": "7837:18:6"
}
]
},
"documentation": null,
"id": 1956,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1919,
"modifierName": {
"argumentTypes": null,
"id": 1918,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "7580:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7580:6:6"
},
{
"arguments": null,
"id": 1921,
"modifierName": {
"argumentTypes": null,
"id": 1920,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "7595:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7595:6:6"
}
],
"name": "setSwapFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1917,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1916,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1956,
"src": "7543:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1915,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7543:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7542:14:6"
},
"returnParameters": {
"id": 1922,
"nodeType": "ParameterList",
"parameters": [],
"src": "7606:0:6"
},
"scope": 3778,
"src": "7523:339:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1986,
"nodeType": "Block",
"src": "7959:209:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1970,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1966,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1958,
"src": "7990:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1968,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8009:1:6",
"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": 1967,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8001:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1969,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8001:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "7990:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f4d414e414745525f41444452455353",
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8025:29:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078",
"typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\""
},
"value": "ERR_INVALID_MANAGER_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078",
"typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\""
}
],
"id": 1965,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7969:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1972,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7969:95:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1973,
"nodeType": "ExpressionStatement",
"src": "7969:95:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1978,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1975,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8082:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1976,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8082:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1977,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8096:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8082:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 1979,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8109:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 1974,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8074:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1980,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8074:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1981,
"nodeType": "ExpressionStatement",
"src": "8074:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1984,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1982,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8140:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1983,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1958,
"src": "8154:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8140:21:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1985,
"nodeType": "ExpressionStatement",
"src": "8140:21:6"
}
]
},
"documentation": null,
"id": 1987,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1961,
"modifierName": {
"argumentTypes": null,
"id": 1960,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "7933:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7933:6:6"
},
{
"arguments": null,
"id": 1963,
"modifierName": {
"argumentTypes": null,
"id": 1962,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "7948:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7948:6:6"
}
],
"name": "setController",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1959,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1958,
"name": "manager",
"nodeType": "VariableDeclaration",
"scope": 1987,
"src": "7891:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1957,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7891:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7890:17:6"
},
"returnParameters": {
"id": 1964,
"nodeType": "ParameterList",
"parameters": [],
"src": "7959:0:6"
},
"scope": 3778,
"src": "7868:300:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2014,
"nodeType": "Block",
"src": "8261:154:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1998,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "8279:11:6",
"subExpression": {
"argumentTypes": null,
"id": 1997,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8280:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 1999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8292:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 1996,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8271:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2000,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8271:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2001,
"nodeType": "ExpressionStatement",
"src": "8271:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2006,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2003,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8329:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8329:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2005,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8343:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8329:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2007,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8356:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2002,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8321:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2008,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8321:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2009,
"nodeType": "ExpressionStatement",
"src": "8321:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2010,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "8387:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2011,
"name": "public_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1989,
"src": "8401:7:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "8387:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2013,
"nodeType": "ExpressionStatement",
"src": "8387:21:6"
}
]
},
"documentation": null,
"id": 2015,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1992,
"modifierName": {
"argumentTypes": null,
"id": 1991,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8235:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8235:6:6"
},
{
"arguments": null,
"id": 1994,
"modifierName": {
"argumentTypes": null,
"id": 1993,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "8250:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8250:6:6"
}
],
"name": "setPublicSwap",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1990,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1989,
"name": "public_",
"nodeType": "VariableDeclaration",
"scope": 2015,
"src": "8198:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1988,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "8198:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8197:14:6"
},
"returnParameters": {
"id": 1995,
"nodeType": "ParameterList",
"parameters": [],
"src": "8261:0:6"
},
"scope": 3778,
"src": "8175:240:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2062,
"nodeType": "Block",
"src": "8490:347:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2023,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8508:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8508:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2025,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8522:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8508:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2027,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8535:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2022,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8500:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2028,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8500:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2029,
"nodeType": "ExpressionStatement",
"src": "8500:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2032,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "8574:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2031,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8575:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8587:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2030,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8566:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2034,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8566:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2035,
"nodeType": "ExpressionStatement",
"src": "8566:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2040,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2037,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "8624:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2038,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8624:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2039,
"name": "MIN_BOUND_TOKENS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 205,
"src": "8642:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8624:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f544f4b454e53",
"id": 2041,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8660:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9",
"typeString": "literal_string \"ERR_MIN_TOKENS\""
},
"value": "ERR_MIN_TOKENS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9",
"typeString": "literal_string \"ERR_MIN_TOKENS\""
}
],
"id": 2036,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8616:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8616:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2043,
"nodeType": "ExpressionStatement",
"src": "8616:61:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2044,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8688:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2045,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8701:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "8688:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2047,
"nodeType": "ExpressionStatement",
"src": "8688:17:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2048,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "8715:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8729:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "8715:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2051,
"nodeType": "ExpressionStatement",
"src": "8715:18:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2053,
"name": "INIT_POOL_SUPPLY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 248,
"src": "8759:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2052,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "8744:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8744:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2055,
"nodeType": "ExpressionStatement",
"src": "8744:32:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2057,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8801:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2058,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8801:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2059,
"name": "INIT_POOL_SUPPLY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 248,
"src": "8813:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2056,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "8786:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8786:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2061,
"nodeType": "ExpressionStatement",
"src": "8786:44:6"
}
]
},
"documentation": null,
"id": 2063,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2018,
"modifierName": {
"argumentTypes": null,
"id": 2017,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8464:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8464:6:6"
},
{
"arguments": null,
"id": 2020,
"modifierName": {
"argumentTypes": null,
"id": 2019,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "8479:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8479:6:6"
}
],
"name": "finalize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2016,
"nodeType": "ParameterList",
"parameters": [],
"src": "8438:2:6"
},
"returnParameters": {
"id": 2021,
"nodeType": "ParameterList",
"parameters": [],
"src": "8490:0:6"
},
"scope": 3778,
"src": "8421:416:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2129,
"nodeType": "Block",
"src": "9013:551:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "9031:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2076,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9031:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2077,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "9045:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "9031:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2079,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9058:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2074,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9023:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2080,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9023:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2081,
"nodeType": "ExpressionStatement",
"src": "9023:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9097:22:6",
"subExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2083,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9098:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2085,
"indexExpression": {
"argumentTypes": null,
"id": 2084,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9107:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9098:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2086,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "9098:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f424f554e44",
"id": 2088,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9121:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51",
"typeString": "literal_string \"ERR_IS_BOUND\""
},
"value": "ERR_IS_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51",
"typeString": "literal_string \"ERR_IS_BOUND\""
}
],
"id": 2082,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9089:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9089:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2090,
"nodeType": "ExpressionStatement",
"src": "9089:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2093,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9154:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2092,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "9155:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2094,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9167:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2091,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9146:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9146:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2096,
"nodeType": "ExpressionStatement",
"src": "9146:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2098,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9205:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2099,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9205:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2100,
"name": "MAX_BOUND_TOKENS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 208,
"src": "9222:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9205:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f544f4b454e53",
"id": 2102,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9240:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5",
"typeString": "literal_string \"ERR_MAX_TOKENS\""
},
"value": "ERR_MAX_TOKENS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5",
"typeString": "literal_string \"ERR_MAX_TOKENS\""
}
],
"id": 2097,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9197:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9197:60:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2104,
"nodeType": "ExpressionStatement",
"src": "9197:60:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2105,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9268:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2107,
"indexExpression": {
"argumentTypes": null,
"id": 2106,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9277:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "9268:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2109,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9314:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2110,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9339:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2111,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9339:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2112,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9375:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2113,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9451:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2108,
"name": "Record",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1439,
"src": "9286:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$",
"typeString": "type(struct BPool.Record storage pointer)"
}
},
"id": 2114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"bound",
"index",
"denorm",
"balance"
],
"nodeType": "FunctionCall",
"src": "9286:202:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_memory",
"typeString": "struct BPool.Record memory"
}
},
"src": "9268:220:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2116,
"nodeType": "ExpressionStatement",
"src": "9268:220:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2120,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9511:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 2117,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9498:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2119,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9498:12:6",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) returns (uint256)"
}
},
"id": 2121,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9498:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2122,
"nodeType": "ExpressionStatement",
"src": "9498:19:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2124,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9534:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2125,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2067,
"src": "9541:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2126,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2069,
"src": "9550:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2123,
"name": "rebind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2302,
"src": "9527:6:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 2127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9527:30:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2128,
"nodeType": "ExpressionStatement",
"src": "9527:30:6"
}
]
},
"documentation": null,
"id": 2130,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2072,
"modifierName": {
"argumentTypes": null,
"id": 2071,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8923:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8923:6:6"
}
],
"name": "bind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2070,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2065,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8858:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2064,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8858:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2067,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8873:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2066,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "8873:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2069,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8887:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2068,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "8887:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8857:42:6"
},
"returnParameters": {
"id": 2073,
"nodeType": "ParameterList",
"parameters": [],
"src": "9013:0:6"
},
"scope": 3778,
"src": "8844:720:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2301,
"nodeType": "Block",
"src": "9677:1496:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2144,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "9696:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9696:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2146,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "9710:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "9696:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2148,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9723:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2143,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9688:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9688:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2150,
"nodeType": "ExpressionStatement",
"src": "9688:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2152,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9762:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2154,
"indexExpression": {
"argumentTypes": null,
"id": 2153,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "9771:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9762:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "9762:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2156,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9785:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2151,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9754:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9754:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2158,
"nodeType": "ExpressionStatement",
"src": "9754:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2161,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9819:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2160,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "9820:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9832:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2159,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9811:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9811:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2164,
"nodeType": "ExpressionStatement",
"src": "9811:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2166,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "9870:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2167,
"name": "MIN_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "9880:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9870:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f574549474854",
"id": 2169,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9892:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362",
"typeString": "literal_string \"ERR_MIN_WEIGHT\""
},
"value": "ERR_MIN_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362",
"typeString": "literal_string \"ERR_MIN_WEIGHT\""
}
],
"id": 2165,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9862:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2170,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9862:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2171,
"nodeType": "ExpressionStatement",
"src": "9862:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2173,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "9927:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2174,
"name": "MAX_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 231,
"src": "9937:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9927:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f574549474854",
"id": 2176,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9949:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33",
"typeString": "literal_string \"ERR_MAX_WEIGHT\""
},
"value": "ERR_MAX_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33",
"typeString": "literal_string \"ERR_MAX_WEIGHT\""
}
],
"id": 2172,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9919:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9919:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2178,
"nodeType": "ExpressionStatement",
"src": "9919:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2180,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "9984:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2181,
"name": "MIN_BALANCE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 243,
"src": "9995:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9984:22:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f42414c414e4345",
"id": 2183,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10008:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c",
"typeString": "literal_string \"ERR_MIN_BALANCE\""
},
"value": "ERR_MIN_BALANCE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c",
"typeString": "literal_string \"ERR_MIN_BALANCE\""
}
],
"id": 2179,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9976:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9976:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2185,
"nodeType": "ExpressionStatement",
"src": "9976:50:6"
},
{
"assignments": [
2187
],
"declarations": [
{
"constant": false,
"id": 2187,
"name": "oldWeight",
"nodeType": "VariableDeclaration",
"scope": 2301,
"src": "10082:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2186,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10082:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2192,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2188,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10099:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2190,
"indexExpression": {
"argumentTypes": null,
"id": 2189,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10108:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10099:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2191,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "10099:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10082:39:6"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2195,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2193,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10135:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 2194,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10144:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10135:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2214,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10327:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2215,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10336:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10327:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2228,
"nodeType": "IfStatement",
"src": "10323:107:6",
"trueBody": {
"id": 2227,
"nodeType": "Block",
"src": "10347:83:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2217,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10361:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2219,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10381:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2221,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10400:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2222,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10411:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2220,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10395:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10395:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2218,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10376:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10376:43:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10361:58:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2226,
"nodeType": "ExpressionStatement",
"src": "10361:58:6"
}
]
}
},
"id": 2229,
"nodeType": "IfStatement",
"src": "10131:299:6",
"trueBody": {
"id": 2213,
"nodeType": "Block",
"src": "10155:162:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2196,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10169:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2198,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10189:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2200,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10208:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2201,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10216:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2199,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10203:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10203:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2197,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "10184:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10184:43:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10169:58:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2205,
"nodeType": "ExpressionStatement",
"src": "10169:58:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2207,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10249:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2208,
"name": "MAX_TOTAL_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 236,
"src": "10265:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10249:32:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f544f54414c5f574549474854",
"id": 2210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10283:22:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440",
"typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\""
},
"value": "ERR_MAX_TOTAL_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440",
"typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\""
}
],
"id": 2206,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "10241:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10241:65:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2212,
"nodeType": "ExpressionStatement",
"src": "10241:65:6"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2230,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10447:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2232,
"indexExpression": {
"argumentTypes": null,
"id": 2231,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10456:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10447:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2233,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "10447:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2234,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10472:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10447:31:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2236,
"nodeType": "ExpressionStatement",
"src": "10447:31:6"
},
{
"assignments": [
2238
],
"declarations": [
{
"constant": false,
"id": 2238,
"name": "oldBalance",
"nodeType": "VariableDeclaration",
"scope": 2301,
"src": "10551:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2237,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10551:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2243,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2239,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10569:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2241,
"indexExpression": {
"argumentTypes": null,
"id": 2240,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10578:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10569:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "10569:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10551:41:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2244,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10602:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2246,
"indexExpression": {
"argumentTypes": null,
"id": 2245,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10611:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10602:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2247,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "10602:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2248,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10628:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10602:33:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2250,
"nodeType": "ExpressionStatement",
"src": "10602:33:6"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2253,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2251,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10649:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 2252,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10659:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10649:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2265,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10767:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2266,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10777:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10767:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2299,
"nodeType": "IfStatement",
"src": "10763:404:6",
"trueBody": {
"id": 2298,
"nodeType": "Block",
"src": "10789:378:6",
"statements": [
{
"assignments": [
2269
],
"declarations": [
{
"constant": false,
"id": 2269,
"name": "tokenBalanceWithdrawn",
"nodeType": "VariableDeclaration",
"scope": 2298,
"src": "10880:26:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2268,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10880:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2274,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2271,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10914:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2272,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10926:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2270,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10909:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2273,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10909:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10880:54:6"
},
{
"assignments": [
2276
],
"declarations": [
{
"constant": false,
"id": 2276,
"name": "tokenExitFee",
"nodeType": "VariableDeclaration",
"scope": 2298,
"src": "10948:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2275,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10948:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2281,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2278,
"name": "tokenBalanceWithdrawn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "10973:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2279,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "10996:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2277,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "10968:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2280,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10968:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10948:57:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2283,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "11035:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2284,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "11042:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11042:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2287,
"name": "tokenBalanceWithdrawn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "11059:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2288,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "11082:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2286,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "11054:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11054:41:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2282,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "11019:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2290,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11019:77:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2291,
"nodeType": "ExpressionStatement",
"src": "11019:77:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2293,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "11126:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2294,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "11133:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2295,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "11143:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2292,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "11110:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11110:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2297,
"nodeType": "ExpressionStatement",
"src": "11110:46:6"
}
]
}
},
"id": 2300,
"nodeType": "IfStatement",
"src": "10645:522:6",
"trueBody": {
"id": 2264,
"nodeType": "Block",
"src": "10671:86:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2255,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10701:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2256,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "10708:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "10708:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2259,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10725:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2260,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10734:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2258,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10720:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2261,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10720:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2254,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "10685:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10685:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2263,
"nodeType": "ExpressionStatement",
"src": "10685:61:6"
}
]
}
}
]
},
"documentation": null,
"id": 2302,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2139,
"modifierName": {
"argumentTypes": null,
"id": 2138,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "9651:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "9651:6:6"
},
{
"arguments": null,
"id": 2141,
"modifierName": {
"argumentTypes": null,
"id": 2140,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "9666:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "9666:6:6"
}
],
"name": "rebind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2137,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2132,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9586:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2131,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9586:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2134,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9601:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2133,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "9601:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2136,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9615:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2135,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "9615:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9585:42:6"
},
"returnParameters": {
"id": 2142,
"nodeType": "ParameterList",
"parameters": [],
"src": "9677:0:6"
},
"scope": 3778,
"src": "9570:1603:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2420,
"nodeType": "Block",
"src": "11261:928:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2312,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "11280:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11280:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2314,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "11294:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "11280:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11307:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2311,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11272:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11272:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2318,
"nodeType": "ExpressionStatement",
"src": "11272:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2320,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11346:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2322,
"indexExpression": {
"argumentTypes": null,
"id": 2321,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11355:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11346:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2323,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "11346:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2324,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11369:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2319,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11338:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11338:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2326,
"nodeType": "ExpressionStatement",
"src": "11338:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "11403:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2328,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "11404:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2330,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11416:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2327,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11395:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11395:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2332,
"nodeType": "ExpressionStatement",
"src": "11395:40:6"
},
{
"assignments": [
2334
],
"declarations": [
{
"constant": false,
"id": 2334,
"name": "tokenBalance",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11446:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2333,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11446:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2339,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2335,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11466:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2337,
"indexExpression": {
"argumentTypes": null,
"id": 2336,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11475:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11466:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2338,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "11466:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11446:43:6"
},
{
"assignments": [
2341
],
"declarations": [
{
"constant": false,
"id": 2341,
"name": "tokenExitFee",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11499:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2340,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11499:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2346,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2343,
"name": "tokenBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2334,
"src": "11524:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2344,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "11538:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2342,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "11519:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11519:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11499:48:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2347,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "11558:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2349,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "11578:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2350,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11592:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2352,
"indexExpression": {
"argumentTypes": null,
"id": 2351,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11601:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11592:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2353,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "11592:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2348,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "11573:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11573:42:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11558:57:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2356,
"nodeType": "ExpressionStatement",
"src": "11558:57:6"
},
{
"assignments": [
2358
],
"declarations": [
{
"constant": false,
"id": 2358,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11721:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2357,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11721:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2363,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2359,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11734:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2361,
"indexExpression": {
"argumentTypes": null,
"id": 2360,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11743:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11734:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2362,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "index",
"nodeType": "MemberAccess",
"referencedDeclaration": 1434,
"src": "11734:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11721:34:6"
},
{
"assignments": [
2365
],
"declarations": [
{
"constant": false,
"id": 2365,
"name": "last",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11765:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2364,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11765:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2370,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2366,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11777:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2367,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11777:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 2368,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11794:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "11777:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11765:30:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2377,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2371,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11805:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2373,
"indexExpression": {
"argumentTypes": null,
"id": 2372,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11813:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11805:14:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2374,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11822:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2376,
"indexExpression": {
"argumentTypes": null,
"id": 2375,
"name": "last",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2365,
"src": "11830:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11822:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "11805:30:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2378,
"nodeType": "ExpressionStatement",
"src": "11805:30:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2379,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11845:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2383,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2380,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11854:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2382,
"indexExpression": {
"argumentTypes": null,
"id": 2381,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11862:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11854:14:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11845:24:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2384,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "index",
"nodeType": "MemberAccess",
"referencedDeclaration": 1434,
"src": "11845:30:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2385,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11878:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11845:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2387,
"nodeType": "ExpressionStatement",
"src": "11845:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 2388,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11893:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "pop",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11893:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 2391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11893:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2392,
"nodeType": "ExpressionStatement",
"src": "11893:13:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2393,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11916:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2395,
"indexExpression": {
"argumentTypes": null,
"id": 2394,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11925:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11916:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2397,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11962:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2398,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11988:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2399,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12011:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12035:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2396,
"name": "Record",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1439,
"src": "11934:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$",
"typeString": "type(struct BPool.Record storage pointer)"
}
},
"id": 2401,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"bound",
"index",
"denorm",
"balance"
],
"nodeType": "FunctionCall",
"src": "11934:113:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_memory",
"typeString": "struct BPool.Record memory"
}
},
"src": "11916:131:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2403,
"nodeType": "ExpressionStatement",
"src": "11916:131:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2405,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "12074:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2406,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "12081:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12081:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2409,
"name": "tokenBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2334,
"src": "12098:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2410,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2341,
"src": "12112:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2408,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "12093:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12093:32:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2404,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "12058:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12058:68:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2413,
"nodeType": "ExpressionStatement",
"src": "12058:68:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2415,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "12152:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2416,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "12159:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2417,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2341,
"src": "12169:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2414,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "12136:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12136:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2419,
"nodeType": "ExpressionStatement",
"src": "12136:46:6"
}
]
},
"documentation": null,
"id": 2421,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2307,
"modifierName": {
"argumentTypes": null,
"id": 2306,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "11235:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "11235:6:6"
},
{
"arguments": null,
"id": 2309,
"modifierName": {
"argumentTypes": null,
"id": 2308,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "11250:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "11250:6:6"
}
],
"name": "unbind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2305,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2304,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2421,
"src": "11195:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2303,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11195:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11194:15:6"
},
"returnParameters": {
"id": 2310,
"nodeType": "ParameterList",
"parameters": [],
"src": "11261:0:6"
},
"scope": 3778,
"src": "11179:1010:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2452,
"nodeType": "Block",
"src": "12351:138:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2431,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12369:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2433,
"indexExpression": {
"argumentTypes": null,
"id": 2432,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12378:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12369:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2434,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12369:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2435,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12392:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2430,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12361:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12361:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2437,
"nodeType": "ExpressionStatement",
"src": "12361:47:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2450,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2438,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12418:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2440,
"indexExpression": {
"argumentTypes": null,
"id": 2439,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12427:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12418:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2441,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12418:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2447,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6586,
"src": "12476:4:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
],
"id": 2446,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12468:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12468:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2443,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12451:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2442,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "12444:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 2444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12444:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 2445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 6482,
"src": "12444:23:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 2449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12444:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12418:64:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2451,
"nodeType": "ExpressionStatement",
"src": "12418:64:6"
}
]
},
"documentation": null,
"id": 2453,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2426,
"modifierName": {
"argumentTypes": null,
"id": 2425,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "12325:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12325:6:6"
},
{
"arguments": null,
"id": 2428,
"modifierName": {
"argumentTypes": null,
"id": 2427,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "12340:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12340:6:6"
}
],
"name": "gulp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2424,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2423,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2453,
"src": "12285:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2422,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12285:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12284:15:6"
},
"returnParameters": {
"id": 2429,
"nodeType": "ParameterList",
"parameters": [],
"src": "12351:0:6"
},
"scope": 3778,
"src": "12271:218:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2504,
"nodeType": "Block",
"src": "12630:420:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2465,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12648:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2467,
"indexExpression": {
"argumentTypes": null,
"id": 2466,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2455,
"src": "12657:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12648:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2468,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12648:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2469,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12673:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2464,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12640:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12640:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2471,
"nodeType": "ExpressionStatement",
"src": "12640:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2473,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12707:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2475,
"indexExpression": {
"argumentTypes": null,
"id": 2474,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2457,
"src": "12716:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12707:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2476,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12707:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2477,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12733:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2472,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12699:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12699:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2479,
"nodeType": "ExpressionStatement",
"src": "12699:50:6"
},
{
"assignments": [
2481
],
"declarations": [
{
"constant": false,
"id": 2481,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 2504,
"src": "12759:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2480,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "12759:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2485,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2482,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12785:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2484,
"indexExpression": {
"argumentTypes": null,
"id": 2483,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2455,
"src": "12794:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12785:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12759:43:6"
},
{
"assignments": [
2487
],
"declarations": [
{
"constant": false,
"id": 2487,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 2504,
"src": "12812:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2486,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "12812:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2491,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2488,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12839:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2490,
"indexExpression": {
"argumentTypes": null,
"id": 2489,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2457,
"src": "12848:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12839:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12812:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2493,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2481,
"src": "12901:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2494,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12901:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2495,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2481,
"src": "12932:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2496,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "12932:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2497,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2487,
"src": "12962:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2498,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12962:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2499,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2487,
"src": "12994:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2500,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "12994:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2501,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "13025:8:6",
"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"
}
],
"id": 2492,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "12874:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2502,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12874:169:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2463,
"id": 2503,
"nodeType": "Return",
"src": "12867:176:6"
}
]
},
"documentation": null,
"id": 2505,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2460,
"modifierName": {
"argumentTypes": null,
"id": 2459,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "12582:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12582:10:6"
}
],
"name": "getSpotPrice",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2455,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12517:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12517:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2457,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12534:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2456,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12534:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12516:35:6"
},
"returnParameters": {
"id": 2463,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2462,
"name": "spotPrice",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12610:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2461,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "12610:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12609:16:6"
},
"scope": 3778,
"src": "12495:555:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2556,
"nodeType": "Block",
"src": "13198:413:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2517,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13216:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2519,
"indexExpression": {
"argumentTypes": null,
"id": 2518,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2507,
"src": "13225:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13216:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2520,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "13216:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2521,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13241:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2516,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13208:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13208:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2523,
"nodeType": "ExpressionStatement",
"src": "13208:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2525,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13275:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2527,
"indexExpression": {
"argumentTypes": null,
"id": 2526,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2509,
"src": "13284:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13275:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2528,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "13275:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2529,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13301:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2524,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13267:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13267:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2531,
"nodeType": "ExpressionStatement",
"src": "13267:50:6"
},
{
"assignments": [
2533
],
"declarations": [
{
"constant": false,
"id": 2533,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 2556,
"src": "13327:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2532,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "13327:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2537,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2534,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13353:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2536,
"indexExpression": {
"argumentTypes": null,
"id": 2535,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2507,
"src": "13362:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13353:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13327:43:6"
},
{
"assignments": [
2539
],
"declarations": [
{
"constant": false,
"id": 2539,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 2556,
"src": "13380:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2538,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "13380:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2543,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2540,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13407:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2542,
"indexExpression": {
"argumentTypes": null,
"id": 2541,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2509,
"src": "13416:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13407:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13380:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2545,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2533,
"src": "13469:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2546,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "13469:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2547,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2533,
"src": "13500:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2548,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "13500:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2549,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2539,
"src": "13530:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2550,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "13530:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2551,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2539,
"src": "13562:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2552,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "13562:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2553,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13593:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2544,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "13442:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2554,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13442:162:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2515,
"id": 2555,
"nodeType": "Return",
"src": "13435:169:6"
}
]
},
"documentation": null,
"id": 2557,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2512,
"modifierName": {
"argumentTypes": null,
"id": 2511,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "13150:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13150:10:6"
}
],
"name": "getSpotPriceSansFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2510,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2507,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13085:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2506,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13085:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2509,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13102:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2508,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13102:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13084:35:6"
},
"returnParameters": {
"id": 2515,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2514,
"name": "spotPrice",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13178:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2513,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13178:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13177:16:6"
},
"scope": 3778,
"src": "13056:555:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2679,
"nodeType": "Block",
"src": "13736:806:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2570,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "13754:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 2571,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13766:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 2569,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13746:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13746:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2573,
"nodeType": "ExpressionStatement",
"src": "13746:40:6"
},
{
"assignments": [
2575
],
"declarations": [
{
"constant": false,
"id": 2575,
"name": "poolTotal",
"nodeType": "VariableDeclaration",
"scope": 2679,
"src": "13797:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2574,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13797:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2578,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2576,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4052,
"src": "13814:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2577,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13814:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13797:30:6"
},
{
"assignments": [
2580
],
"declarations": [
{
"constant": false,
"id": 2580,
"name": "ratio",
"nodeType": "VariableDeclaration",
"scope": 2679,
"src": "13837:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2579,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13837:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2585,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2582,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "13855:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2583,
"name": "poolTotal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2575,
"src": "13870:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2581,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "13850:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2584,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13850:30:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13837:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2589,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2587,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2580,
"src": "13898:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2588,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13907:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "13898:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13910:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2586,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13890:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13890:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2592,
"nodeType": "ExpressionStatement",
"src": "13890:38:6"
},
{
"body": {
"id": 2667,
"nodeType": "Block",
"src": "13981:465:6",
"statements": [
{
"assignments": [
2605
],
"declarations": [
{
"constant": false,
"id": 2605,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "13995:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2604,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13995:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2609,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2606,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "14007:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2608,
"indexExpression": {
"argumentTypes": null,
"id": 2607,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "14015:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14007:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13995:22:6"
},
{
"assignments": [
2611
],
"declarations": [
{
"constant": false,
"id": 2611,
"name": "bal",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "14031:8:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2610,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14031:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2616,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2612,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14042:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2614,
"indexExpression": {
"argumentTypes": null,
"id": 2613,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14051:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14042:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2615,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14042:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14031:30:6"
},
{
"assignments": [
2618
],
"declarations": [
{
"constant": false,
"id": 2618,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "14075:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2617,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14075:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2623,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2620,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2580,
"src": "14101:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2621,
"name": "bal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2611,
"src": "14108:3:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2619,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "14096:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14096:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14075:37:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2627,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2625,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14134:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2626,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14151:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "14134:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2628,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14154:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2624,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14126:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2629,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14126:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2630,
"nodeType": "ExpressionStatement",
"src": "14126:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2636,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2632,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14194:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2633,
"name": "maxAmountsIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2562,
"src": "14211:12:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[] calldata"
}
},
"id": 2635,
"indexExpression": {
"argumentTypes": null,
"id": 2634,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "14224:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14211:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "14194:32:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 2637,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14228:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 2631,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14186:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2638,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14186:57:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2639,
"nodeType": "ExpressionStatement",
"src": "14186:57:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2640,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14257:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2642,
"indexExpression": {
"argumentTypes": null,
"id": 2641,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14266:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14257:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2643,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14257:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2645,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14284:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2647,
"indexExpression": {
"argumentTypes": null,
"id": 2646,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14293:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14284:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2648,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14284:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2649,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14305:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2644,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "14279:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2650,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14279:40:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "14257:62:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2652,
"nodeType": "ExpressionStatement",
"src": "14257:62:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2654,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14347:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2655,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14347:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2656,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14359:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2657,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14362:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2653,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "14338:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14338:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2659,
"nodeType": "EmitStatement",
"src": "14333:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2661,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14406:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2662,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14409:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2663,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14409:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2664,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14421:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2660,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "14390:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14390:45:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2666,
"nodeType": "ExpressionStatement",
"src": "14390:45:6"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2600,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2597,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "13956:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2598,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "13960:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "13960:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "13956:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2668,
"initializationExpression": {
"assignments": [
2594
],
"declarations": [
{
"constant": false,
"id": 2594,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2668,
"src": "13944:6:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2593,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13944:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2596,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2595,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13953:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "13944:10:6"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2602,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "13976:3:6",
"subExpression": {
"argumentTypes": null,
"id": 2601,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "13976:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2603,
"nodeType": "ExpressionStatement",
"src": "13976:3:6"
},
"nodeType": "ForStatement",
"src": "13939:507:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2670,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "14470:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2669,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "14455:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2671,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14455:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2672,
"nodeType": "ExpressionStatement",
"src": "14455:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2674,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14509:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14509:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2676,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "14521:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2673,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "14494:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2677,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14494:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2678,
"nodeType": "ExpressionStatement",
"src": "14494:41:6"
}
]
},
"documentation": null,
"id": 2680,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2565,
"modifierName": {
"argumentTypes": null,
"id": 2564,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "13710:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13710:6:6"
},
{
"arguments": null,
"id": 2567,
"modifierName": {
"argumentTypes": null,
"id": 2566,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "13725:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13725:6:6"
}
],
"name": "joinPool",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2563,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2559,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 2680,
"src": "13635:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2558,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13635:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2562,
"name": "maxAmountsIn",
"nodeType": "VariableDeclaration",
"scope": 2680,
"src": "13655:28:6",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2560,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13655:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2561,
"length": null,
"nodeType": "ArrayTypeName",
"src": "13655:6:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13634:50:6"
},
"returnParameters": {
"id": 2568,
"nodeType": "ParameterList",
"parameters": [],
"src": "13736:0:6"
},
"scope": 3778,
"src": "13617:925:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2821,
"nodeType": "Block",
"src": "14667:975:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2693,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "14685:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 2694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14697:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 2692,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14677:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2695,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14677:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2696,
"nodeType": "ExpressionStatement",
"src": "14677:40:6"
},
{
"assignments": [
2698
],
"declarations": [
{
"constant": false,
"id": 2698,
"name": "poolTotal",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14728:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2697,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14728:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2701,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2699,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4052,
"src": "14745:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2700,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14745:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14728:30:6"
},
{
"assignments": [
2703
],
"declarations": [
{
"constant": false,
"id": 2703,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14768:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2702,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14768:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2708,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2705,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "14788:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2706,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "14802:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2704,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "14783:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14783:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14768:43:6"
},
{
"assignments": [
2710
],
"declarations": [
{
"constant": false,
"id": 2710,
"name": "pAiAfterExitFee",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14821:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2709,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14821:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2715,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2712,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "14849:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2713,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2703,
"src": "14863:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2711,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "14844:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14844:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14821:50:6"
},
{
"assignments": [
2717
],
"declarations": [
{
"constant": false,
"id": 2717,
"name": "ratio",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14881:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2716,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14881:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2722,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2719,
"name": "pAiAfterExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2710,
"src": "14899:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2720,
"name": "poolTotal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2698,
"src": "14916:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2718,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "14894:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14894:32:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14881:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2724,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2717,
"src": "14944:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2725,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14953:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "14944:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14956:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2723,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14936:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14936:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2729,
"nodeType": "ExpressionStatement",
"src": "14936:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2731,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15000:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15000:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2733,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "15012:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2730,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "14985:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2734,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14985:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2735,
"nodeType": "ExpressionStatement",
"src": "14985:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2737,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "15050:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2738,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2703,
"src": "15060:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2736,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "15035:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2739,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15035:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2740,
"nodeType": "ExpressionStatement",
"src": "15035:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2742,
"name": "pAiAfterExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2710,
"src": "15093:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2741,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "15078:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15078:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2744,
"nodeType": "ExpressionStatement",
"src": "15078:31:6"
},
{
"body": {
"id": 2819,
"nodeType": "Block",
"src": "15162:473:6",
"statements": [
{
"assignments": [
2757
],
"declarations": [
{
"constant": false,
"id": 2757,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15176:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2756,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15176:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2761,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2758,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "15188:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2760,
"indexExpression": {
"argumentTypes": null,
"id": 2759,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15196:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15188:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15176:22:6"
},
{
"assignments": [
2763
],
"declarations": [
{
"constant": false,
"id": 2763,
"name": "bal",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15212:8:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2762,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15212:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2768,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2764,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15223:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2766,
"indexExpression": {
"argumentTypes": null,
"id": 2765,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15232:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15223:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2767,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15223:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15212:30:6"
},
{
"assignments": [
2770
],
"declarations": [
{
"constant": false,
"id": 2770,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15256:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2769,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15256:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2775,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2772,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2717,
"src": "15283:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2773,
"name": "bal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2763,
"src": "15290:3:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2771,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "15278:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15278:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15256:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2779,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2777,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15316:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2778,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15334:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "15316:19:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2780,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15337:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2776,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15308:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2781,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15308:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2782,
"nodeType": "ExpressionStatement",
"src": "15308:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2788,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2784,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15377:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2785,
"name": "minAmountsOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "15395:13:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[] calldata"
}
},
"id": 2787,
"indexExpression": {
"argumentTypes": null,
"id": 2786,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15409:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15395:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15377:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 2789,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15413:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 2783,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15369:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2790,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15369:60:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2791,
"nodeType": "ExpressionStatement",
"src": "15369:60:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2792,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15443:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2794,
"indexExpression": {
"argumentTypes": null,
"id": 2793,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15452:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15443:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2795,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15443:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2797,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15470:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2799,
"indexExpression": {
"argumentTypes": null,
"id": 2798,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15479:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15470:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2800,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15470:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2801,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15491:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2796,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "15465:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15465:41:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15443:63:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2804,
"nodeType": "ExpressionStatement",
"src": "15443:63:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2806,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15534:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15534:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2808,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15546:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2809,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15549:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2805,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "15525:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2810,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15525:39:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2811,
"nodeType": "EmitStatement",
"src": "15520:44:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2813,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15594:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2814,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15597:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2815,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15597:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2816,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15609:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2812,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "15578:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2817,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15578:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2818,
"nodeType": "ExpressionStatement",
"src": "15578:46:6"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2752,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2749,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15137:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2750,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "15141:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2751,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15141:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15137:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2820,
"initializationExpression": {
"assignments": [
2746
],
"declarations": [
{
"constant": false,
"id": 2746,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2820,
"src": "15125:6:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2745,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15125:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2748,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2747,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15134:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "15125:10:6"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "15157:3:6",
"subExpression": {
"argumentTypes": null,
"id": 2753,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15157:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2755,
"nodeType": "ExpressionStatement",
"src": "15157:3:6"
},
"nodeType": "ForStatement",
"src": "15120:515:6"
}
]
},
"documentation": null,
"id": 2822,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2688,
"modifierName": {
"argumentTypes": null,
"id": 2687,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "14641:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "14641:6:6"
},
{
"arguments": null,
"id": 2690,
"modifierName": {
"argumentTypes": null,
"id": 2689,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "14656:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "14656:6:6"
}
],
"name": "exitPool",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2682,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 2822,
"src": "14566:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2681,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14566:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2685,
"name": "minAmountsOut",
"nodeType": "VariableDeclaration",
"scope": 2822,
"src": "14585:29:6",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2683,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14585:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2684,
"length": null,
"nodeType": "ArrayTypeName",
"src": "14585:6:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "14565:50:6"
},
"returnParameters": {
"id": 2691,
"nodeType": "ParameterList",
"parameters": [],
"src": "14667:0:6"
},
"scope": 3778,
"src": "14548:1094:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3019,
"nodeType": "Block",
"src": "15921:1921:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2844,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15940:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2846,
"indexExpression": {
"argumentTypes": null,
"id": 2845,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "15949:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15940:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2847,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "15940:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2848,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15965:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2843,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15932:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2849,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15932:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2850,
"nodeType": "ExpressionStatement",
"src": "15932:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2852,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15999:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2854,
"indexExpression": {
"argumentTypes": null,
"id": 2853,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "16008:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15999:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2855,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "15999:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2856,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16025:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2851,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15991:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2857,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15991:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2858,
"nodeType": "ExpressionStatement",
"src": "15991:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2860,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "16059:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f535741505f4e4f545f5055424c4943",
"id": 2861,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16072:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
},
"value": "ERR_SWAP_NOT_PUBLIC"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
}
],
"id": 2859,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16051:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16051:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2863,
"nodeType": "ExpressionStatement",
"src": "16051:43:6"
},
{
"assignments": [
2865
],
"declarations": [
{
"constant": false,
"id": 2865,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16105:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2864,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "16105:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2871,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2866,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "16131:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2870,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2868,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "16148:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2867,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16140:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16140:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "16131:26:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16105:52:6"
},
{
"assignments": [
2873
],
"declarations": [
{
"constant": false,
"id": 2873,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16167:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2872,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "16167:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2879,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2874,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "16194:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2878,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2876,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "16211:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2875,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16203:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16203:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "16194:27:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16167:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2881,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16253:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2883,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16275:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2884,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16275:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2885,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "16293:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2882,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "16270:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16270:36:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16253:53:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 2888,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16321:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 2880,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16232:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2889,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16232:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2890,
"nodeType": "ExpressionStatement",
"src": "16232:117:6"
},
{
"assignments": [
2892
],
"declarations": [
{
"constant": false,
"id": 2892,
"name": "spotPriceBefore",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16360:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2891,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "16360:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2904,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2894,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16410:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2895,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16410:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2896,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16440:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2897,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16440:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2898,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16469:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2899,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16469:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2900,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16500:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2901,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16500:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2902,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "16530:8:6",
"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"
}
],
"id": 2893,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "16383:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2903,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16383:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16360:188:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2908,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2906,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "16566:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2907,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2832,
"src": "16585:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16566:27:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4241445f4c494d49545f5052494345",
"id": 2909,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16595:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
},
"value": "ERR_BAD_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
}
],
"id": 2905,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16558:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2910,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16558:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2911,
"nodeType": "ExpressionStatement",
"src": "16558:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2912,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "16628:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2914,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16673:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2915,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16673:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2916,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16703:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2917,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16703:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2918,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16732:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2919,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16732:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2920,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16763:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2921,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16763:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2922,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16793:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2923,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "16820:8:6",
"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"
}
],
"id": 2913,
"name": "calcOutGivenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 510,
"src": "16645:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 2924,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16645:193:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16628:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2926,
"nodeType": "ExpressionStatement",
"src": "16628:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2930,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2928,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "16856:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2929,
"name": "minAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2830,
"src": "16874:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16856:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 2931,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16888:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 2927,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16848:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2932,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16848:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2933,
"nodeType": "ExpressionStatement",
"src": "16848:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2934,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16915:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2936,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16915:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2938,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16939:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2939,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16939:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2940,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16957:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2937,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "16934:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2941,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16934:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16915:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2943,
"nodeType": "ExpressionStatement",
"src": "16915:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2952,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2944,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16981:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2946,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16981:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2948,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17006:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2949,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17006:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2950,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17025:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2947,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "17001:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2951,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17001:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16981:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2953,
"nodeType": "ExpressionStatement",
"src": "16981:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2966,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2954,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17051:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2956,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "17095:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2957,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17095:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2958,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "17125:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2959,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "17125:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2960,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17154:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2961,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17154:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2962,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17185:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2963,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "17185:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2964,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "17215:8:6",
"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"
}
],
"id": 2955,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "17068:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2965,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17068:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17051:182:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2967,
"nodeType": "ExpressionStatement",
"src": "17051:182:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2971,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2969,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17251:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2970,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "17269:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17251:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2972,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17286:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2968,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17243:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2973,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17243:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2974,
"nodeType": "ExpressionStatement",
"src": "17243:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2978,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2976,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17327:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2977,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2832,
"src": "17345:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17327:26:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f5052494345",
"id": 2979,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17355:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
},
"value": "ERR_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
}
],
"id": 2975,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17319:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2980,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17319:54:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2981,
"nodeType": "ExpressionStatement",
"src": "17319:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2983,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "17404:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2985,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17428:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2986,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17443:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2984,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "17423:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17423:35:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17404:54:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2989,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17473:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2982,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17383:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2990,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17383:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2991,
"nodeType": "ExpressionStatement",
"src": "17383:117:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2993,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17538:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2994,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17538:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2995,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "17563:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2996,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "17585:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2997,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17608:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2998,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17636:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2992,
"name": "LOG_SWAP",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1451,
"src": "17516:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,address,address,uint256,uint256)"
}
},
"id": 2999,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17516:144:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3000,
"nodeType": "EmitStatement",
"src": "17511:149:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3002,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "17687:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3003,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17696:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17696:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3005,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17708:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3001,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "17671:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3006,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17671:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3007,
"nodeType": "ExpressionStatement",
"src": "17671:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3009,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "17748:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3010,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17758:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3011,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17758:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3012,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17770:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3008,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "17732:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3013,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17732:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3014,
"nodeType": "ExpressionStatement",
"src": "17732:53:6"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3015,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17804:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3016,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17820:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3017,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "17803:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 2842,
"id": 3018,
"nodeType": "Return",
"src": "17796:39:6"
}
]
},
"documentation": null,
"id": 3020,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2835,
"modifierName": {
"argumentTypes": null,
"id": 2834,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "15836:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "15836:6:6"
},
{
"arguments": null,
"id": 2837,
"modifierName": {
"argumentTypes": null,
"id": 2836,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "15851:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "15851:6:6"
}
],
"name": "swapExactAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2833,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2824,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15685:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2823,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15685:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2826,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15710:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2825,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15710:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2828,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15738:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2827,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15738:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2830,
"name": "minAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15764:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2829,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15764:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2832,
"name": "maxPrice",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15791:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2831,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15791:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "15675:135:6"
},
"returnParameters": {
"id": 2842,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2839,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15875:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2838,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15875:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2841,
"name": "spotPriceAfter",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15896:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2840,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15896:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "15874:42:6"
},
"scope": 3778,
"src": "15649:2193:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3217,
"nodeType": "Block",
"src": "18121:1924:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3042,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18139:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3044,
"indexExpression": {
"argumentTypes": null,
"id": 3043,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "18148:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18139:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3045,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "18139:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3046,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18164:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3041,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18131:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18131:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3048,
"nodeType": "ExpressionStatement",
"src": "18131:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3050,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18198:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3052,
"indexExpression": {
"argumentTypes": null,
"id": 3051,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "18207:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18198:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3053,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "18198:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3054,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18224:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3049,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18190:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18190:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3056,
"nodeType": "ExpressionStatement",
"src": "18190:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3058,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "18258:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f535741505f4e4f545f5055424c4943",
"id": 3059,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18271:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
},
"value": "ERR_SWAP_NOT_PUBLIC"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
}
],
"id": 3057,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18250:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18250:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3061,
"nodeType": "ExpressionStatement",
"src": "18250:43:6"
},
{
"assignments": [
3063
],
"declarations": [
{
"constant": false,
"id": 3063,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18304:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3062,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "18304:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3069,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3064,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18330:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3068,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3066,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "18347:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3065,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18339:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3067,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18339:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18330:26:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18304:52:6"
},
{
"assignments": [
3071
],
"declarations": [
{
"constant": false,
"id": 3071,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18366:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3070,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "18366:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3077,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3072,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18393:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3076,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3074,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "18410:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3073,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18402:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3075,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18402:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18393:27:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18366:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3079,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "18452:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3081,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18475:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3082,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18475:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3083,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "18494:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3080,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "18470:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3084,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18470:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18452:56:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3086,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18523:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3078,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18431:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18431:121:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3088,
"nodeType": "ExpressionStatement",
"src": "18431:121:6"
},
{
"assignments": [
3090
],
"declarations": [
{
"constant": false,
"id": 3090,
"name": "spotPriceBefore",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18563:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3089,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18563:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3102,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3092,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18613:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3093,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18613:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3094,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18643:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3095,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18643:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3096,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18672:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3097,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18672:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3098,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18703:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3099,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18703:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3100,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "18733:8:6",
"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"
}
],
"id": 3091,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "18586:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18586:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18563:188:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3104,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "18778:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3105,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3030,
"src": "18797:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18778:27:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4241445f4c494d49545f5052494345",
"id": 3107,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18807:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
},
"value": "ERR_BAD_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
}
],
"id": 3103,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18770:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18770:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3109,
"nodeType": "ExpressionStatement",
"src": "18770:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3110,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "18840:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3112,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18884:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3113,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18884:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3114,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18914:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3115,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18914:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3116,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18943:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3117,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18943:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3118,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18974:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3119,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18974:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3120,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19004:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3121,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "19032:8:6",
"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"
}
],
"id": 3111,
"name": "calcInGivenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 582,
"src": "18856:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18856:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18840:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3124,
"nodeType": "ExpressionStatement",
"src": "18840:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3126,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19068:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3127,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3024,
"src": "19085:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19068:28:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19098:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3125,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19060:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19060:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3131,
"nodeType": "ExpressionStatement",
"src": "19060:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3132,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19124:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3134,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19124:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3136,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19148:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3137,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19148:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3138,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19166:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3135,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "19143:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19143:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19124:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3141,
"nodeType": "ExpressionStatement",
"src": "19124:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3142,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19190:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3144,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19190:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3146,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19215:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3147,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19215:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3148,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19234:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3145,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "19210:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19210:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19190:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3151,
"nodeType": "ExpressionStatement",
"src": "19190:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3164,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3152,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19260:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3154,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19304:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19304:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3156,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19334:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3157,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "19334:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3158,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19363:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3159,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19363:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3160,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19394:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3161,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "19394:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3162,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "19424:8:6",
"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"
}
],
"id": 3153,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "19277:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19277:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19260:182:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3165,
"nodeType": "ExpressionStatement",
"src": "19260:182:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3167,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19460:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3168,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "19478:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19460:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3170,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19495:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3166,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19452:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19452:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3172,
"nodeType": "ExpressionStatement",
"src": "19452:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3174,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19531:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3175,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3030,
"src": "19549:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19531:26:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f5052494345",
"id": 3177,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19559:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
},
"value": "ERR_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
}
],
"id": 3173,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19523:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3178,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19523:54:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3179,
"nodeType": "ExpressionStatement",
"src": "19523:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3186,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3181,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "19608:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3183,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19632:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3184,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19647:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3182,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "19627:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19627:35:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19608:54:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3187,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19677:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3180,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19587:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19587:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3189,
"nodeType": "ExpressionStatement",
"src": "19587:117:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3191,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19742:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3192,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19742:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3193,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "19767:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3194,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "19789:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3195,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19812:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3196,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19840:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3190,
"name": "LOG_SWAP",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1451,
"src": "19720:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,address,address,uint256,uint256)"
}
},
"id": 3197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19720:144:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3198,
"nodeType": "EmitStatement",
"src": "19715:149:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3200,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "19891:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3201,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19900:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19900:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3203,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19912:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3199,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "19875:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19875:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3205,
"nodeType": "ExpressionStatement",
"src": "19875:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3207,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "19952:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3208,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19962:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19962:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3210,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19974:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3206,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "19936:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19936:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3212,
"nodeType": "ExpressionStatement",
"src": "19936:53:6"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3213,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "20008:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3214,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "20023:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3215,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "20007:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 3040,
"id": 3216,
"nodeType": "Return",
"src": "20000:38:6"
}
]
},
"documentation": null,
"id": 3218,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3033,
"modifierName": {
"argumentTypes": null,
"id": 3032,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "18036:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "18036:6:6"
},
{
"arguments": null,
"id": 3035,
"modifierName": {
"argumentTypes": null,
"id": 3034,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "18051:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "18051:6:6"
}
],
"name": "swapExactAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3031,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3022,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17885:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3021,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "17885:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3024,
"name": "maxAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17910:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3023,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17910:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3026,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17936:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3025,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "17936:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3028,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17962:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3027,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17962:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3030,
"name": "maxPrice",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17991:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3029,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17991:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "17875:135:6"
},
"returnParameters": {
"id": 3040,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3037,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "18076:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3036,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18076:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3039,
"name": "spotPriceAfter",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "18096:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3038,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18096:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18075:41:6"
},
"scope": 3778,
"src": "17848:2197:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3321,
"nodeType": "Block",
"src": "20265:915:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3234,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "20291:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3235,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20303:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3233,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20283:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20283:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3237,
"nodeType": "ExpressionStatement",
"src": "20283:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3239,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20341:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3241,
"indexExpression": {
"argumentTypes": null,
"id": 3240,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20350:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20341:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "20341:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3243,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20366:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3238,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20333:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20333:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3245,
"nodeType": "ExpressionStatement",
"src": "20333:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3247,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20413:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3249,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20435:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3251,
"indexExpression": {
"argumentTypes": null,
"id": 3250,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20444:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20435:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3252,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20435:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3253,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "20462:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3248,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "20430:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3254,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20430:45:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20413:62:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 3256,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20490:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 3246,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20392:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20392:126:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3258,
"nodeType": "ExpressionStatement",
"src": "20392:126:6"
},
{
"assignments": [
3260
],
"declarations": [
{
"constant": false,
"id": 3260,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3321,
"src": "20529:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3259,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "20529:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3264,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3261,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20555:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3263,
"indexExpression": {
"argumentTypes": null,
"id": 3262,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20564:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20555:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "20529:43:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3276,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3265,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "20583:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3267,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20637:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3268,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20637:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3269,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20667:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3270,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "20667:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3271,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "20696:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3272,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "20722:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3273,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20748:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3274,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "20775:8:6",
"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"
}
],
"id": 3266,
"name": "calcPoolOutGivenSingleIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 664,
"src": "20599:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20599:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20583:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3277,
"nodeType": "ExpressionStatement",
"src": "20583:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3279,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "20812:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3280,
"name": "minPoolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3224,
"src": "20829:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20812:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 3282,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20847:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 3278,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20804:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20804:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3284,
"nodeType": "ExpressionStatement",
"src": "20804:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3285,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20874:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3287,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20874:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3289,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20898:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3290,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20898:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3291,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20916:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3288,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "20893:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20893:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20874:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3294,
"nodeType": "ExpressionStatement",
"src": "20874:56:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3296,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "20955:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3297,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "20955:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3298,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20967:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3299,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20976:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3295,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "20946:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3300,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20946:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3301,
"nodeType": "EmitStatement",
"src": "20941:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3303,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21016:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3302,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "21001:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21001:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3305,
"nodeType": "ExpressionStatement",
"src": "21001:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3307,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "21055:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3308,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "21055:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3309,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21067:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3306,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "21040:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3310,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21040:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3311,
"nodeType": "ExpressionStatement",
"src": "21040:41:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3313,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "21107:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3314,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "21116:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "21116:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3316,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "21128:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3312,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "21091:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21091:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3318,
"nodeType": "ExpressionStatement",
"src": "21091:51:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3319,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21160:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3232,
"id": 3320,
"nodeType": "Return",
"src": "21153:20:6"
}
]
},
"documentation": null,
"id": 3322,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3227,
"modifierName": {
"argumentTypes": null,
"id": 3226,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "20201:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "20201:6:6"
},
{
"arguments": null,
"id": 3229,
"modifierName": {
"argumentTypes": null,
"id": 3228,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "20216:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "20216:6:6"
}
],
"name": "joinswapExternAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3225,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3220,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20093:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3219,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "20093:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3222,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20119:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3221,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20119:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3224,
"name": "minPoolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20148:21:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3223,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20148:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "20083:92:6"
},
"returnParameters": {
"id": 3232,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3231,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20240:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3230,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20240:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "20239:20:6"
},
"scope": 3778,
"src": "20052:1128:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3432,
"nodeType": "Block",
"src": "21392:966:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3338,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "21410:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21422:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3337,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21402:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21402:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3341,
"nodeType": "ExpressionStatement",
"src": "21402:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3343,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21460:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3345,
"indexExpression": {
"argumentTypes": null,
"id": 3344,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21469:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21460:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3346,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "21460:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3347,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21485:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3342,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21452:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3348,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21452:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3349,
"nodeType": "ExpressionStatement",
"src": "21452:49:6"
},
{
"assignments": [
3351
],
"declarations": [
{
"constant": false,
"id": 3351,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3432,
"src": "21512:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3350,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "21512:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3355,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3352,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21538:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3354,
"indexExpression": {
"argumentTypes": null,
"id": 3353,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21547:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21538:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "21512:43:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3356,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21566:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3358,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "21620:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3359,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "21620:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3360,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "21650:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3361,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "21650:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3362,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "21679:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3363,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "21705:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3364,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "21731:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3365,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "21758:8:6",
"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"
}
],
"id": 3357,
"name": "calcSingleInGivenPoolOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 753,
"src": "21582:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21582:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21566:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3368,
"nodeType": "ExpressionStatement",
"src": "21566:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3370,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21795:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3371,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21812:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "21795:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3373,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21815:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3369,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21787:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21787:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3375,
"nodeType": "ExpressionStatement",
"src": "21787:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3379,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3377,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21851:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3378,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3328,
"src": "21868:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21851:28:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3380,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21881:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3376,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21843:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21843:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3382,
"nodeType": "ExpressionStatement",
"src": "21843:53:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3392,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3384,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21936:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3386,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21958:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3388,
"indexExpression": {
"argumentTypes": null,
"id": 3387,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21967:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21958:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3389,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "21958:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3390,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "21985:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3385,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "21953:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21953:45:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21936:62:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22013:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 3383,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21915:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21915:126:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3395,
"nodeType": "ExpressionStatement",
"src": "21915:126:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3396,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "22052:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3398,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22052:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3400,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "22076:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3401,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22076:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3402,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22094:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3399,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "22071:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22071:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22052:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3405,
"nodeType": "ExpressionStatement",
"src": "22052:56:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3407,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22133:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22133:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3409,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "22145:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3410,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22154:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3406,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "22124:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22124:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3412,
"nodeType": "EmitStatement",
"src": "22119:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3414,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "22194:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3413,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "22179:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3415,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22179:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3416,
"nodeType": "ExpressionStatement",
"src": "22179:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3418,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22233:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3419,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22233:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3420,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "22245:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3417,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "22218:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22218:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3422,
"nodeType": "ExpressionStatement",
"src": "22218:41:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3424,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "22285:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3425,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22294:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22294:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3427,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22306:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3423,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "22269:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22269:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3429,
"nodeType": "ExpressionStatement",
"src": "22269:51:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3430,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22338:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3336,
"id": 3431,
"nodeType": "Return",
"src": "22331:20:6"
}
]
},
"documentation": null,
"id": 3433,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3331,
"modifierName": {
"argumentTypes": null,
"id": 3330,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "21329:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "21329:6:6"
},
{
"arguments": null,
"id": 3333,
"modifierName": {
"argumentTypes": null,
"id": 3332,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "21344:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "21344:6:6"
}
],
"name": "joinswapPoolAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3329,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3324,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21226:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3323,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "21226:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3326,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21252:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3325,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21252:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3328,
"name": "maxAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21281:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3327,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21281:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "21216:87:6"
},
"returnParameters": {
"id": 3336,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3335,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21368:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3334,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21368:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "21367:20:6"
},
"scope": 3778,
"src": "21186:1172:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3551,
"nodeType": "Block",
"src": "22571:1040:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3449,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "22589:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3450,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22601:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3448,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22581:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22581:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3452,
"nodeType": "ExpressionStatement",
"src": "22581:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3454,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "22639:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3456,
"indexExpression": {
"argumentTypes": null,
"id": 3455,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "22648:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "22639:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3457,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "22639:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3458,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22665:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3453,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22631:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3459,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22631:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3460,
"nodeType": "ExpressionStatement",
"src": "22631:50:6"
},
{
"assignments": [
3462
],
"declarations": [
{
"constant": false,
"id": 3462,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3551,
"src": "22692:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3461,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "22692:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3466,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3463,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "22719:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3465,
"indexExpression": {
"argumentTypes": null,
"id": 3464,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "22728:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "22719:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "22692:45:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3467,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "22748:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3469,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "22803:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3470,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22803:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3471,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "22834:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3472,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "22834:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3473,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "22864:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3474,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "22890:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3475,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "22916:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3476,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "22942:8:6",
"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"
}
],
"id": 3468,
"name": "calcSingleOutGivenPoolIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 848,
"src": "22765:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22765:195:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22748:212:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3479,
"nodeType": "ExpressionStatement",
"src": "22748:212:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3481,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "22979:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3482,
"name": "minAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3439,
"src": "22997:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22979:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 3484,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23011:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 3480,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22971:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22971:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3486,
"nodeType": "ExpressionStatement",
"src": "22971:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3488,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23067:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3490,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23090:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3492,
"indexExpression": {
"argumentTypes": null,
"id": 3491,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23099:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23090:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3493,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23090:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3494,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "23118:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3489,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23085:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23085:47:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23067:65:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23147:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3487,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23046:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3498,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23046:130:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3499,
"nodeType": "ExpressionStatement",
"src": "23046:130:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3500,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "23187:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3502,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23187:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3504,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "23212:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3505,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23212:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3506,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23231:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3503,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "23207:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23207:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23187:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3509,
"nodeType": "ExpressionStatement",
"src": "23187:59:6"
},
{
"assignments": [
3511
],
"declarations": [
{
"constant": false,
"id": 3511,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 3551,
"src": "23257:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3510,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23257:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3516,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3513,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23277:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3514,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "23291:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3512,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23272:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3515,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23272:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "23257:43:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3518,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23325:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23325:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3520,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23337:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3521,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23347:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3517,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "23316:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23316:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3523,
"nodeType": "EmitStatement",
"src": "23311:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3525,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23388:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23388:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3527,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23400:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3524,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "23373:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23373:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3529,
"nodeType": "ExpressionStatement",
"src": "23373:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3532,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23443:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3533,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3511,
"src": "23457:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3531,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "23438:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23438:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3530,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "23423:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23423:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3536,
"nodeType": "ExpressionStatement",
"src": "23423:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3538,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "23491:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3539,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3511,
"src": "23501:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3537,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "23476:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23476:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3541,
"nodeType": "ExpressionStatement",
"src": "23476:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3543,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23535:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3544,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23545:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23545:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3546,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23557:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3542,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "23519:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23519:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3548,
"nodeType": "ExpressionStatement",
"src": "23519:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3549,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23590:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3447,
"id": 3550,
"nodeType": "Return",
"src": "23583:21:6"
}
]
},
"documentation": null,
"id": 3552,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3442,
"modifierName": {
"argumentTypes": null,
"id": 3441,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "22507:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "22507:6:6"
},
{
"arguments": null,
"id": 3444,
"modifierName": {
"argumentTypes": null,
"id": 3443,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "22522:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "22522:6:6"
}
],
"name": "exitswapPoolAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3440,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3435,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22403:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3434,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "22403:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3437,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22430:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3436,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22430:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3439,
"name": "minAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22458:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3438,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22458:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "22393:88:6"
},
"returnParameters": {
"id": 3447,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3446,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22546:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3445,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22546:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "22545:21:6"
},
"scope": 3778,
"src": "22364:1247:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3677,
"nodeType": "Block",
"src": "23830:1092:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3568,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "23848:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3569,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23860:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3567,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23840:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3570,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23840:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3571,
"nodeType": "ExpressionStatement",
"src": "23840:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3573,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23898:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3575,
"indexExpression": {
"argumentTypes": null,
"id": 3574,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "23907:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23898:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3576,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "23898:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3577,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23924:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3572,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23890:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3578,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23890:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3579,
"nodeType": "ExpressionStatement",
"src": "23890:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3589,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3581,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "23971:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3583,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23994:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3585,
"indexExpression": {
"argumentTypes": null,
"id": 3584,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24003:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23994:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3586,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23994:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3587,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "24022:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3582,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23989:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3588,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23989:47:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23971:65:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24051:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3580,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23950:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23950:130:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3592,
"nodeType": "ExpressionStatement",
"src": "23950:130:6"
},
{
"assignments": [
3594
],
"declarations": [
{
"constant": false,
"id": 3594,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3677,
"src": "24091:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3593,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "24091:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3598,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3595,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "24118:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3597,
"indexExpression": {
"argumentTypes": null,
"id": 3596,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24127:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "24118:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "24091:45:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3599,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24147:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3601,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24200:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3602,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24200:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3603,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24231:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3604,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "24231:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3605,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "24261:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3606,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "24287:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3607,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24313:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3608,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "24341:8:6",
"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"
}
],
"id": 3600,
"name": "calcPoolInGivenSingleOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 944,
"src": "24162:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24162:197:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24147:212:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3611,
"nodeType": "ExpressionStatement",
"src": "24147:212:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3615,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3613,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24378:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3614,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24394:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "24378:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3616,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24397:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3612,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "24370:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24370:45:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3618,
"nodeType": "ExpressionStatement",
"src": "24370:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3620,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24433:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3621,
"name": "maxPoolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3558,
"src": "24449:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24433:31:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3623,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24466:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3619,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "24425:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24425:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3625,
"nodeType": "ExpressionStatement",
"src": "24425:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3634,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3626,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24492:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3628,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24492:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3630,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24517:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3631,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24517:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3632,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24536:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3629,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "24512:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3633,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24512:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24492:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3635,
"nodeType": "ExpressionStatement",
"src": "24492:59:6"
},
{
"assignments": [
3637
],
"declarations": [
{
"constant": false,
"id": 3637,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 3677,
"src": "24562:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3636,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "24562:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3642,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3639,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24582:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3640,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "24596:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3638,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "24577:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3641,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24577:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "24562:43:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3644,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24630:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24630:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3646,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24642:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3647,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24652:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3643,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "24621:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24621:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3649,
"nodeType": "EmitStatement",
"src": "24616:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3651,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24693:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3652,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24693:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3653,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24705:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3650,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "24678:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24678:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3655,
"nodeType": "ExpressionStatement",
"src": "24678:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3658,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24748:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3659,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "24762:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3657,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "24743:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3660,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24743:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3656,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "24728:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3661,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24728:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3662,
"nodeType": "ExpressionStatement",
"src": "24728:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3664,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "24796:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3665,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "24806:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3663,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "24781:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3666,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24781:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3667,
"nodeType": "ExpressionStatement",
"src": "24781:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3669,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24840:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3670,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24850:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3671,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24850:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3672,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24862:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3668,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "24824:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3673,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24824:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3674,
"nodeType": "ExpressionStatement",
"src": "24824:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3675,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24903:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3566,
"id": 3676,
"nodeType": "Return",
"src": "24896:19:6"
}
]
},
"documentation": null,
"id": 3678,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3561,
"modifierName": {
"argumentTypes": null,
"id": 3560,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "23768:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "23768:6:6"
},
{
"arguments": null,
"id": 3563,
"modifierName": {
"argumentTypes": null,
"id": 3562,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "23783:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "23783:6:6"
}
],
"name": "exitswapExternAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3559,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3554,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23659:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3553,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "23659:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3556,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23686:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3555,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23686:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3558,
"name": "maxPoolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23716:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3557,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23716:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "23649:93:6"
},
"returnParameters": {
"id": 3566,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3565,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23807:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3564,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23807:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "23806:19:6"
},
"scope": 3778,
"src": "23617:1305:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3705,
"nodeType": "Block",
"src": "25176:126:6",
"statements": [
{
"assignments": [
3688
],
"declarations": [
{
"constant": false,
"id": 3688,
"name": "xfer",
"nodeType": "VariableDeclaration",
"scope": 3705,
"src": "25186:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3687,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "25186:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3699,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3693,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3682,
"src": "25225:4:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3695,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6586,
"src": "25239:4:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
],
"id": 3694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "25231:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3696,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25231:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3697,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3684,
"src": "25246:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3690,
"name": "erc20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3680,
"src": "25205:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3689,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "25198:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 3691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25198:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 3692,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferFrom",
"nodeType": "MemberAccess",
"referencedDeclaration": 6520,
"src": "25198:26:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,address,uint256) external returns (bool)"
}
},
"id": 3698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25198:55:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "25186:67:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3701,
"name": "xfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3688,
"src": "25271:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f45524332305f46414c5345",
"id": 3702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "25277:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
},
"value": "ERR_ERC20_FALSE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
}
],
"id": 3700,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "25263:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3703,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25263:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3704,
"nodeType": "ExpressionStatement",
"src": "25263:32:6"
}
]
},
"documentation": null,
"id": 3706,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pullUnderlying",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3685,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3680,
"name": "erc20",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25113:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25113:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3682,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25128:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3681,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25128:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3684,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25142:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3683,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25142:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25112:42:6"
},
"returnParameters": {
"id": 3686,
"nodeType": "ParameterList",
"parameters": [],
"src": "25176:0:6"
},
"scope": 3778,
"src": "25088:214:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3730,
"nodeType": "Block",
"src": "25394:105:6",
"statements": [
{
"assignments": [
3716
],
"declarations": [
{
"constant": false,
"id": 3716,
"name": "xfer",
"nodeType": "VariableDeclaration",
"scope": 3730,
"src": "25404:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3715,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "25404:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3724,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3721,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3710,
"src": "25439:2:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3722,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3712,
"src": "25443:6:6",
"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": 3718,
"name": "erc20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3708,
"src": "25423:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3717,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "25416:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 3719,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25416:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 3720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 6491,
"src": "25416:22:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) external returns (bool)"
}
},
"id": 3723,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25416:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "25404:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3726,
"name": "xfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3716,
"src": "25468:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f45524332305f46414c5345",
"id": 3727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "25474:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
},
"value": "ERR_ERC20_FALSE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
}
],
"id": 3725,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "25460:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25460:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3729,
"nodeType": "ExpressionStatement",
"src": "25460:32:6"
}
]
},
"documentation": null,
"id": 3731,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pushUnderlying",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3713,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3708,
"name": "erc20",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25333:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3707,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25333:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3710,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25348:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3709,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25348:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3712,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25360:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3711,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25360:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25332:40:6"
},
"returnParameters": {
"id": 3714,
"nodeType": "ParameterList",
"parameters": [],
"src": "25394:0:6"
},
"scope": 3778,
"src": "25308:191:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3743,
"nodeType": "Block",
"src": "25577:36:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3739,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3733,
"src": "25593:4:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3740,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3735,
"src": "25599:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3738,
"name": "_pull",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3978,
"src": "25587:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25587:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3742,
"nodeType": "ExpressionStatement",
"src": "25587:19:6"
}
]
},
"documentation": null,
"id": 3744,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pullPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3733,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 3744,
"src": "25529:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25529:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3735,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3744,
"src": "25543:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3734,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25543:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25528:27:6"
},
"returnParameters": {
"id": 3737,
"nodeType": "ParameterList",
"parameters": [],
"src": "25577:0:6"
},
"scope": 3778,
"src": "25505:108:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3756,
"nodeType": "Block",
"src": "25689:34:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3752,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3746,
"src": "25705:2:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3753,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3748,
"src": "25709:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3751,
"name": "_push",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3962,
"src": "25699:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25699:17:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3755,
"nodeType": "ExpressionStatement",
"src": "25699:17:6"
}
]
},
"documentation": null,
"id": 3757,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pushPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3749,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3746,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3757,
"src": "25643:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3745,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25643:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3748,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3757,
"src": "25655:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3747,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25655:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25642:25:6"
},
"returnParameters": {
"id": 3750,
"nodeType": "ParameterList",
"parameters": [],
"src": "25689:0:6"
},
"scope": 3778,
"src": "25619:104:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3766,
"nodeType": "Block",
"src": "25787:30:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3763,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3759,
"src": "25803:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3762,
"name": "_mint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3850,
"src": "25797:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3764,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25797:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3765,
"nodeType": "ExpressionStatement",
"src": "25797:13:6"
}
]
},
"documentation": null,
"id": 3767,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_mintPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3760,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3759,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3767,
"src": "25753:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3758,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25753:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25752:13:6"
},
"returnParameters": {
"id": 3761,
"nodeType": "ParameterList",
"parameters": [],
"src": "25787:0:6"
},
"scope": 3778,
"src": "25729:88:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3776,
"nodeType": "Block",
"src": "25881:30:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3773,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3769,
"src": "25897:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3772,
"name": "_burn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3899,
"src": "25891:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25891:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3775,
"nodeType": "ExpressionStatement",
"src": "25891:13:6"
}
]
},
"documentation": null,
"id": 3777,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_burnPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3769,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3777,
"src": "25847:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3768,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25847:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25846:13:6"
},
"returnParameters": {
"id": 3771,
"nodeType": "ParameterList",
"parameters": [],
"src": "25881:0:6"
},
"scope": 3778,
"src": "25823:88:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 3779,
"src": "854:25060:6"
}
],
"src": "0:25915:6"
},
"legacyAST": {
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BPool.sol",
"exportedSymbols": {
"BPool": [
3778
]
},
"id": 3779,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1424,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "0:23:6"
},
{
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BToken.sol",
"file": "./BToken.sol",
"id": 1425,
"nodeType": "ImportDirective",
"scope": 3779,
"sourceUnit": 4286,
"src": "186:22:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/travis/build/oceanprotocol/ocean-contracts/contracts/balancer/BMath.sol",
"file": "./BMath.sol",
"id": 1426,
"nodeType": "ImportDirective",
"scope": 3779,
"sourceUnit": 946,
"src": "209:21:6",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1427,
"name": "BToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4285,
"src": "872:6:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BToken_$4285",
"typeString": "contract BToken"
}
},
"id": 1428,
"nodeType": "InheritanceSpecifier",
"src": "872:6:6"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1429,
"name": "BMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 945,
"src": "880:5:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BMath_$945",
"typeString": "contract BMath"
}
},
"id": 1430,
"nodeType": "InheritanceSpecifier",
"src": "880:5:6"
}
],
"contractDependencies": [
280,
945,
1422,
3979,
4285,
6537
],
"contractKind": "contract",
"documentation": "@title BPool\n \n@dev Used by the (Ocean version) BFactory contract as a bytecode reference to\n deploy new BPools.\n* This contract is is nearly identical to the BPool.sol contract at [1]\n The only difference is the \"Proxy contract functionality\" section \n given below. We'd inherit from BPool if we could, for simplicity.\n But we can't, because the proxy section needs to access private\n variables declared in BPool, and Solidity disallows this. Therefore\n the best we can do for now is clearly demarcate the proxy section. \n* [1] https://github.com/balancer-labs/balancer-core/contracts/.",
"fullyImplemented": true,
"id": 3778,
"linearizedBaseContracts": [
3778,
945,
4285,
6537,
3979,
1422,
280
],
"name": "BPool",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "BPool.Record",
"id": 1439,
"members": [
{
"constant": false,
"id": 1432,
"name": "bound",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "917:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1431,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "917:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1434,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "965:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1433,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "965:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1436,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "998:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1435,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "998:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1438,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 1439,
"src": "1043:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1437,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "1043:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Record",
"nodeType": "StructDefinition",
"scope": 3778,
"src": "893:169:6",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 1451,
"name": "LOG_SWAP",
"nodeType": "EventDefinition",
"parameters": {
"id": 1450,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1441,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1092:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1440,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1092:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1443,
"indexed": true,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1124:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1442,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1124:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1445,
"indexed": true,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1157:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1444,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1157:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1447,
"indexed": false,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1191:29:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1446,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1191:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1449,
"indexed": false,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 1451,
"src": "1230:30:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1448,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1230:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1082:184:6"
},
"src": "1068:199:6"
},
{
"anonymous": false,
"documentation": null,
"id": 1459,
"name": "LOG_JOIN",
"nodeType": "EventDefinition",
"parameters": {
"id": 1458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1453,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1297:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1452,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1297:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1455,
"indexed": true,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1329:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1329:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1457,
"indexed": false,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 1459,
"src": "1362:29:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1456,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1362:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1287:110:6"
},
"src": "1273:125:6"
},
{
"anonymous": false,
"documentation": null,
"id": 1467,
"name": "LOG_EXIT",
"nodeType": "EventDefinition",
"parameters": {
"id": 1466,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1461,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1428:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1460,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1428:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1463,
"indexed": true,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1460:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1462,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1460:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1465,
"indexed": false,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 1467,
"src": "1494:30:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1464,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1494:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1418:112:6"
},
"src": "1404:127:6"
},
{
"anonymous": true,
"documentation": null,
"id": 1475,
"name": "LOG_CALL",
"nodeType": "EventDefinition",
"parameters": {
"id": 1474,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1469,
"indexed": true,
"name": "sig",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1561:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
"typeName": {
"id": 1468,
"name": "bytes4",
"nodeType": "ElementaryTypeName",
"src": "1561:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1471,
"indexed": true,
"name": "caller",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1590:22:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1470,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1590:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1473,
"indexed": false,
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 1475,
"src": "1622:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1472,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1622:5:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1551:97:6"
},
"src": "1537:122:6"
},
{
"body": {
"id": 1487,
"nodeType": "Block",
"src": "1683:72:6",
"statements": [
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1478,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1707:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1479,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sig",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1707:7:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1480,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1716:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1481,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1716:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1482,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "1728:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "data",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1728:8:6",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes calldata"
}
],
"id": 1477,
"name": "LOG_CALL",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1475,
"src": "1698:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_bytes4_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
"typeString": "function (bytes4,address,bytes memory)"
}
},
"id": 1484,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1698:39:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1485,
"nodeType": "EmitStatement",
"src": "1693:44:6"
},
{
"id": 1486,
"nodeType": "PlaceholderStatement",
"src": "1747:1:6"
}
]
},
"documentation": null,
"id": 1488,
"name": "_logs_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1476,
"nodeType": "ParameterList",
"parameters": [],
"src": "1680:2:6"
},
"src": "1665:90:6",
"visibility": "internal"
},
{
"body": {
"id": 1505,
"nodeType": "Block",
"src": "1779:141:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1492,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1810:7:6",
"subExpression": {
"argumentTypes": null,
"id": 1491,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1811:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e545259",
"id": 1493,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1832:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
},
"value": "ERR_REENTRY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
}
],
"id": 1490,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "1789:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1494,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1789:66:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1495,
"nodeType": "ExpressionStatement",
"src": "1789:66:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1498,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1496,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1865:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1874:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1865:13:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1499,
"nodeType": "ExpressionStatement",
"src": "1865:13:6"
},
{
"id": 1500,
"nodeType": "PlaceholderStatement",
"src": "1888:1:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1503,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1501,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1899:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1502,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1908:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1899:14:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1504,
"nodeType": "ExpressionStatement",
"src": "1899:14:6"
}
]
},
"documentation": null,
"id": 1506,
"name": "_lock_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1489,
"nodeType": "ParameterList",
"parameters": [],
"src": "1776:2:6"
},
"src": "1761:159:6",
"visibility": "internal"
},
{
"body": {
"id": 1515,
"nodeType": "Block",
"src": "1948:59:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1510,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1966:7:6",
"subExpression": {
"argumentTypes": null,
"id": 1509,
"name": "_mutex",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1518,
"src": "1967:6:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f5245454e545259",
"id": 1511,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1975:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
},
"value": "ERR_REENTRY"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8186a91a8af60eddd7d544682e1b6922f650fc04d86fd0e4ee40391168ca67e4",
"typeString": "literal_string \"ERR_REENTRY\""
}
],
"id": 1508,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "1958:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1512,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1958:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1513,
"nodeType": "ExpressionStatement",
"src": "1958:31:6"
},
{
"id": 1514,
"nodeType": "PlaceholderStatement",
"src": "1999:1:6"
}
]
},
"documentation": null,
"id": 1516,
"name": "_viewlock_",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1507,
"nodeType": "ParameterList",
"parameters": [],
"src": "1945:2:6"
},
"src": "1926:81:6",
"visibility": "internal"
},
{
"constant": false,
"id": 1518,
"name": "_mutex",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2017:19:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1517,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2017:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1520,
"name": "_factory",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2043:24:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1519,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2043:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1522,
"name": "_controller",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2121:27:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1521,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2121:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1524,
"name": "_publicSwap",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2174:24:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1523,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2174:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1526,
"name": "_swapFee",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2358:21:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1525,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2358:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1528,
"name": "_finalized",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2385:23:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1527,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2385:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1531,
"name": "_tokens",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2415:25:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1529,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2415:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1530,
"length": null,
"nodeType": "ArrayTypeName",
"src": "2415:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1535,
"name": "_records",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2446:42:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record)"
},
"typeName": {
"id": 1534,
"keyType": {
"id": 1532,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2454:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "2446:24:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record)"
},
"valueType": {
"contractScope": null,
"id": 1533,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "2463:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1537,
"name": "_totalWeight",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2494:25:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1536,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "2494:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"id": 1540,
"name": "initialized",
"nodeType": "VariableDeclaration",
"scope": 3778,
"src": "2646:32:6",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1538,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2646:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2673:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"visibility": "private"
},
{
"body": {
"id": 1549,
"nodeType": "Block",
"src": "2715:111:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "2746:12:6",
"subExpression": {
"argumentTypes": null,
"id": 1543,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "2747:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f414c52454144595f494e495449414c495a4544",
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2773:25:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249",
"typeString": "literal_string \"ERR_ALREADY_INITIALIZED\""
},
"value": "ERR_ALREADY_INITIALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_1fb8797b66eca6c15df697c66cc4b5186be8e5c9588f384f789ecfab2607b249",
"typeString": "literal_string \"ERR_ALREADY_INITIALIZED\""
}
],
"id": 1542,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "2725:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "2725:83:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1547,
"nodeType": "ExpressionStatement",
"src": "2725:83:6"
},
{
"id": 1548,
"nodeType": "PlaceholderStatement",
"src": "2818:1:6"
}
]
},
"documentation": null,
"id": 1550,
"name": "onlyNotInitialized",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 1541,
"nodeType": "ParameterList",
"parameters": [],
"src": "2712:2:6"
},
"src": "2685:141:6",
"visibility": "internal"
},
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "2884:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1555,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "2901:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1554,
"id": 1556,
"nodeType": "Return",
"src": "2894:18:6"
}
]
},
"documentation": null,
"id": 1558,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isInitialized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1551,
"nodeType": "ParameterList",
"parameters": [],
"src": "2853:2:6"
},
"returnParameters": {
"id": 1554,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1553,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "2878:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1552,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2878:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2877:6:6"
},
"scope": 3778,
"src": "2831:88:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1571,
"nodeType": "Block",
"src": "2993:75:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1562,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "3015:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1563,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3015:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1564,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "3027:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1565,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "3027:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1566,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "3039:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1567,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3048:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3055:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1561,
"name": "_initialize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1672,
"src": "3003:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$",
"typeString": "function (address,address,uint256,bool,bool) returns (bool)"
}
},
"id": 1569,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3003:58:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1570,
"nodeType": "ExpressionStatement",
"src": "3003:58:6"
}
]
},
"documentation": null,
"id": 1572,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1559,
"nodeType": "ParameterList",
"parameters": [],
"src": "2983:2:6"
},
"returnParameters": {
"id": 1560,
"nodeType": "ParameterList",
"parameters": [],
"src": "2993:0:6"
},
"scope": 3778,
"src": "2972:96:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1629,
"nodeType": "Block",
"src": "3461:408:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1594,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1590,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1574,
"src": "3492:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1592,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3514:1:6",
"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": 1591,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3506:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1593,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3506:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3492:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f434f4e54524f4c4c45525f41444452455353",
"id": 1595,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3530:32:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd",
"typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\""
},
"value": "ERR_INVALID_CONTROLLER_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_27bd7417075a75a6fa345231d32603870be38c05ec22dde6b19bc44a340342dd",
"typeString": "literal_string \"ERR_INVALID_CONTROLLER_ADDRESS\""
}
],
"id": 1589,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3471:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1596,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3471:101:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1597,
"nodeType": "ExpressionStatement",
"src": "3471:101:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1603,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1599,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1576,
"src": "3603:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1601,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3622:1:6",
"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": 1600,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "3614:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1602,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3614:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "3603:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f464143544f52595f41444452455353",
"id": 1604,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3638:29:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b",
"typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\""
},
"value": "ERR_INVALID_FACTORY_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_ea269bf0660439ffbd72480b6b4854b47a9bcddbad5646f4d4f582f8c48bd39b",
"typeString": "literal_string \"ERR_INVALID_FACTORY_ADDRESS\""
}
],
"id": 1598,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3582:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1605,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3582:95:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1606,
"nodeType": "ExpressionStatement",
"src": "3582:95:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1608,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3695:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 1609,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "3706:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3695:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f464545",
"id": 1611,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3715:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
},
"value": "ERR_MIN_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
}
],
"id": 1607,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3687:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1612,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3687:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1613,
"nodeType": "ExpressionStatement",
"src": "3687:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1615,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3747:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 1616,
"name": "MAX_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 220,
"src": "3758:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "3747:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f464545",
"id": 1618,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "3767:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
},
"value": "ERR_MAX_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
}
],
"id": 1614,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "3739:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1619,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3739:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1620,
"nodeType": "ExpressionStatement",
"src": "3739:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1622,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1574,
"src": "3810:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1623,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1576,
"src": "3822:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1624,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1578,
"src": "3831:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1625,
"name": "publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1580,
"src": "3840:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"id": 1626,
"name": "finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1582,
"src": "3852:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 1621,
"name": "_initialize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1672,
"src": "3798:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bool_$_t_bool_$returns$_t_bool_$",
"typeString": "function (address,address,uint256,bool,bool) returns (bool)"
}
},
"id": 1627,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "3798:64:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1588,
"id": 1628,
"nodeType": "Return",
"src": "3791:71:6"
}
]
},
"documentation": null,
"id": 1630,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1585,
"modifierName": {
"argumentTypes": null,
"id": 1584,
"name": "onlyNotInitialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1550,
"src": "3416:18:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "3416:18:6"
}
],
"name": "initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1583,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1574,
"name": "controller",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3268:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1573,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3268:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1576,
"name": "factory",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3297:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1575,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3297:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1578,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3323:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1577,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "3323:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1580,
"name": "publicSwap",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3345:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1579,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3345:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1582,
"name": "finalized",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3370:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1581,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3370:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3258:132:6"
},
"returnParameters": {
"id": 1588,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1587,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1630,
"src": "3451:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1586,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "3451:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3450:6:6"
},
"scope": 3778,
"src": "3239:630:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1671,
"nodeType": "Block",
"src": "4131:221:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1647,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1645,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "4141:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1646,
"name": "controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1632,
"src": "4155:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4141:24:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1648,
"nodeType": "ExpressionStatement",
"src": "4141:24:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1649,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "4175:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1650,
"name": "factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "4186:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "4175:18:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1652,
"nodeType": "ExpressionStatement",
"src": "4175:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1655,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1653,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "4203:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1654,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1636,
"src": "4214:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "4203:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1656,
"nodeType": "ExpressionStatement",
"src": "4203:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1659,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1657,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "4231:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1658,
"name": "publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1638,
"src": "4245:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4231:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1660,
"nodeType": "ExpressionStatement",
"src": "4231:24:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1663,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1661,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "4265:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1662,
"name": "finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1640,
"src": "4278:9:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "4265:22:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1664,
"nodeType": "ExpressionStatement",
"src": "4265:22:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1667,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1665,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "4299:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1666,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4313:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "4299:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1668,
"nodeType": "ExpressionStatement",
"src": "4299:18:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1669,
"name": "initialized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1540,
"src": "4334:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1644,
"id": 1670,
"nodeType": "Return",
"src": "4327:18:6"
}
]
},
"documentation": null,
"id": 1672,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_initialize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1641,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1632,
"name": "controller",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "3965:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1631,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3965:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1634,
"name": "factory",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "3994:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1633,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3994:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1636,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4020:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1635,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "4020:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1638,
"name": "publicSwap",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4042:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1637,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4042:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1640,
"name": "finalized",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4068:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1639,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4068:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3955:133:6"
},
"returnParameters": {
"id": 1644,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1643,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1672,
"src": "4121:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1642,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "4121:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4120:6:6"
},
"scope": 3778,
"src": "3935:417:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "private"
},
{
"body": {
"id": 1742,
"nodeType": "Block",
"src": "4643:816:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1696,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1692,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "4674:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4703:1:6",
"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": 1693,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4695:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1695,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4695:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4674:31:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f44415441544f4b454e5f41444452455353",
"id": 1697,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4719:31:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632",
"typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\""
},
"value": "ERR_INVALID_DATATOKEN_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_c32bb61c112b11a0a138368229143b221c7b45bb96a8d15205ee6861a5ea6632",
"typeString": "literal_string \"ERR_INVALID_DATATOKEN_ADDRESS\""
}
],
"id": 1691,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "4653:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4653:107:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1699,
"nodeType": "ExpressionStatement",
"src": "4653:107:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1705,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1701,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "4791:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1703,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4819:1:6",
"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": 1702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "4811:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1704,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4811:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "4791:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f42415345544f4b454e5f41444452455353",
"id": 1706,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "4835:31:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072",
"typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\""
},
"value": "ERR_INVALID_BASETOKEN_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4b2297dc625c16c7dff9433ba745e0a13395a58d1fe6f08b62aefc6950ecb072",
"typeString": "literal_string \"ERR_INVALID_BASETOKEN_ADDRESS\""
}
],
"id": 1700,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "4770:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "4770:106:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1708,
"nodeType": "ExpressionStatement",
"src": "4770:106:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1710,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "5018:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1711,
"name": "dataTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1676,
"src": "5049:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1712,
"name": "dataTokenWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1678,
"src": "5078:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1709,
"name": "bind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2130,
"src": "5000:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 1713,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5000:103:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1714,
"nodeType": "ExpressionStatement",
"src": "5000:103:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1716,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "5127:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1717,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5127:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1718,
"name": "dataTokenAaddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1674,
"src": "5139:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1719,
"name": "dataTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1676,
"src": "5158:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1715,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "5118:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 1720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5118:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1721,
"nodeType": "EmitStatement",
"src": "5113:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1723,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "5229:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1724,
"name": "baseTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "5259:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1725,
"name": "baseTokenWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1684,
"src": "5288:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1722,
"name": "bind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2130,
"src": "5211:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 1726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5211:102:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1727,
"nodeType": "ExpressionStatement",
"src": "5211:102:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1729,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "5337:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1730,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "5337:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 1731,
"name": "baseTokenAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1680,
"src": "5349:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1732,
"name": "baseTokenAmount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1682,
"src": "5367:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1728,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "5328:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 1733,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5328:55:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1734,
"nodeType": "EmitStatement",
"src": "5323:60:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1736,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1686,
"src": "5404:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1735,
"name": "setSwapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1956,
"src": "5393:10:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 1737,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5393:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1738,
"nodeType": "ExpressionStatement",
"src": "5393:19:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 1739,
"name": "finalize",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2063,
"src": "5442:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 1740,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "5442:10:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1741,
"nodeType": "ExpressionStatement",
"src": "5442:10:6"
}
]
},
"documentation": null,
"id": 1743,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1689,
"modifierName": {
"argumentTypes": null,
"id": 1688,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "4632:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "4632:6:6"
}
],
"name": "setup",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1687,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1674,
"name": "dataTokenAaddress",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4382:25:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1673,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4382:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1676,
"name": "dataTokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4418:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1675,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4418:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1678,
"name": "dataTokenWeight",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4451:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1677,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4451:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1680,
"name": "baseTokenAddress",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4484:24:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4484:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1682,
"name": "baseTokenAmount",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4519:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1681,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4519:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1684,
"name": "baseTokenWeight",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4552:23:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1683,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4552:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1686,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1743,
"src": "4585:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1685,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4585:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4372:234:6"
},
"returnParameters": {
"id": 1690,
"nodeType": "ParameterList",
"parameters": [],
"src": "4643:0:6"
},
"scope": 3778,
"src": "4358:1101:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1750,
"nodeType": "Block",
"src": "5661:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1748,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "5678:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1747,
"id": 1749,
"nodeType": "Return",
"src": "5671:18:6"
}
]
},
"documentation": null,
"id": 1751,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isPublicSwap",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1744,
"nodeType": "ParameterList",
"parameters": [],
"src": "5609:2:6"
},
"returnParameters": {
"id": 1747,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1746,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1751,
"src": "5651:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1745,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5651:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5650:6:6"
},
"scope": 3778,
"src": "5588:108:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1758,
"nodeType": "Block",
"src": "5774:34:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1756,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "5791:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1755,
"id": 1757,
"nodeType": "Return",
"src": "5784:17:6"
}
]
},
"documentation": null,
"id": 1759,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isFinalized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1752,
"nodeType": "ParameterList",
"parameters": [],
"src": "5722:2:6"
},
"returnParameters": {
"id": 1755,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1754,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1759,
"src": "5764:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1753,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5764:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5763:6:6"
},
"scope": 3778,
"src": "5702:106:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1771,
"nodeType": "Block",
"src": "5891:41:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1766,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "5908:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1768,
"indexExpression": {
"argumentTypes": null,
"id": 1767,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1761,
"src": "5917:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "5908:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1769,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "5908:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1765,
"id": 1770,
"nodeType": "Return",
"src": "5901:24:6"
}
]
},
"documentation": null,
"id": 1772,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "isBound",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1762,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1761,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 1772,
"src": "5831:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1760,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5831:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5830:11:6"
},
"returnParameters": {
"id": 1765,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1764,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1772,
"src": "5881:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1763,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "5881:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5880:6:6"
},
"scope": 3778,
"src": "5814:118:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1780,
"nodeType": "Block",
"src": "6012:38:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1777,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6029:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 1778,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "6029:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1776,
"id": 1779,
"nodeType": "Return",
"src": "6022:21:6"
}
]
},
"documentation": null,
"id": 1781,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "getNumTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1773,
"nodeType": "ParameterList",
"parameters": [],
"src": "5959:2:6"
},
"returnParameters": {
"id": 1776,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1775,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1781,
"src": "6001:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1774,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6001:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6000:6:6"
},
"scope": 3778,
"src": "5938:112:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1791,
"nodeType": "Block",
"src": "6163:31:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1789,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6180:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"functionReturnParameters": 1788,
"id": 1790,
"nodeType": "Return",
"src": "6173:14:6"
}
]
},
"documentation": null,
"id": 1792,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1784,
"modifierName": {
"argumentTypes": null,
"id": 1783,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6106:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6106:10:6"
}
],
"name": "getCurrentTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1782,
"nodeType": "ParameterList",
"parameters": [],
"src": "6081:2:6"
},
"returnParameters": {
"id": 1788,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1787,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1792,
"src": "6134:23:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1785,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6134:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1786,
"length": null,
"nodeType": "ArrayTypeName",
"src": "6134:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6133:25:6"
},
"scope": 3778,
"src": "6056:138:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1807,
"nodeType": "Block",
"src": "6313:81:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1801,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "6331:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 1802,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6343:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 1800,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6323:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6323:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1804,
"nodeType": "ExpressionStatement",
"src": "6323:40:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1805,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "6380:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"functionReturnParameters": 1799,
"id": 1806,
"nodeType": "Return",
"src": "6373:14:6"
}
]
},
"documentation": null,
"id": 1808,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1795,
"modifierName": {
"argumentTypes": null,
"id": 1794,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6256:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6256:10:6"
}
],
"name": "getFinalTokens",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1793,
"nodeType": "ParameterList",
"parameters": [],
"src": "6223:2:6"
},
"returnParameters": {
"id": 1799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1798,
"name": "tokens",
"nodeType": "VariableDeclaration",
"scope": 1808,
"src": "6284:23:6",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1796,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6284:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1797,
"length": null,
"nodeType": "ArrayTypeName",
"src": "6284:9:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6283:25:6"
},
"scope": 3778,
"src": "6200:194:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1830,
"nodeType": "Block",
"src": "6514:104:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1818,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6533:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1820,
"indexExpression": {
"argumentTypes": null,
"id": 1819,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1810,
"src": "6542:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6533:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1821,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "6533:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1822,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6556:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1817,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6525:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1823,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6525:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1824,
"nodeType": "ExpressionStatement",
"src": "6525:47:6"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1825,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6589:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1827,
"indexExpression": {
"argumentTypes": null,
"id": 1826,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1810,
"src": "6598:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6589:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1828,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "6589:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1816,
"id": 1829,
"nodeType": "Return",
"src": "6582:29:6"
}
]
},
"documentation": null,
"id": 1831,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1813,
"modifierName": {
"argumentTypes": null,
"id": 1812,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6476:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6476:10:6"
}
],
"name": "getDenormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1811,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1810,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1831,
"src": "6431:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1809,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6431:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6430:15:6"
},
"returnParameters": {
"id": 1816,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1815,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1831,
"src": "6504:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1814,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6504:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6503:6:6"
},
"scope": 3778,
"src": "6400:218:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1840,
"nodeType": "Block",
"src": "6730:36:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1838,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "6747:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1837,
"id": 1839,
"nodeType": "Return",
"src": "6740:19:6"
}
]
},
"documentation": null,
"id": 1841,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1834,
"modifierName": {
"argumentTypes": null,
"id": 1833,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6692:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6692:10:6"
}
],
"name": "getTotalDenormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1832,
"nodeType": "ParameterList",
"parameters": [],
"src": "6659:2:6"
},
"returnParameters": {
"id": 1837,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1836,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1841,
"src": "6720:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1835,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6720:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6719:6:6"
},
"scope": 3778,
"src": "6624:142:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1870,
"nodeType": "Block",
"src": "6884:154:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1851,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6903:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1853,
"indexExpression": {
"argumentTypes": null,
"id": 1852,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1843,
"src": "6912:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6903:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1854,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "6903:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1855,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "6926:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1850,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "6895:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1856,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "6895:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1857,
"nodeType": "ExpressionStatement",
"src": "6895:47:6"
},
{
"assignments": [
1859
],
"declarations": [
{
"constant": false,
"id": 1859,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 1870,
"src": "6952:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1858,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6952:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1864,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1860,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "6966:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1862,
"indexExpression": {
"argumentTypes": null,
"id": 1861,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1843,
"src": "6975:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "6966:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1863,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "6966:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "6952:36:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1866,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1859,
"src": "7010:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 1867,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "7018:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1865,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "7005:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 1868,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7005:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1849,
"id": 1869,
"nodeType": "Return",
"src": "6998:33:6"
}
]
},
"documentation": null,
"id": 1871,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1846,
"modifierName": {
"argumentTypes": null,
"id": 1845,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "6846:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "6846:10:6"
}
],
"name": "getNormalizedWeight",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1844,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1843,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1871,
"src": "6801:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1842,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6801:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6800:15:6"
},
"returnParameters": {
"id": 1849,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1848,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1871,
"src": "6874:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1847,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "6874:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6873:6:6"
},
"scope": 3778,
"src": "6772:266:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1893,
"nodeType": "Block",
"src": "7147:105:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1881,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "7166:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1883,
"indexExpression": {
"argumentTypes": null,
"id": 1882,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1873,
"src": "7175:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7166:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1884,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "7166:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 1885,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7189:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 1880,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7158:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7158:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1887,
"nodeType": "ExpressionStatement",
"src": "7158:47:6"
},
{
"expression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1888,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "7222:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 1890,
"indexExpression": {
"argumentTypes": null,
"id": 1889,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1873,
"src": "7231:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "7222:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 1891,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "7222:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1879,
"id": 1892,
"nodeType": "Return",
"src": "7215:30:6"
}
]
},
"documentation": null,
"id": 1894,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1876,
"modifierName": {
"argumentTypes": null,
"id": 1875,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7109:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7109:10:6"
}
],
"name": "getBalance",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1874,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1873,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "7064:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1872,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7064:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7063:15:6"
},
"returnParameters": {
"id": 1879,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1878,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1894,
"src": "7137:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1877,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7137:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7136:6:6"
},
"scope": 3778,
"src": "7044:208:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1903,
"nodeType": "Block",
"src": "7348:32:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1901,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "7365:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 1900,
"id": 1902,
"nodeType": "Return",
"src": "7358:15:6"
}
]
},
"documentation": null,
"id": 1904,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1897,
"modifierName": {
"argumentTypes": null,
"id": 1896,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7310:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7310:10:6"
}
],
"name": "getSwapFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1895,
"nodeType": "ParameterList",
"parameters": [],
"src": "7277:2:6"
},
"returnParameters": {
"id": 1900,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1899,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1904,
"src": "7338:4:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1898,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7338:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7337:6:6"
},
"scope": 3778,
"src": "7258:122:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1913,
"nodeType": "Block",
"src": "7482:35:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1911,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "7499:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"functionReturnParameters": 1910,
"id": 1912,
"nodeType": "Return",
"src": "7492:18:6"
}
]
},
"documentation": null,
"id": 1914,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1907,
"modifierName": {
"argumentTypes": null,
"id": 1906,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "7441:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7441:10:6"
}
],
"name": "getController",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1905,
"nodeType": "ParameterList",
"parameters": [],
"src": "7408:2:6"
},
"returnParameters": {
"id": 1910,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1909,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1914,
"src": "7469:7:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1908,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7469:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7468:9:6"
},
"scope": 3778,
"src": "7386:131:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 1955,
"nodeType": "Block",
"src": "7606:256:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "7625:11:6",
"subExpression": {
"argumentTypes": null,
"id": 1924,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "7626:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 1926,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7638:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 1923,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7617:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1927,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7617:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1928,
"nodeType": "ExpressionStatement",
"src": "7617:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1933,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1930,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "7675:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1931,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "7675:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1932,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "7689:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "7675:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 1934,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7702:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 1929,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7667:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1935,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7667:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1936,
"nodeType": "ExpressionStatement",
"src": "7667:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1940,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1938,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7741:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 1939,
"name": "MIN_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 215,
"src": "7752:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7741:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f464545",
"id": 1941,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7761:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
},
"value": "ERR_MIN_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3c95b37766e2e0764ffbea08cf33d7dd980794ea2229cf2b30f9a53dfb48c0a5",
"typeString": "literal_string \"ERR_MIN_FEE\""
}
],
"id": 1937,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7733:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7733:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1943,
"nodeType": "ExpressionStatement",
"src": "7733:42:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1947,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1945,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7793:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 1946,
"name": "MAX_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 220,
"src": "7804:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7793:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f464545",
"id": 1948,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "7813:13:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
},
"value": "ERR_MAX_FEE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_889e9e6c0c0fb5bbb40eea41a5a6b8208c6005e0eb9ab1570db8ca4038ab2ca2",
"typeString": "literal_string \"ERR_MAX_FEE\""
}
],
"id": 1944,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7785:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1949,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7785:42:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1950,
"nodeType": "ExpressionStatement",
"src": "7785:42:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1953,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1951,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "7837:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1952,
"name": "swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1916,
"src": "7848:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "7837:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1954,
"nodeType": "ExpressionStatement",
"src": "7837:18:6"
}
]
},
"documentation": null,
"id": 1956,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1919,
"modifierName": {
"argumentTypes": null,
"id": 1918,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "7580:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7580:6:6"
},
{
"arguments": null,
"id": 1921,
"modifierName": {
"argumentTypes": null,
"id": 1920,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "7595:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7595:6:6"
}
],
"name": "setSwapFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1917,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1916,
"name": "swapFee",
"nodeType": "VariableDeclaration",
"scope": 1956,
"src": "7543:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1915,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "7543:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7542:14:6"
},
"returnParameters": {
"id": 1922,
"nodeType": "ParameterList",
"parameters": [],
"src": "7606:0:6"
},
"scope": 3778,
"src": "7523:339:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1986,
"nodeType": "Block",
"src": "7959:209:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1970,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1966,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1958,
"src": "7990:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 1968,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8009:1:6",
"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": 1967,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "8001:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 1969,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8001:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "7990:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f494e56414c49445f4d414e414745525f41444452455353",
"id": 1971,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8025:29:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078",
"typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\""
},
"value": "ERR_INVALID_MANAGER_ADDRESS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a37759e542f6ed44b54054d0c91dda523721dca7b5e18c58c26d81a883670078",
"typeString": "literal_string \"ERR_INVALID_MANAGER_ADDRESS\""
}
],
"id": 1965,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "7969:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1972,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "7969:95:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1973,
"nodeType": "ExpressionStatement",
"src": "7969:95:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 1978,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1975,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8082:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1976,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8082:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 1977,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8096:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8082:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 1979,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8109:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 1974,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8074:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 1980,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8074:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1981,
"nodeType": "ExpressionStatement",
"src": "8074:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 1984,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1982,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8140:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1983,
"name": "manager",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1958,
"src": "8154:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8140:21:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1985,
"nodeType": "ExpressionStatement",
"src": "8140:21:6"
}
]
},
"documentation": null,
"id": 1987,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1961,
"modifierName": {
"argumentTypes": null,
"id": 1960,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "7933:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7933:6:6"
},
{
"arguments": null,
"id": 1963,
"modifierName": {
"argumentTypes": null,
"id": 1962,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "7948:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "7948:6:6"
}
],
"name": "setController",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1959,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1958,
"name": "manager",
"nodeType": "VariableDeclaration",
"scope": 1987,
"src": "7891:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1957,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7891:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7890:17:6"
},
"returnParameters": {
"id": 1964,
"nodeType": "ParameterList",
"parameters": [],
"src": "7959:0:6"
},
"scope": 3778,
"src": "7868:300:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2014,
"nodeType": "Block",
"src": "8261:154:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1998,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "8279:11:6",
"subExpression": {
"argumentTypes": null,
"id": 1997,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8280:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 1999,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8292:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 1996,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8271:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2000,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8271:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2001,
"nodeType": "ExpressionStatement",
"src": "8271:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2006,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2003,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8329:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8329:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2005,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8343:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8329:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2007,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8356:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2002,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8321:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2008,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8321:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2009,
"nodeType": "ExpressionStatement",
"src": "8321:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2012,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2010,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "8387:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2011,
"name": "public_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1989,
"src": "8401:7:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "8387:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2013,
"nodeType": "ExpressionStatement",
"src": "8387:21:6"
}
]
},
"documentation": null,
"id": 2015,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1992,
"modifierName": {
"argumentTypes": null,
"id": 1991,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8235:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8235:6:6"
},
{
"arguments": null,
"id": 1994,
"modifierName": {
"argumentTypes": null,
"id": 1993,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "8250:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8250:6:6"
}
],
"name": "setPublicSwap",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1990,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1989,
"name": "public_",
"nodeType": "VariableDeclaration",
"scope": 2015,
"src": "8198:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1988,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "8198:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8197:14:6"
},
"returnParameters": {
"id": 1995,
"nodeType": "ParameterList",
"parameters": [],
"src": "8261:0:6"
},
"scope": 3778,
"src": "8175:240:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2062,
"nodeType": "Block",
"src": "8490:347:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2026,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2023,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8508:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2024,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8508:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2025,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "8522:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "8508:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2027,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8535:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2022,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8500:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2028,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8500:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2029,
"nodeType": "ExpressionStatement",
"src": "8500:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2032,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "8574:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2031,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8575:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2033,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8587:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2030,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8566:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2034,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8566:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2035,
"nodeType": "ExpressionStatement",
"src": "8566:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2040,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2037,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "8624:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2038,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8624:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2039,
"name": "MIN_BOUND_TOKENS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 205,
"src": "8642:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "8624:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f544f4b454e53",
"id": 2041,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8660:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9",
"typeString": "literal_string \"ERR_MIN_TOKENS\""
},
"value": "ERR_MIN_TOKENS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_e51b2df926e9f13c18594bdf17dd3e1810e2676b7bad834d6cfa8e46bba574a9",
"typeString": "literal_string \"ERR_MIN_TOKENS\""
}
],
"id": 2036,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "8616:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2042,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8616:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2043,
"nodeType": "ExpressionStatement",
"src": "8616:61:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2044,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "8688:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2045,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8701:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "8688:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2047,
"nodeType": "ExpressionStatement",
"src": "8688:17:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2048,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "8715:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 2049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "8729:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "8715:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2051,
"nodeType": "ExpressionStatement",
"src": "8715:18:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2053,
"name": "INIT_POOL_SUPPLY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 248,
"src": "8759:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2052,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "8744:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2054,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8744:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2055,
"nodeType": "ExpressionStatement",
"src": "8744:32:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2057,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "8801:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2058,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "8801:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2059,
"name": "INIT_POOL_SUPPLY",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 248,
"src": "8813:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2056,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "8786:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "8786:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2061,
"nodeType": "ExpressionStatement",
"src": "8786:44:6"
}
]
},
"documentation": null,
"id": 2063,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2018,
"modifierName": {
"argumentTypes": null,
"id": 2017,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8464:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8464:6:6"
},
{
"arguments": null,
"id": 2020,
"modifierName": {
"argumentTypes": null,
"id": 2019,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "8479:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8479:6:6"
}
],
"name": "finalize",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2016,
"nodeType": "ParameterList",
"parameters": [],
"src": "8438:2:6"
},
"returnParameters": {
"id": 2021,
"nodeType": "ParameterList",
"parameters": [],
"src": "8490:0:6"
},
"scope": 3778,
"src": "8421:416:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2129,
"nodeType": "Block",
"src": "9013:551:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2078,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2075,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "9031:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2076,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9031:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2077,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "9045:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "9031:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2079,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9058:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2074,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9023:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2080,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9023:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2081,
"nodeType": "ExpressionStatement",
"src": "9023:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9097:22:6",
"subExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2083,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9098:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2085,
"indexExpression": {
"argumentTypes": null,
"id": 2084,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9107:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9098:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2086,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "9098:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f424f554e44",
"id": 2088,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9121:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51",
"typeString": "literal_string \"ERR_IS_BOUND\""
},
"value": "ERR_IS_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_29524b4853ebf7d280374d088acc10bd6949cb77e38df49dfa9b02680b8a5f51",
"typeString": "literal_string \"ERR_IS_BOUND\""
}
],
"id": 2082,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9089:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2089,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9089:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2090,
"nodeType": "ExpressionStatement",
"src": "9089:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2093,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9154:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2092,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "9155:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2094,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9167:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2091,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9146:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2095,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9146:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2096,
"nodeType": "ExpressionStatement",
"src": "9146:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2098,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9205:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2099,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9205:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2100,
"name": "MAX_BOUND_TOKENS",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 208,
"src": "9222:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9205:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f544f4b454e53",
"id": 2102,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9240:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5",
"typeString": "literal_string \"ERR_MAX_TOKENS\""
},
"value": "ERR_MAX_TOKENS"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_2b41476dedca3afde44e68e1abeac58b7cde6712eb701df30a64635f310a23f5",
"typeString": "literal_string \"ERR_MAX_TOKENS\""
}
],
"id": 2097,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9197:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9197:60:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2104,
"nodeType": "ExpressionStatement",
"src": "9197:60:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2115,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2105,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9268:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2107,
"indexExpression": {
"argumentTypes": null,
"id": 2106,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9277:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "9268:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "74727565",
"id": 2109,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9314:4:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2110,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9339:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2111,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9339:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2112,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9375:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2113,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9451:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2108,
"name": "Record",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1439,
"src": "9286:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$",
"typeString": "type(struct BPool.Record storage pointer)"
}
},
"id": 2114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"bound",
"index",
"denorm",
"balance"
],
"nodeType": "FunctionCall",
"src": "9286:202:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_memory",
"typeString": "struct BPool.Record memory"
}
},
"src": "9268:220:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2116,
"nodeType": "ExpressionStatement",
"src": "9268:220:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2120,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9511:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"id": 2117,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "9498:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2119,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "push",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9498:12:6",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) returns (uint256)"
}
},
"id": 2121,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9498:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2122,
"nodeType": "ExpressionStatement",
"src": "9498:19:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2124,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2065,
"src": "9534:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2125,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2067,
"src": "9541:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2126,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2069,
"src": "9550:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2123,
"name": "rebind",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2302,
"src": "9527:6:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256,uint256)"
}
},
"id": 2127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9527:30:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2128,
"nodeType": "ExpressionStatement",
"src": "9527:30:6"
}
]
},
"documentation": null,
"id": 2130,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2072,
"modifierName": {
"argumentTypes": null,
"id": 2071,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "8923:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "8923:6:6"
}
],
"name": "bind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2070,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2065,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8858:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2064,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8858:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2067,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8873:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2066,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "8873:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2069,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 2130,
"src": "8887:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2068,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "8887:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8857:42:6"
},
"returnParameters": {
"id": 2073,
"nodeType": "ParameterList",
"parameters": [],
"src": "9013:0:6"
},
"scope": 3778,
"src": "8844:720:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2301,
"nodeType": "Block",
"src": "9677:1496:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2147,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2144,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "9696:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "9696:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2146,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "9710:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "9696:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2148,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9723:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2143,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9688:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9688:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2150,
"nodeType": "ExpressionStatement",
"src": "9688:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2152,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "9762:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2154,
"indexExpression": {
"argumentTypes": null,
"id": 2153,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "9771:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "9762:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "9762:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2156,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9785:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2151,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9754:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2157,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9754:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2158,
"nodeType": "ExpressionStatement",
"src": "9754:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2161,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "9819:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2160,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "9820:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9832:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2159,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9811:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9811:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2164,
"nodeType": "ExpressionStatement",
"src": "9811:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2166,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "9870:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2167,
"name": "MIN_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "9880:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9870:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f574549474854",
"id": 2169,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9892:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362",
"typeString": "literal_string \"ERR_MIN_WEIGHT\""
},
"value": "ERR_MIN_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8df266f07de77e4ef407edb2fcb3334221f5d37909c32010ecedbd042f2b2362",
"typeString": "literal_string \"ERR_MIN_WEIGHT\""
}
],
"id": 2165,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9862:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2170,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9862:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2171,
"nodeType": "ExpressionStatement",
"src": "9862:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2175,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2173,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "9927:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2174,
"name": "MAX_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 231,
"src": "9937:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9927:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f574549474854",
"id": 2176,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "9949:16:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33",
"typeString": "literal_string \"ERR_MAX_WEIGHT\""
},
"value": "ERR_MAX_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4443a14e27060659cd754b886a4a9abce56b7a815ac41b5da14580c72eae7f33",
"typeString": "literal_string \"ERR_MAX_WEIGHT\""
}
],
"id": 2172,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9919:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2177,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9919:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2178,
"nodeType": "ExpressionStatement",
"src": "9919:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2180,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "9984:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2181,
"name": "MIN_BALANCE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 243,
"src": "9995:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "9984:22:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d494e5f42414c414e4345",
"id": 2183,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10008:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c",
"typeString": "literal_string \"ERR_MIN_BALANCE\""
},
"value": "ERR_MIN_BALANCE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_69c7afc4064c1fa740d9fba5145c2c6cfc449ab58df3114718ec5abc7738730c",
"typeString": "literal_string \"ERR_MIN_BALANCE\""
}
],
"id": 2179,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "9976:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2184,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "9976:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2185,
"nodeType": "ExpressionStatement",
"src": "9976:50:6"
},
{
"assignments": [
2187
],
"declarations": [
{
"constant": false,
"id": 2187,
"name": "oldWeight",
"nodeType": "VariableDeclaration",
"scope": 2301,
"src": "10082:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2186,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10082:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2192,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2188,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10099:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2190,
"indexExpression": {
"argumentTypes": null,
"id": 2189,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10108:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10099:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2191,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "10099:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10082:39:6"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2195,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2193,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10135:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 2194,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10144:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10135:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2214,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10327:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2215,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10336:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10327:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2228,
"nodeType": "IfStatement",
"src": "10323:107:6",
"trueBody": {
"id": 2227,
"nodeType": "Block",
"src": "10347:83:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2217,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10361:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2219,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10381:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2221,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10400:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2222,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10411:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2220,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10395:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10395:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2218,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10376:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10376:43:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10361:58:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2226,
"nodeType": "ExpressionStatement",
"src": "10361:58:6"
}
]
}
},
"id": 2229,
"nodeType": "IfStatement",
"src": "10131:299:6",
"trueBody": {
"id": 2213,
"nodeType": "Block",
"src": "10155:162:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 2204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2196,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10169:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2198,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10189:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2200,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10208:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2201,
"name": "oldWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2187,
"src": "10216:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2199,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10203:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10203:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2197,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "10184:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2203,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10184:43:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10169:58:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2205,
"nodeType": "ExpressionStatement",
"src": "10169:58:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2207,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "10249:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2208,
"name": "MAX_TOTAL_WEIGHT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 236,
"src": "10265:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10249:32:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f544f54414c5f574549474854",
"id": 2210,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "10283:22:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440",
"typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\""
},
"value": "ERR_MAX_TOTAL_WEIGHT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_55ceb599893e4bee215a5c1285d9b5c12334585fcdd4c2c71690e94257494440",
"typeString": "literal_string \"ERR_MAX_TOTAL_WEIGHT\""
}
],
"id": 2206,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "10241:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10241:65:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2212,
"nodeType": "ExpressionStatement",
"src": "10241:65:6"
}
]
}
},
{
"expression": {
"argumentTypes": null,
"id": 2235,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2230,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10447:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2232,
"indexExpression": {
"argumentTypes": null,
"id": 2231,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10456:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10447:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2233,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "10447:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2234,
"name": "denorm",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2136,
"src": "10472:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10447:31:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2236,
"nodeType": "ExpressionStatement",
"src": "10447:31:6"
},
{
"assignments": [
2238
],
"declarations": [
{
"constant": false,
"id": 2238,
"name": "oldBalance",
"nodeType": "VariableDeclaration",
"scope": 2301,
"src": "10551:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2237,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10551:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2243,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2239,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10569:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2241,
"indexExpression": {
"argumentTypes": null,
"id": 2240,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10578:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10569:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "10569:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10551:41:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2249,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2244,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "10602:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2246,
"indexExpression": {
"argumentTypes": null,
"id": 2245,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10611:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "10602:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2247,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "10602:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2248,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10628:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10602:33:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2250,
"nodeType": "ExpressionStatement",
"src": "10602:33:6"
},
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2253,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2251,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10649:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"argumentTypes": null,
"id": 2252,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10659:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10649:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2267,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2265,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10767:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"id": 2266,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10777:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "10767:20:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 2299,
"nodeType": "IfStatement",
"src": "10763:404:6",
"trueBody": {
"id": 2298,
"nodeType": "Block",
"src": "10789:378:6",
"statements": [
{
"assignments": [
2269
],
"declarations": [
{
"constant": false,
"id": 2269,
"name": "tokenBalanceWithdrawn",
"nodeType": "VariableDeclaration",
"scope": 2298,
"src": "10880:26:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2268,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10880:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2274,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2271,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10914:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2272,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10926:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2270,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10909:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2273,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10909:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10880:54:6"
},
{
"assignments": [
2276
],
"declarations": [
{
"constant": false,
"id": 2276,
"name": "tokenExitFee",
"nodeType": "VariableDeclaration",
"scope": 2298,
"src": "10948:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2275,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "10948:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2281,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2278,
"name": "tokenBalanceWithdrawn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "10973:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2279,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "10996:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2277,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "10968:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2280,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10968:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "10948:57:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2283,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "11035:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2284,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "11042:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2285,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11042:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2287,
"name": "tokenBalanceWithdrawn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2269,
"src": "11059:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2288,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "11082:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2286,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "11054:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2289,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11054:41:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2282,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "11019:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2290,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11019:77:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2291,
"nodeType": "ExpressionStatement",
"src": "11019:77:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2293,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "11126:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2294,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "11133:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2295,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2276,
"src": "11143:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2292,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "11110:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2296,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11110:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2297,
"nodeType": "ExpressionStatement",
"src": "11110:46:6"
}
]
}
},
"id": 2300,
"nodeType": "IfStatement",
"src": "10645:522:6",
"trueBody": {
"id": 2264,
"nodeType": "Block",
"src": "10671:86:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2255,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2132,
"src": "10701:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2256,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "10708:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "10708:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2259,
"name": "balance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2134,
"src": "10725:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2260,
"name": "oldBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2238,
"src": "10734:10:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2258,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "10720:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2261,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10720:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2254,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "10685:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "10685:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2263,
"nodeType": "ExpressionStatement",
"src": "10685:61:6"
}
]
}
}
]
},
"documentation": null,
"id": 2302,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2139,
"modifierName": {
"argumentTypes": null,
"id": 2138,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "9651:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "9651:6:6"
},
{
"arguments": null,
"id": 2141,
"modifierName": {
"argumentTypes": null,
"id": 2140,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "9666:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "9666:6:6"
}
],
"name": "rebind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2137,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2132,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9586:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2131,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "9586:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2134,
"name": "balance",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9601:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2133,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "9601:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2136,
"name": "denorm",
"nodeType": "VariableDeclaration",
"scope": 2302,
"src": "9615:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2135,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "9615:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9585:42:6"
},
"returnParameters": {
"id": 2142,
"nodeType": "ParameterList",
"parameters": [],
"src": "9677:0:6"
},
"scope": 3778,
"src": "9570:1603:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 2420,
"nodeType": "Block",
"src": "11261:928:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 2315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2312,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "11280:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2313,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11280:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"id": 2314,
"name": "_controller",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1522,
"src": "11294:11:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "11280:25:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f434f4e54524f4c4c4552",
"id": 2316,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11307:20:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
},
"value": "ERR_NOT_CONTROLLER"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0479bbd6e0e904a96491e3adc0eda9022c19acd57f4922725f8618b3a0372668",
"typeString": "literal_string \"ERR_NOT_CONTROLLER\""
}
],
"id": 2311,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11272:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11272:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2318,
"nodeType": "ExpressionStatement",
"src": "11272:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2320,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11346:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2322,
"indexExpression": {
"argumentTypes": null,
"id": 2321,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11355:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11346:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2323,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "11346:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2324,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11369:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2319,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11338:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2325,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11338:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2326,
"nodeType": "ExpressionStatement",
"src": "11338:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2329,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "11403:11:6",
"subExpression": {
"argumentTypes": null,
"id": 2328,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "11404:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f49535f46494e414c495a4544",
"id": 2330,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11416:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
},
"value": "ERR_IS_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_4e8186530b7c98466f35e0b14182dc6e751c9b9644c5bf1204c0609f892e5bbe",
"typeString": "literal_string \"ERR_IS_FINALIZED\""
}
],
"id": 2327,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "11395:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2331,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11395:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2332,
"nodeType": "ExpressionStatement",
"src": "11395:40:6"
},
{
"assignments": [
2334
],
"declarations": [
{
"constant": false,
"id": 2334,
"name": "tokenBalance",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11446:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2333,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11446:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2339,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2335,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11466:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2337,
"indexExpression": {
"argumentTypes": null,
"id": 2336,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11475:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11466:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2338,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "11466:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11446:43:6"
},
{
"assignments": [
2341
],
"declarations": [
{
"constant": false,
"id": 2341,
"name": "tokenExitFee",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11499:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2340,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11499:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2346,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2343,
"name": "tokenBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2334,
"src": "11524:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2344,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "11538:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2342,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "11519:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2345,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11519:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11499:48:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2355,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2347,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "11558:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2349,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "11578:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2350,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11592:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2352,
"indexExpression": {
"argumentTypes": null,
"id": 2351,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11601:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11592:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2353,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "11592:22:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2348,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "11573:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2354,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11573:42:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11558:57:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2356,
"nodeType": "ExpressionStatement",
"src": "11558:57:6"
},
{
"assignments": [
2358
],
"declarations": [
{
"constant": false,
"id": 2358,
"name": "index",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11721:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2357,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11721:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2363,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2359,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11734:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2361,
"indexExpression": {
"argumentTypes": null,
"id": 2360,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11743:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11734:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2362,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "index",
"nodeType": "MemberAccess",
"referencedDeclaration": 1434,
"src": "11734:21:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11721:34:6"
},
{
"assignments": [
2365
],
"declarations": [
{
"constant": false,
"id": 2365,
"name": "last",
"nodeType": "VariableDeclaration",
"scope": 2420,
"src": "11765:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2364,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "11765:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2370,
"initialValue": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2369,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2366,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11777:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2367,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11777:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "-",
"rightExpression": {
"argumentTypes": null,
"hexValue": "31",
"id": 2368,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11794:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "11777:18:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "11765:30:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2377,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2371,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11805:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2373,
"indexExpression": {
"argumentTypes": null,
"id": 2372,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11813:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11805:14:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2374,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11822:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2376,
"indexExpression": {
"argumentTypes": null,
"id": 2375,
"name": "last",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2365,
"src": "11830:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11822:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "11805:30:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 2378,
"nodeType": "ExpressionStatement",
"src": "11805:30:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2386,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2379,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11845:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2383,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2380,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11854:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2382,
"indexExpression": {
"argumentTypes": null,
"id": 2381,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11862:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11854:14:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "11845:24:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2384,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "index",
"nodeType": "MemberAccess",
"referencedDeclaration": 1434,
"src": "11845:30:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 2385,
"name": "index",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2358,
"src": "11878:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "11845:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2387,
"nodeType": "ExpressionStatement",
"src": "11845:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"id": 2388,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "11893:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2390,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "pop",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "11893:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 2391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "11893:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2392,
"nodeType": "ExpressionStatement",
"src": "11893:13:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2402,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2393,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "11916:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2395,
"indexExpression": {
"argumentTypes": null,
"id": 2394,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "11925:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "11916:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 2397,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11962:5:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2398,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "11988:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2399,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12011:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12035:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2396,
"name": "Record",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1439,
"src": "11934:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_struct$_Record_$1439_storage_ptr_$",
"typeString": "type(struct BPool.Record storage pointer)"
}
},
"id": 2401,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "structConstructorCall",
"lValueRequested": false,
"names": [
"bound",
"index",
"denorm",
"balance"
],
"nodeType": "FunctionCall",
"src": "11934:113:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_memory",
"typeString": "struct BPool.Record memory"
}
},
"src": "11916:131:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2403,
"nodeType": "ExpressionStatement",
"src": "11916:131:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2405,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "12074:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2406,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "12081:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "12081:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2409,
"name": "tokenBalance",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2334,
"src": "12098:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2410,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2341,
"src": "12112:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2408,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "12093:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12093:32:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2404,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "12058:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2412,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12058:68:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2413,
"nodeType": "ExpressionStatement",
"src": "12058:68:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2415,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2304,
"src": "12152:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2416,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "12159:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2417,
"name": "tokenExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2341,
"src": "12169:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2414,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "12136:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2418,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12136:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2419,
"nodeType": "ExpressionStatement",
"src": "12136:46:6"
}
]
},
"documentation": null,
"id": 2421,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2307,
"modifierName": {
"argumentTypes": null,
"id": 2306,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "11235:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "11235:6:6"
},
{
"arguments": null,
"id": 2309,
"modifierName": {
"argumentTypes": null,
"id": 2308,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "11250:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "11250:6:6"
}
],
"name": "unbind",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2305,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2304,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2421,
"src": "11195:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2303,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "11195:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "11194:15:6"
},
"returnParameters": {
"id": 2310,
"nodeType": "ParameterList",
"parameters": [],
"src": "11261:0:6"
},
"scope": 3778,
"src": "11179:1010:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2452,
"nodeType": "Block",
"src": "12351:138:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2431,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12369:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2433,
"indexExpression": {
"argumentTypes": null,
"id": 2432,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12378:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12369:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2434,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12369:21:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2435,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12392:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2430,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12361:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2436,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12361:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2437,
"nodeType": "ExpressionStatement",
"src": "12361:47:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2450,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2438,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12418:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2440,
"indexExpression": {
"argumentTypes": null,
"id": 2439,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12427:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12418:15:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2441,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12418:23:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2447,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6586,
"src": "12476:4:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
],
"id": 2446,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "12468:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2448,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12468:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2443,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2423,
"src": "12451:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2442,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "12444:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 2444,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12444:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 2445,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "balanceOf",
"nodeType": "MemberAccess",
"referencedDeclaration": 6482,
"src": "12444:23:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
"typeString": "function (address) view external returns (uint256)"
}
},
"id": 2449,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12444:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "12418:64:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2451,
"nodeType": "ExpressionStatement",
"src": "12418:64:6"
}
]
},
"documentation": null,
"id": 2453,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2426,
"modifierName": {
"argumentTypes": null,
"id": 2425,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "12325:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12325:6:6"
},
{
"arguments": null,
"id": 2428,
"modifierName": {
"argumentTypes": null,
"id": 2427,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "12340:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12340:6:6"
}
],
"name": "gulp",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2424,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2423,
"name": "token",
"nodeType": "VariableDeclaration",
"scope": 2453,
"src": "12285:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2422,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12285:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12284:15:6"
},
"returnParameters": {
"id": 2429,
"nodeType": "ParameterList",
"parameters": [],
"src": "12351:0:6"
},
"scope": 3778,
"src": "12271:218:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2504,
"nodeType": "Block",
"src": "12630:420:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2465,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12648:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2467,
"indexExpression": {
"argumentTypes": null,
"id": 2466,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2455,
"src": "12657:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12648:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2468,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12648:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2469,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12673:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2464,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12640:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2470,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12640:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2471,
"nodeType": "ExpressionStatement",
"src": "12640:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2473,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12707:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2475,
"indexExpression": {
"argumentTypes": null,
"id": 2474,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2457,
"src": "12716:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12707:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2476,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "12707:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2477,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "12733:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2472,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "12699:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12699:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2479,
"nodeType": "ExpressionStatement",
"src": "12699:50:6"
},
{
"assignments": [
2481
],
"declarations": [
{
"constant": false,
"id": 2481,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 2504,
"src": "12759:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2480,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "12759:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2485,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2482,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12785:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2484,
"indexExpression": {
"argumentTypes": null,
"id": 2483,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2455,
"src": "12794:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12785:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12759:43:6"
},
{
"assignments": [
2487
],
"declarations": [
{
"constant": false,
"id": 2487,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 2504,
"src": "12812:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2486,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "12812:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2491,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2488,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "12839:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2490,
"indexExpression": {
"argumentTypes": null,
"id": 2489,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2457,
"src": "12848:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "12839:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "12812:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2493,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2481,
"src": "12901:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2494,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12901:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2495,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2481,
"src": "12932:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2496,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "12932:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2497,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2487,
"src": "12962:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2498,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "12962:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2499,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2487,
"src": "12994:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2500,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "12994:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2501,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "13025:8:6",
"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"
}
],
"id": 2492,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "12874:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2502,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "12874:169:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2463,
"id": 2503,
"nodeType": "Return",
"src": "12867:176:6"
}
]
},
"documentation": null,
"id": 2505,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2460,
"modifierName": {
"argumentTypes": null,
"id": 2459,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "12582:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "12582:10:6"
}
],
"name": "getSpotPrice",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2458,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2455,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12517:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2454,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12517:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2457,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12534:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2456,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "12534:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12516:35:6"
},
"returnParameters": {
"id": 2463,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2462,
"name": "spotPrice",
"nodeType": "VariableDeclaration",
"scope": 2505,
"src": "12610:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2461,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "12610:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "12609:16:6"
},
"scope": 3778,
"src": "12495:555:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2556,
"nodeType": "Block",
"src": "13198:413:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2517,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13216:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2519,
"indexExpression": {
"argumentTypes": null,
"id": 2518,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2507,
"src": "13225:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13216:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2520,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "13216:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2521,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13241:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2516,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13208:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13208:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2523,
"nodeType": "ExpressionStatement",
"src": "13208:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2525,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13275:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2527,
"indexExpression": {
"argumentTypes": null,
"id": 2526,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2509,
"src": "13284:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13275:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2528,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "13275:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2529,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13301:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2524,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13267:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13267:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2531,
"nodeType": "ExpressionStatement",
"src": "13267:50:6"
},
{
"assignments": [
2533
],
"declarations": [
{
"constant": false,
"id": 2533,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 2556,
"src": "13327:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2532,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "13327:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2537,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2534,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13353:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2536,
"indexExpression": {
"argumentTypes": null,
"id": 2535,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2507,
"src": "13362:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13353:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13327:43:6"
},
{
"assignments": [
2539
],
"declarations": [
{
"constant": false,
"id": 2539,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 2556,
"src": "13380:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2538,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "13380:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2543,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2540,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "13407:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2542,
"indexExpression": {
"argumentTypes": null,
"id": 2541,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2509,
"src": "13416:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "13407:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13380:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2545,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2533,
"src": "13469:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2546,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "13469:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2547,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2533,
"src": "13500:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2548,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "13500:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2549,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2539,
"src": "13530:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2550,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "13530:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2551,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2539,
"src": "13562:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2552,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "13562:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"hexValue": "30",
"id": 2553,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13593:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 2544,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "13442:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2554,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13442:162:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 2515,
"id": 2555,
"nodeType": "Return",
"src": "13435:169:6"
}
]
},
"documentation": null,
"id": 2557,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2512,
"modifierName": {
"argumentTypes": null,
"id": 2511,
"name": "_viewlock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1516,
"src": "13150:10:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13150:10:6"
}
],
"name": "getSpotPriceSansFee",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2510,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2507,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13085:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2506,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13085:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2509,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13102:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2508,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13102:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13084:35:6"
},
"returnParameters": {
"id": 2515,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2514,
"name": "spotPrice",
"nodeType": "VariableDeclaration",
"scope": 2557,
"src": "13178:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2513,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13178:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13177:16:6"
},
"scope": 3778,
"src": "13056:555:6",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2679,
"nodeType": "Block",
"src": "13736:806:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2570,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "13754:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 2571,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13766:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 2569,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13746:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13746:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2573,
"nodeType": "ExpressionStatement",
"src": "13746:40:6"
},
{
"assignments": [
2575
],
"declarations": [
{
"constant": false,
"id": 2575,
"name": "poolTotal",
"nodeType": "VariableDeclaration",
"scope": 2679,
"src": "13797:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2574,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13797:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2578,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2576,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4052,
"src": "13814:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2577,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13814:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13797:30:6"
},
{
"assignments": [
2580
],
"declarations": [
{
"constant": false,
"id": 2580,
"name": "ratio",
"nodeType": "VariableDeclaration",
"scope": 2679,
"src": "13837:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2579,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13837:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2585,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2582,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "13855:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2583,
"name": "poolTotal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2575,
"src": "13870:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2581,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "13850:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2584,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13850:30:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13837:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2589,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2587,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2580,
"src": "13898:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2588,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13907:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "13898:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13910:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2586,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "13890:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "13890:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2592,
"nodeType": "ExpressionStatement",
"src": "13890:38:6"
},
{
"body": {
"id": 2667,
"nodeType": "Block",
"src": "13981:465:6",
"statements": [
{
"assignments": [
2605
],
"declarations": [
{
"constant": false,
"id": 2605,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "13995:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2604,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "13995:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2609,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2606,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "14007:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2608,
"indexExpression": {
"argumentTypes": null,
"id": 2607,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "14015:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14007:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "13995:22:6"
},
{
"assignments": [
2611
],
"declarations": [
{
"constant": false,
"id": 2611,
"name": "bal",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "14031:8:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2610,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14031:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2616,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2612,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14042:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2614,
"indexExpression": {
"argumentTypes": null,
"id": 2613,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14051:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14042:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2615,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14042:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14031:30:6"
},
{
"assignments": [
2618
],
"declarations": [
{
"constant": false,
"id": 2618,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 2667,
"src": "14075:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2617,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14075:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2623,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2620,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2580,
"src": "14101:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2621,
"name": "bal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2611,
"src": "14108:3:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2619,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "14096:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14096:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14075:37:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2627,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2625,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14134:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2626,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14151:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "14134:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2628,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14154:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2624,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14126:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2629,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14126:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2630,
"nodeType": "ExpressionStatement",
"src": "14126:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2636,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2632,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14194:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2633,
"name": "maxAmountsIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2562,
"src": "14211:12:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[] calldata"
}
},
"id": 2635,
"indexExpression": {
"argumentTypes": null,
"id": 2634,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "14224:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14211:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "14194:32:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 2637,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14228:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 2631,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14186:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2638,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14186:57:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2639,
"nodeType": "ExpressionStatement",
"src": "14186:57:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2651,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2640,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14257:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2642,
"indexExpression": {
"argumentTypes": null,
"id": 2641,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14266:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14257:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2643,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14257:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2645,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "14284:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2647,
"indexExpression": {
"argumentTypes": null,
"id": 2646,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14293:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "14284:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2648,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "14284:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2649,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14305:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2644,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "14279:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2650,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14279:40:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "14257:62:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2652,
"nodeType": "ExpressionStatement",
"src": "14257:62:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2654,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14347:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2655,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14347:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2656,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14359:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2657,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14362:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2653,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "14338:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2658,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14338:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2659,
"nodeType": "EmitStatement",
"src": "14333:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2661,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2605,
"src": "14406:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2662,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14409:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2663,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14409:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2664,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2618,
"src": "14421:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2660,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "14390:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2665,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14390:45:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2666,
"nodeType": "ExpressionStatement",
"src": "14390:45:6"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2600,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2597,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "13956:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2598,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "13960:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2599,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "13960:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "13956:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2668,
"initializationExpression": {
"assignments": [
2594
],
"declarations": [
{
"constant": false,
"id": 2594,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2668,
"src": "13944:6:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2593,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13944:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2596,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2595,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "13953:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "13944:10:6"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2602,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "13976:3:6",
"subExpression": {
"argumentTypes": null,
"id": 2601,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2594,
"src": "13976:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2603,
"nodeType": "ExpressionStatement",
"src": "13976:3:6"
},
"nodeType": "ForStatement",
"src": "13939:507:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2670,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "14470:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2669,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "14455:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2671,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14455:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2672,
"nodeType": "ExpressionStatement",
"src": "14455:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2674,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "14509:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2675,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "14509:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2676,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2559,
"src": "14521:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2673,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "14494:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2677,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14494:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2678,
"nodeType": "ExpressionStatement",
"src": "14494:41:6"
}
]
},
"documentation": null,
"id": 2680,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2565,
"modifierName": {
"argumentTypes": null,
"id": 2564,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "13710:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13710:6:6"
},
{
"arguments": null,
"id": 2567,
"modifierName": {
"argumentTypes": null,
"id": 2566,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "13725:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "13725:6:6"
}
],
"name": "joinPool",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2563,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2559,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 2680,
"src": "13635:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2558,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13635:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2562,
"name": "maxAmountsIn",
"nodeType": "VariableDeclaration",
"scope": 2680,
"src": "13655:28:6",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2560,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13655:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2561,
"length": null,
"nodeType": "ArrayTypeName",
"src": "13655:6:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "13634:50:6"
},
"returnParameters": {
"id": 2568,
"nodeType": "ParameterList",
"parameters": [],
"src": "13736:0:6"
},
"scope": 3778,
"src": "13617:925:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 2821,
"nodeType": "Block",
"src": "14667:975:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2693,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "14685:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 2694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14697:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 2692,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14677:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2695,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14677:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2696,
"nodeType": "ExpressionStatement",
"src": "14677:40:6"
},
{
"assignments": [
2698
],
"declarations": [
{
"constant": false,
"id": 2698,
"name": "poolTotal",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14728:14:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2697,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14728:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2701,
"initialValue": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 2699,
"name": "totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4052,
"src": "14745:11:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
"typeString": "function () view returns (uint256)"
}
},
"id": 2700,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14745:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14728:30:6"
},
{
"assignments": [
2703
],
"declarations": [
{
"constant": false,
"id": 2703,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14768:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2702,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14768:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2708,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2705,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "14788:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2706,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "14802:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2704,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "14783:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2707,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14783:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14768:43:6"
},
{
"assignments": [
2710
],
"declarations": [
{
"constant": false,
"id": 2710,
"name": "pAiAfterExitFee",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14821:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2709,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14821:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2715,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2712,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "14849:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2713,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2703,
"src": "14863:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2711,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "14844:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2714,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14844:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14821:50:6"
},
{
"assignments": [
2717
],
"declarations": [
{
"constant": false,
"id": 2717,
"name": "ratio",
"nodeType": "VariableDeclaration",
"scope": 2821,
"src": "14881:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2716,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14881:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2722,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2719,
"name": "pAiAfterExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2710,
"src": "14899:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2720,
"name": "poolTotal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2698,
"src": "14916:9:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2718,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "14894:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2721,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14894:32:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "14881:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2726,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2724,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2717,
"src": "14944:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2725,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14953:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "14944:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "14956:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2723,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "14936:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14936:38:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2729,
"nodeType": "ExpressionStatement",
"src": "14936:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2731,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15000:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2732,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15000:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2733,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2682,
"src": "15012:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2730,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "14985:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2734,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "14985:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2735,
"nodeType": "ExpressionStatement",
"src": "14985:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2737,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "15050:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2738,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2703,
"src": "15060:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2736,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "15035:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 2739,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15035:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2740,
"nodeType": "ExpressionStatement",
"src": "15035:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2742,
"name": "pAiAfterExitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2710,
"src": "15093:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2741,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "15078:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 2743,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15078:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2744,
"nodeType": "ExpressionStatement",
"src": "15078:31:6"
},
{
"body": {
"id": 2819,
"nodeType": "Block",
"src": "15162:473:6",
"statements": [
{
"assignments": [
2757
],
"declarations": [
{
"constant": false,
"id": 2757,
"name": "t",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15176:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2756,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15176:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2761,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2758,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "15188:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2760,
"indexExpression": {
"argumentTypes": null,
"id": 2759,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15196:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15188:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15176:22:6"
},
{
"assignments": [
2763
],
"declarations": [
{
"constant": false,
"id": 2763,
"name": "bal",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15212:8:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2762,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15212:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2768,
"initialValue": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2764,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15223:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2766,
"indexExpression": {
"argumentTypes": null,
"id": 2765,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15232:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15223:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2767,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15223:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15212:30:6"
},
{
"assignments": [
2770
],
"declarations": [
{
"constant": false,
"id": 2770,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 2819,
"src": "15256:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2769,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15256:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2775,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2772,
"name": "ratio",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2717,
"src": "15283:5:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2773,
"name": "bal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2763,
"src": "15290:3:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2771,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "15278:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15278:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "15256:38:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2779,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2777,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15316:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 2778,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15334:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "15316:19:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2780,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15337:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2776,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15308:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2781,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15308:47:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2782,
"nodeType": "ExpressionStatement",
"src": "15308:47:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2788,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2784,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15377:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2785,
"name": "minAmountsOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2685,
"src": "15395:13:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[] calldata"
}
},
"id": 2787,
"indexExpression": {
"argumentTypes": null,
"id": 2786,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15409:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15395:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15377:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 2789,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15413:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 2783,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15369:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2790,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15369:60:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2791,
"nodeType": "ExpressionStatement",
"src": "15369:60:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2803,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2792,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15443:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2794,
"indexExpression": {
"argumentTypes": null,
"id": 2793,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15452:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15443:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2795,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15443:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2797,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15470:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2799,
"indexExpression": {
"argumentTypes": null,
"id": 2798,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15479:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15470:11:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2800,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "15470:19:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2801,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15491:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2796,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "15465:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2802,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15465:41:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15443:63:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2804,
"nodeType": "ExpressionStatement",
"src": "15443:63:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2806,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15534:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2807,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15534:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2808,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15546:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2809,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15549:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2805,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "15525:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2810,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15525:39:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2811,
"nodeType": "EmitStatement",
"src": "15520:44:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2813,
"name": "t",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2757,
"src": "15594:1:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2814,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "15597:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2815,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15597:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2816,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2770,
"src": "15609:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2812,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "15578:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 2817,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15578:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2818,
"nodeType": "ExpressionStatement",
"src": "15578:46:6"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2752,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2749,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15137:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2750,
"name": "_tokens",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1531,
"src": "15141:7:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage",
"typeString": "address[] storage ref"
}
},
"id": 2751,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "15141:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "15137:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 2820,
"initializationExpression": {
"assignments": [
2746
],
"declarations": [
{
"constant": false,
"id": 2746,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 2820,
"src": "15125:6:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2745,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15125:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2748,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 2747,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15134:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "15125:10:6"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 2754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "15157:3:6",
"subExpression": {
"argumentTypes": null,
"id": 2753,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2746,
"src": "15157:1:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2755,
"nodeType": "ExpressionStatement",
"src": "15157:3:6"
},
"nodeType": "ForStatement",
"src": "15120:515:6"
}
]
},
"documentation": null,
"id": 2822,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2688,
"modifierName": {
"argumentTypes": null,
"id": 2687,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "14641:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "14641:6:6"
},
{
"arguments": null,
"id": 2690,
"modifierName": {
"argumentTypes": null,
"id": 2689,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "14656:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "14656:6:6"
}
],
"name": "exitPool",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2686,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2682,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 2822,
"src": "14566:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2681,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14566:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2685,
"name": "minAmountsOut",
"nodeType": "VariableDeclaration",
"scope": 2822,
"src": "14585:29:6",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 2683,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14585:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2684,
"length": null,
"nodeType": "ArrayTypeName",
"src": "14585:6:6",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "14565:50:6"
},
"returnParameters": {
"id": 2691,
"nodeType": "ParameterList",
"parameters": [],
"src": "14667:0:6"
},
"scope": 3778,
"src": "14548:1094:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3019,
"nodeType": "Block",
"src": "15921:1921:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2844,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15940:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2846,
"indexExpression": {
"argumentTypes": null,
"id": 2845,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "15949:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15940:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2847,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "15940:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2848,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "15965:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2843,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15932:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2849,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15932:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2850,
"nodeType": "ExpressionStatement",
"src": "15932:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2852,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "15999:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2854,
"indexExpression": {
"argumentTypes": null,
"id": 2853,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "16008:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "15999:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 2855,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "15999:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 2856,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16025:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 2851,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "15991:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2857,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "15991:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2858,
"nodeType": "ExpressionStatement",
"src": "15991:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2860,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "16059:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f535741505f4e4f545f5055424c4943",
"id": 2861,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16072:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
},
"value": "ERR_SWAP_NOT_PUBLIC"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
}
],
"id": 2859,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16051:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2862,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16051:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2863,
"nodeType": "ExpressionStatement",
"src": "16051:43:6"
},
{
"assignments": [
2865
],
"declarations": [
{
"constant": false,
"id": 2865,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16105:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2864,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "16105:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2871,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2866,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "16131:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2870,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2868,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "16148:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2867,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16140:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2869,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16140:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "16131:26:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16105:52:6"
},
{
"assignments": [
2873
],
"declarations": [
{
"constant": false,
"id": 2873,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16167:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 2872,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "16167:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2879,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 2874,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "16194:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 2878,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2876,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "16211:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 2875,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "16203:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 2877,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16203:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "16194:27:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16167:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2887,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2881,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16253:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2883,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16275:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2884,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16275:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2885,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "16293:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2882,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "16270:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2886,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16270:36:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16253:53:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 2888,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16321:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 2880,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16232:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2889,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16232:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2890,
"nodeType": "ExpressionStatement",
"src": "16232:117:6"
},
{
"assignments": [
2892
],
"declarations": [
{
"constant": false,
"id": 2892,
"name": "spotPriceBefore",
"nodeType": "VariableDeclaration",
"scope": 3019,
"src": "16360:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2891,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "16360:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 2904,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2894,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16410:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2895,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16410:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2896,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16440:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2897,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16440:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2898,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16469:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2899,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16469:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2900,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16500:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2901,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16500:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2902,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "16530:8:6",
"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"
}
],
"id": 2893,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "16383:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2903,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16383:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "16360:188:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2908,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2906,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "16566:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2907,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2832,
"src": "16585:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16566:27:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4241445f4c494d49545f5052494345",
"id": 2909,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16595:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
},
"value": "ERR_BAD_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
}
],
"id": 2905,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16558:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2910,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16558:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2911,
"nodeType": "ExpressionStatement",
"src": "16558:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2925,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2912,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "16628:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2914,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16673:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2915,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16673:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2916,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16703:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2917,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16703:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2918,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16732:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2919,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16732:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2920,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16763:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2921,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "16763:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2922,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16793:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2923,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "16820:8:6",
"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"
}
],
"id": 2913,
"name": "calcOutGivenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 510,
"src": "16645:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 2924,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16645:193:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16628:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2926,
"nodeType": "ExpressionStatement",
"src": "16628:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2930,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2928,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "16856:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2929,
"name": "minAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2830,
"src": "16874:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16856:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 2931,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "16888:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 2927,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "16848:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2932,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16848:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2933,
"nodeType": "ExpressionStatement",
"src": "16848:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2942,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2934,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16915:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2936,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16915:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2938,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "16939:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2939,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16939:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2940,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "16957:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2937,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "16934:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2941,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "16934:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16915:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2943,
"nodeType": "ExpressionStatement",
"src": "16915:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2952,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2944,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "16981:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2946,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "16981:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2948,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17006:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2949,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17006:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2950,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17025:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2947,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "17001:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2951,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17001:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "16981:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2953,
"nodeType": "ExpressionStatement",
"src": "16981:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 2966,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 2954,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17051:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2956,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "17095:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2957,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17095:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2958,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2865,
"src": "17125:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2959,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "17125:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2960,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17154:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2961,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "17154:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2962,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2873,
"src": "17185:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 2963,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "17185:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2964,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "17215:8:6",
"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"
}
],
"id": 2955,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "17068:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 2965,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17068:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17051:182:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2967,
"nodeType": "ExpressionStatement",
"src": "17051:182:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2971,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2969,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17251:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 2970,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "17269:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17251:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2972,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17286:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2968,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17243:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2973,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17243:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2974,
"nodeType": "ExpressionStatement",
"src": "17243:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2978,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2976,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17327:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 2977,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2832,
"src": "17345:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17327:26:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f5052494345",
"id": 2979,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17355:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
},
"value": "ERR_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
}
],
"id": 2975,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17319:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2980,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17319:54:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2981,
"nodeType": "ExpressionStatement",
"src": "17319:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 2988,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 2983,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2892,
"src": "17404:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 2985,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17428:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2986,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17443:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2984,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "17423:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 2987,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17423:35:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "17404:54:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 2989,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "17473:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 2982,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "17383:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 2990,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17383:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 2991,
"nodeType": "ExpressionStatement",
"src": "17383:117:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 2993,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17538:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 2994,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17538:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 2995,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "17563:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2996,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "17585:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 2997,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17608:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 2998,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17636:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 2992,
"name": "LOG_SWAP",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1451,
"src": "17516:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,address,address,uint256,uint256)"
}
},
"id": 2999,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17516:144:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3000,
"nodeType": "EmitStatement",
"src": "17511:149:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3002,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2824,
"src": "17687:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3003,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17696:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3004,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17696:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3005,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2826,
"src": "17708:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3001,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "17671:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3006,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17671:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3007,
"nodeType": "ExpressionStatement",
"src": "17671:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3009,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2828,
"src": "17748:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3010,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "17758:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3011,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "17758:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3012,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17770:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3008,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "17732:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3013,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "17732:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3014,
"nodeType": "ExpressionStatement",
"src": "17732:53:6"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3015,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2839,
"src": "17804:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3016,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2841,
"src": "17820:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3017,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "17803:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 2842,
"id": 3018,
"nodeType": "Return",
"src": "17796:39:6"
}
]
},
"documentation": null,
"id": 3020,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 2835,
"modifierName": {
"argumentTypes": null,
"id": 2834,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "15836:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "15836:6:6"
},
{
"arguments": null,
"id": 2837,
"modifierName": {
"argumentTypes": null,
"id": 2836,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "15851:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "15851:6:6"
}
],
"name": "swapExactAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2833,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2824,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15685:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2823,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15685:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2826,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15710:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2825,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15710:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2828,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15738:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2827,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "15738:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2830,
"name": "minAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15764:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2829,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15764:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2832,
"name": "maxPrice",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15791:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2831,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15791:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "15675:135:6"
},
"returnParameters": {
"id": 2842,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2839,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15875:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2838,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15875:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 2841,
"name": "spotPriceAfter",
"nodeType": "VariableDeclaration",
"scope": 3020,
"src": "15896:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 2840,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "15896:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "15874:42:6"
},
"scope": 3778,
"src": "15649:2193:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3217,
"nodeType": "Block",
"src": "18121:1924:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3042,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18139:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3044,
"indexExpression": {
"argumentTypes": null,
"id": 3043,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "18148:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18139:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3045,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "18139:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3046,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18164:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3041,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18131:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3047,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18131:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3048,
"nodeType": "ExpressionStatement",
"src": "18131:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3050,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18198:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3052,
"indexExpression": {
"argumentTypes": null,
"id": 3051,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "18207:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18198:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3053,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "18198:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3054,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18224:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3049,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18190:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18190:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3056,
"nodeType": "ExpressionStatement",
"src": "18190:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3058,
"name": "_publicSwap",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1524,
"src": "18258:11:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f535741505f4e4f545f5055424c4943",
"id": 3059,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18271:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
},
"value": "ERR_SWAP_NOT_PUBLIC"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b9f201e8e5bb36571de65b106c220b23ff276fe4fbb13e3a81e8737accb75282",
"typeString": "literal_string \"ERR_SWAP_NOT_PUBLIC\""
}
],
"id": 3057,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18250:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3060,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18250:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3061,
"nodeType": "ExpressionStatement",
"src": "18250:43:6"
},
{
"assignments": [
3063
],
"declarations": [
{
"constant": false,
"id": 3063,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18304:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3062,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "18304:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3069,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3064,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18330:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3068,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3066,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "18347:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3065,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18339:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3067,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18339:16:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18330:26:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18304:52:6"
},
{
"assignments": [
3071
],
"declarations": [
{
"constant": false,
"id": 3071,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18366:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3070,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "18366:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3077,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3072,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "18393:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3076,
"indexExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3074,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "18410:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3073,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "18402:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3075,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18402:17:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "18393:27:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18366:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3085,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3079,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "18452:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3081,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18475:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3082,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18475:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3083,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "18494:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3080,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "18470:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3084,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18470:38:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18452:56:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3086,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18523:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3078,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18431:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3087,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18431:121:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3088,
"nodeType": "ExpressionStatement",
"src": "18431:121:6"
},
{
"assignments": [
3090
],
"declarations": [
{
"constant": false,
"id": 3090,
"name": "spotPriceBefore",
"nodeType": "VariableDeclaration",
"scope": 3217,
"src": "18563:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3089,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18563:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3102,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3092,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18613:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3093,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18613:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3094,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18643:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3095,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18643:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3096,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18672:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3097,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18672:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3098,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18703:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3099,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18703:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3100,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "18733:8:6",
"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"
}
],
"id": 3091,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "18586:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3101,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18586:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "18563:188:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3104,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "18778:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3105,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3030,
"src": "18797:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18778:27:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4241445f4c494d49545f5052494345",
"id": 3107,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "18807:21:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
},
"value": "ERR_BAD_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8be255c2a8eee29f022cb079554d7088e735aa3d5d6f9dc88998c3ffe134ce88",
"typeString": "literal_string \"ERR_BAD_LIMIT_PRICE\""
}
],
"id": 3103,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "18770:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3108,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18770:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3109,
"nodeType": "ExpressionStatement",
"src": "18770:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3123,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3110,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "18840:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3112,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18884:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3113,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18884:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3114,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "18914:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3115,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18914:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3116,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18943:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3117,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "18943:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3118,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "18974:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3119,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "18974:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3120,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19004:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3121,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "19032:8:6",
"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"
}
],
"id": 3111,
"name": "calcInGivenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 582,
"src": "18856:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "18856:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "18840:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3124,
"nodeType": "ExpressionStatement",
"src": "18840:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3126,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19068:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3127,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3024,
"src": "19085:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19068:28:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3129,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19098:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3125,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19060:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3130,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19060:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3131,
"nodeType": "ExpressionStatement",
"src": "19060:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3132,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19124:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3134,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19124:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3136,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19148:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3137,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19148:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3138,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19166:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3135,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "19143:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3139,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19143:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19124:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3141,
"nodeType": "ExpressionStatement",
"src": "19124:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3142,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19190:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3144,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19190:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3146,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19215:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3147,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19215:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3148,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19234:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3145,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "19210:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3149,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19210:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19190:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3151,
"nodeType": "ExpressionStatement",
"src": "19190:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3164,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3152,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19260:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3154,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19304:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3155,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19304:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3156,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3063,
"src": "19334:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3157,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "19334:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3158,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19363:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3159,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "19363:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3160,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3071,
"src": "19394:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3161,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "19394:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3162,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "19424:8:6",
"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"
}
],
"id": 3153,
"name": "calcSpotPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 438,
"src": "19277:13:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256,uint256,uint256,uint256) pure returns (uint256)"
}
},
"id": 3163,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19277:165:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19260:182:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3165,
"nodeType": "ExpressionStatement",
"src": "19260:182:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3169,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3167,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19460:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3168,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "19478:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19460:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3170,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19495:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3166,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19452:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3171,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19452:61:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3172,
"nodeType": "ExpressionStatement",
"src": "19452:61:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3176,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3174,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "19531:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3175,
"name": "maxPrice",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3030,
"src": "19549:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19531:26:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f5052494345",
"id": 3177,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19559:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
},
"value": "ERR_LIMIT_PRICE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b5544ff618944f1e1eee76066a3c4ee71ebb3e4c80a9b96ceaf365ff27739eb5",
"typeString": "literal_string \"ERR_LIMIT_PRICE\""
}
],
"id": 3173,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19523:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3178,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19523:54:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3179,
"nodeType": "ExpressionStatement",
"src": "19523:54:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3186,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3181,
"name": "spotPriceBefore",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3090,
"src": "19608:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3183,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19632:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3184,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19647:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3182,
"name": "bdiv",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1171,
"src": "19627:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19627:35:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "19608:54:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3187,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "19677:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3180,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "19587:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3188,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19587:117:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3189,
"nodeType": "ExpressionStatement",
"src": "19587:117:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3191,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19742:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3192,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19742:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3193,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "19767:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3194,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "19789:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3195,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19812:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3196,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19840:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3190,
"name": "LOG_SWAP",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1451,
"src": "19720:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$",
"typeString": "function (address,address,address,uint256,uint256)"
}
},
"id": 3197,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19720:144:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3198,
"nodeType": "EmitStatement",
"src": "19715:149:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3200,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3022,
"src": "19891:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3201,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19900:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19900:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3203,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "19912:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3199,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "19875:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19875:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3205,
"nodeType": "ExpressionStatement",
"src": "19875:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3207,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3026,
"src": "19952:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3208,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "19962:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3209,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "19962:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3210,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3028,
"src": "19974:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3206,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "19936:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3211,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "19936:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3212,
"nodeType": "ExpressionStatement",
"src": "19936:53:6"
},
{
"expression": {
"argumentTypes": null,
"components": [
{
"argumentTypes": null,
"id": 3213,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3037,
"src": "20008:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3214,
"name": "spotPriceAfter",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3039,
"src": "20023:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 3215,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "20007:31:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$",
"typeString": "tuple(uint256,uint256)"
}
},
"functionReturnParameters": 3040,
"id": 3216,
"nodeType": "Return",
"src": "20000:38:6"
}
]
},
"documentation": null,
"id": 3218,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3033,
"modifierName": {
"argumentTypes": null,
"id": 3032,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "18036:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "18036:6:6"
},
{
"arguments": null,
"id": 3035,
"modifierName": {
"argumentTypes": null,
"id": 3034,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "18051:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "18051:6:6"
}
],
"name": "swapExactAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3031,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3022,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17885:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3021,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "17885:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3024,
"name": "maxAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17910:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3023,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17910:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3026,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17936:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3025,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "17936:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3028,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17962:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3027,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17962:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3030,
"name": "maxPrice",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "17991:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3029,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17991:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "17875:135:6"
},
"returnParameters": {
"id": 3040,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3037,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "18076:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3036,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18076:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3039,
"name": "spotPriceAfter",
"nodeType": "VariableDeclaration",
"scope": 3218,
"src": "18096:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3038,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "18096:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "18075:41:6"
},
"scope": 3778,
"src": "17848:2197:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3321,
"nodeType": "Block",
"src": "20265:915:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3234,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "20291:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3235,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20303:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3233,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20283:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20283:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3237,
"nodeType": "ExpressionStatement",
"src": "20283:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3239,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20341:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3241,
"indexExpression": {
"argumentTypes": null,
"id": 3240,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20350:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20341:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3242,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "20341:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3243,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20366:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3238,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20333:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20333:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3245,
"nodeType": "ExpressionStatement",
"src": "20333:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3255,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3247,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20413:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3249,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20435:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3251,
"indexExpression": {
"argumentTypes": null,
"id": 3250,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20444:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20435:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3252,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20435:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3253,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "20462:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3248,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "20430:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3254,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20430:45:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20413:62:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 3256,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20490:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 3246,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20392:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20392:126:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3258,
"nodeType": "ExpressionStatement",
"src": "20392:126:6"
},
{
"assignments": [
3260
],
"declarations": [
{
"constant": false,
"id": 3260,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3321,
"src": "20529:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3259,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "20529:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3264,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3261,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "20555:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3263,
"indexExpression": {
"argumentTypes": null,
"id": 3262,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20564:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "20555:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "20529:43:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3276,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3265,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "20583:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3267,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20637:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3268,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20637:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3269,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20667:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3270,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "20667:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3271,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "20696:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3272,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "20722:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3273,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20748:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3274,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "20775:8:6",
"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"
}
],
"id": 3266,
"name": "calcPoolOutGivenSingleIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 664,
"src": "20599:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3275,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20599:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20583:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3277,
"nodeType": "ExpressionStatement",
"src": "20583:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3281,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3279,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "20812:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3280,
"name": "minPoolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3224,
"src": "20829:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20812:33:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 3282,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "20847:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 3278,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "20804:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3283,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20804:59:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3284,
"nodeType": "ExpressionStatement",
"src": "20804:59:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3293,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3285,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20874:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3287,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20874:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3289,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3260,
"src": "20898:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3290,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "20898:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3291,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20916:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3288,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "20893:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3292,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20893:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "20874:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3294,
"nodeType": "ExpressionStatement",
"src": "20874:56:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3296,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "20955:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3297,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "20955:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3298,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "20967:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3299,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "20976:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3295,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "20946:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3300,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "20946:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3301,
"nodeType": "EmitStatement",
"src": "20941:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3303,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21016:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3302,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "21001:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3304,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21001:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3305,
"nodeType": "ExpressionStatement",
"src": "21001:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3307,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "21055:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3308,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "21055:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3309,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21067:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3306,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "21040:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3310,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21040:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3311,
"nodeType": "ExpressionStatement",
"src": "21040:41:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3313,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3220,
"src": "21107:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3314,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "21116:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "21116:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3316,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3222,
"src": "21128:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3312,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "21091:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3317,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21091:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3318,
"nodeType": "ExpressionStatement",
"src": "21091:51:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3319,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3231,
"src": "21160:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3232,
"id": 3320,
"nodeType": "Return",
"src": "21153:20:6"
}
]
},
"documentation": null,
"id": 3322,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3227,
"modifierName": {
"argumentTypes": null,
"id": 3226,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "20201:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "20201:6:6"
},
{
"arguments": null,
"id": 3229,
"modifierName": {
"argumentTypes": null,
"id": 3228,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "20216:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "20216:6:6"
}
],
"name": "joinswapExternAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3225,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3220,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20093:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3219,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "20093:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3222,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20119:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3221,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20119:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3224,
"name": "minPoolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20148:21:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3223,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20148:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "20083:92:6"
},
"returnParameters": {
"id": 3232,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3231,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3322,
"src": "20240:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3230,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "20240:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "20239:20:6"
},
"scope": 3778,
"src": "20052:1128:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3432,
"nodeType": "Block",
"src": "21392:966:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3338,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "21410:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3339,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21422:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3337,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21402:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3340,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21402:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3341,
"nodeType": "ExpressionStatement",
"src": "21402:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3343,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21460:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3345,
"indexExpression": {
"argumentTypes": null,
"id": 3344,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21469:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21460:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3346,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "21460:23:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3347,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21485:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3342,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21452:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3348,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21452:49:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3349,
"nodeType": "ExpressionStatement",
"src": "21452:49:6"
},
{
"assignments": [
3351
],
"declarations": [
{
"constant": false,
"id": 3351,
"name": "inRecord",
"nodeType": "VariableDeclaration",
"scope": 3432,
"src": "21512:23:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3350,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "21512:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3355,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3352,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21538:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3354,
"indexExpression": {
"argumentTypes": null,
"id": 3353,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21547:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21538:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "21512:43:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3367,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3356,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21566:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3358,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "21620:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3359,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "21620:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3360,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "21650:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3361,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "21650:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3362,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "21679:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3363,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "21705:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3364,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "21731:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3365,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "21758:8:6",
"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"
}
],
"id": 3357,
"name": "calcSingleInGivenPoolOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 753,
"src": "21582:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3366,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21582:194:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21566:210:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3368,
"nodeType": "ExpressionStatement",
"src": "21566:210:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3372,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3370,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21795:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3371,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21812:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "21795:18:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3373,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21815:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3369,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21787:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3374,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21787:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3375,
"nodeType": "ExpressionStatement",
"src": "21787:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3379,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3377,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21851:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3378,
"name": "maxAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3328,
"src": "21868:11:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21851:28:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3380,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "21881:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3376,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21843:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3381,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21843:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3382,
"nodeType": "ExpressionStatement",
"src": "21843:53:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3392,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3384,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "21936:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3386,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "21958:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3388,
"indexExpression": {
"argumentTypes": null,
"id": 3387,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "21967:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "21958:17:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3389,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "21958:25:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3390,
"name": "MAX_IN_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 271,
"src": "21985:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3385,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "21953:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3391,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21953:45:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "21936:62:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f494e5f524154494f",
"id": 3393,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22013:18:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
},
"value": "ERR_MAX_IN_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_3050677a696f4e0f0af7fbd29d6f24f52a3873a4edbfdfefdc5ce1465c444acf",
"typeString": "literal_string \"ERR_MAX_IN_RATIO\""
}
],
"id": 3383,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "21915:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3394,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "21915:126:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3395,
"nodeType": "ExpressionStatement",
"src": "21915:126:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3404,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3396,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "22052:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3398,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22052:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3400,
"name": "inRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3351,
"src": "22076:8:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3401,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22076:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3402,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22094:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3399,
"name": "badd",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1001,
"src": "22071:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22071:37:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22052:56:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3405,
"nodeType": "ExpressionStatement",
"src": "22052:56:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3407,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22133:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3408,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22133:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3409,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "22145:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3410,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22154:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3406,
"name": "LOG_JOIN",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1459,
"src": "22124:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3411,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22124:44:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3412,
"nodeType": "EmitStatement",
"src": "22119:49:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3414,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "22194:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3413,
"name": "_mintPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3767,
"src": "22179:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3415,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22179:29:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3416,
"nodeType": "ExpressionStatement",
"src": "22179:29:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3418,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22233:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3419,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22233:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3420,
"name": "poolAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3326,
"src": "22245:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3417,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "22218:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3421,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22218:41:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3422,
"nodeType": "ExpressionStatement",
"src": "22218:41:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3424,
"name": "tokenIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3324,
"src": "22285:7:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3425,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "22294:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3426,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "22294:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3427,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22306:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3423,
"name": "_pullUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3706,
"src": "22269:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3428,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22269:51:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3429,
"nodeType": "ExpressionStatement",
"src": "22269:51:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3430,
"name": "tokenAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3335,
"src": "22338:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3336,
"id": 3431,
"nodeType": "Return",
"src": "22331:20:6"
}
]
},
"documentation": null,
"id": 3433,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3331,
"modifierName": {
"argumentTypes": null,
"id": 3330,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "21329:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "21329:6:6"
},
{
"arguments": null,
"id": 3333,
"modifierName": {
"argumentTypes": null,
"id": 3332,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "21344:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "21344:6:6"
}
],
"name": "joinswapPoolAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3329,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3324,
"name": "tokenIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21226:15:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3323,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "21226:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3326,
"name": "poolAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21252:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3325,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21252:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3328,
"name": "maxAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21281:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3327,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21281:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "21216:87:6"
},
"returnParameters": {
"id": 3336,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3335,
"name": "tokenAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3433,
"src": "21368:18:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3334,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "21368:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "21367:20:6"
},
"scope": 3778,
"src": "21186:1172:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3551,
"nodeType": "Block",
"src": "22571:1040:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3449,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "22589:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3450,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22601:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3448,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22581:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3451,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22581:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3452,
"nodeType": "ExpressionStatement",
"src": "22581:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3454,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "22639:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3456,
"indexExpression": {
"argumentTypes": null,
"id": 3455,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "22648:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "22639:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3457,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "22639:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3458,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "22665:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3453,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22631:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3459,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22631:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3460,
"nodeType": "ExpressionStatement",
"src": "22631:50:6"
},
{
"assignments": [
3462
],
"declarations": [
{
"constant": false,
"id": 3462,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3551,
"src": "22692:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3461,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "22692:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3466,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3463,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "22719:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3465,
"indexExpression": {
"argumentTypes": null,
"id": 3464,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "22728:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "22719:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "22692:45:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3478,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3467,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "22748:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3469,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "22803:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3470,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "22803:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3471,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "22834:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3472,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "22834:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3473,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "22864:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3474,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "22890:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3475,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "22916:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3476,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "22942:8:6",
"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"
}
],
"id": 3468,
"name": "calcSingleOutGivenPoolIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 848,
"src": "22765:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3477,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22765:195:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22748:212:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3479,
"nodeType": "ExpressionStatement",
"src": "22748:212:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3483,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3481,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "22979:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"argumentTypes": null,
"id": 3482,
"name": "minAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3439,
"src": "22997:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "22979:30:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f4f5554",
"id": 3484,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23011:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
},
"value": "ERR_LIMIT_OUT"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_665ff818e83fa8776541f5756d1025222aecfe18eeb105729691884778497705",
"typeString": "literal_string \"ERR_LIMIT_OUT\""
}
],
"id": 3480,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "22971:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3485,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "22971:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3486,
"nodeType": "ExpressionStatement",
"src": "22971:56:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3496,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3488,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23067:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3490,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23090:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3492,
"indexExpression": {
"argumentTypes": null,
"id": 3491,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23099:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23090:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3493,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23090:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3494,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "23118:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3489,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23085:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3495,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23085:47:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23067:65:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3497,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23147:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3487,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23046:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3498,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23046:130:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3499,
"nodeType": "ExpressionStatement",
"src": "23046:130:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3508,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3500,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "23187:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3502,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23187:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3504,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3462,
"src": "23212:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3505,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23212:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3506,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23231:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3503,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "23207:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3507,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23207:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23187:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3509,
"nodeType": "ExpressionStatement",
"src": "23187:59:6"
},
{
"assignments": [
3511
],
"declarations": [
{
"constant": false,
"id": 3511,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 3551,
"src": "23257:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3510,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23257:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3516,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3513,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23277:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3514,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "23291:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3512,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23272:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3515,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23272:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "23257:43:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3518,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23325:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3519,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23325:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3520,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23337:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3521,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23347:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3517,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "23316:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3522,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23316:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3523,
"nodeType": "EmitStatement",
"src": "23311:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3525,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23388:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3526,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23388:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3527,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23400:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3524,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "23373:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3528,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23373:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3529,
"nodeType": "ExpressionStatement",
"src": "23373:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3532,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3437,
"src": "23443:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3533,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3511,
"src": "23457:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3531,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "23438:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23438:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3530,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "23423:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23423:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3536,
"nodeType": "ExpressionStatement",
"src": "23423:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3538,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "23491:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3539,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3511,
"src": "23501:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3537,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "23476:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23476:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3541,
"nodeType": "ExpressionStatement",
"src": "23476:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3543,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3435,
"src": "23535:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3544,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "23545:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "23545:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3546,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23557:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3542,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "23519:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23519:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3548,
"nodeType": "ExpressionStatement",
"src": "23519:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3549,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3446,
"src": "23590:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3447,
"id": 3550,
"nodeType": "Return",
"src": "23583:21:6"
}
]
},
"documentation": null,
"id": 3552,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3442,
"modifierName": {
"argumentTypes": null,
"id": 3441,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "22507:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "22507:6:6"
},
{
"arguments": null,
"id": 3444,
"modifierName": {
"argumentTypes": null,
"id": 3443,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "22522:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "22522:6:6"
}
],
"name": "exitswapPoolAmountIn",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3440,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3435,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22403:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3434,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "22403:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3437,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22430:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3436,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22430:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3439,
"name": "minAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22458:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3438,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22458:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "22393:88:6"
},
"returnParameters": {
"id": 3447,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3446,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3552,
"src": "22546:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3445,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "22546:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "22545:21:6"
},
"scope": 3778,
"src": "22364:1247:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3677,
"nodeType": "Block",
"src": "23830:1092:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3568,
"name": "_finalized",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1528,
"src": "23848:10:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f46494e414c495a4544",
"id": 3569,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23860:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
},
"value": "ERR_NOT_FINALIZED"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e0a50e0802c41001c819a1d72124e98da239dcaeee85bac2236e5d8595f284f",
"typeString": "literal_string \"ERR_NOT_FINALIZED\""
}
],
"id": 3567,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23840:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3570,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23840:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3571,
"nodeType": "ExpressionStatement",
"src": "23840:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3573,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23898:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3575,
"indexExpression": {
"argumentTypes": null,
"id": 3574,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "23907:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23898:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3576,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "bound",
"nodeType": "MemberAccess",
"referencedDeclaration": 1432,
"src": "23898:24:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4e4f545f424f554e44",
"id": 3577,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "23924:15:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
},
"value": "ERR_NOT_BOUND"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_86a01019fb9a24504897a9ddf06d43e29c7ad173d46588f4f7aa1ef14d3c847c",
"typeString": "literal_string \"ERR_NOT_BOUND\""
}
],
"id": 3572,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23890:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3578,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23890:50:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3579,
"nodeType": "ExpressionStatement",
"src": "23890:50:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3589,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3581,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "23971:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3583,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "23994:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3585,
"indexExpression": {
"argumentTypes": null,
"id": 3584,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24003:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "23994:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"id": 3586,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "23994:26:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3587,
"name": "MAX_OUT_RATIO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 279,
"src": "24022:13:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3582,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "23989:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3588,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23989:47:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "23971:65:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d41585f4f55545f524154494f",
"id": 3590,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24051:19:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
},
"value": "ERR_MAX_OUT_RATIO"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_863cb4bcd0b8884f90860e9fca5a02b421b5bc6a33c8399eb7f6df0648d0555a",
"typeString": "literal_string \"ERR_MAX_OUT_RATIO\""
}
],
"id": 3580,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "23950:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "23950:130:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3592,
"nodeType": "ExpressionStatement",
"src": "23950:130:6"
},
{
"assignments": [
3594
],
"declarations": [
{
"constant": false,
"id": 3594,
"name": "outRecord",
"nodeType": "VariableDeclaration",
"scope": 3677,
"src": "24091:24:6",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
},
"typeName": {
"contractScope": null,
"id": 3593,
"name": "Record",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1439,
"src": "24091:6:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3598,
"initialValue": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 3595,
"name": "_records",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1535,
"src": "24118:8:6",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_Record_$1439_storage_$",
"typeString": "mapping(address => struct BPool.Record storage ref)"
}
},
"id": 3597,
"indexExpression": {
"argumentTypes": null,
"id": 3596,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24127:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "24118:18:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage",
"typeString": "struct BPool.Record storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "24091:45:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3610,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 3599,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24147:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3601,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24200:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3602,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24200:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3603,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24231:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3604,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "denorm",
"nodeType": "MemberAccess",
"referencedDeclaration": 1436,
"src": "24231:16:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3605,
"name": "_totalSupply",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3796,
"src": "24261:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3606,
"name": "_totalWeight",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1537,
"src": "24287:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3607,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24313:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3608,
"name": "_swapFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1526,
"src": "24341:8:6",
"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"
}
],
"id": 3600,
"name": "calcPoolInGivenSingleOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 944,
"src": "24162:24:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_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 returns (uint256)"
}
},
"id": 3609,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24162:197:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24147:212:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3611,
"nodeType": "ExpressionStatement",
"src": "24147:212:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3615,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3613,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24378:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"hexValue": "30",
"id": 3614,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24394:1:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "24378:17:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4d4154485f415050524f58",
"id": 3616,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24397:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
},
"value": "ERR_MATH_APPROX"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_38839817361c628b17e457bae64f619c23ab542714e93cfb021dbd3ddd466187",
"typeString": "literal_string \"ERR_MATH_APPROX\""
}
],
"id": 3612,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "24370:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3617,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24370:45:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3618,
"nodeType": "ExpressionStatement",
"src": "24370:45:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 3622,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 3620,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24433:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<=",
"rightExpression": {
"argumentTypes": null,
"id": 3621,
"name": "maxPoolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3558,
"src": "24449:15:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24433:31:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f4c494d49545f494e",
"id": 3623,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "24466:14:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
},
"value": "ERR_LIMIT_IN"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_7f6da07481837924baab3a15f838b3df11e328050f73de905838535dd369af68",
"typeString": "literal_string \"ERR_LIMIT_IN\""
}
],
"id": 3619,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "24425:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3624,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24425:56:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3625,
"nodeType": "ExpressionStatement",
"src": "24425:56:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3634,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3626,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24492:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3628,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24492:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3630,
"name": "outRecord",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3594,
"src": "24517:9:6",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Record_$1439_storage_ptr",
"typeString": "struct BPool.Record storage pointer"
}
},
"id": 3631,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "balance",
"nodeType": "MemberAccess",
"referencedDeclaration": 1438,
"src": "24517:17:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3632,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24536:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3629,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "24512:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3633,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24512:39:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "24492:59:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 3635,
"nodeType": "ExpressionStatement",
"src": "24492:59:6"
},
{
"assignments": [
3637
],
"declarations": [
{
"constant": false,
"id": 3637,
"name": "exitFee",
"nodeType": "VariableDeclaration",
"scope": 3677,
"src": "24562:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3636,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "24562:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3642,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3639,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24582:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3640,
"name": "EXIT_FEE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 223,
"src": "24596:8:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3638,
"name": "bmul",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1111,
"src": "24577:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3641,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24577:28:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "24562:43:6"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3644,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24630:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3645,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24630:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3646,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24642:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3647,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24652:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3643,
"name": "LOG_EXIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1467,
"src": "24621:8:6",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3648,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24621:46:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3649,
"nodeType": "EmitStatement",
"src": "24616:51:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3651,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24693:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3652,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24693:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3653,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24705:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3650,
"name": "_pullPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3744,
"src": "24678:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3654,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24678:40:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3655,
"nodeType": "ExpressionStatement",
"src": "24678:40:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3658,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24748:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
{
"argumentTypes": null,
"id": 3659,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "24762:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3657,
"name": "bsub",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1028,
"src": "24743:4:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
"typeString": "function (uint256,uint256) pure returns (uint256)"
}
},
"id": 3660,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24743:27:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3656,
"name": "_burnPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3777,
"src": "24728:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3661,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24728:43:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3662,
"nodeType": "ExpressionStatement",
"src": "24728:43:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3664,
"name": "_factory",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1520,
"src": "24796:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3665,
"name": "exitFee",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3637,
"src": "24806:7:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3663,
"name": "_pushPoolShare",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3757,
"src": "24781:14:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3666,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24781:33:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3667,
"nodeType": "ExpressionStatement",
"src": "24781:33:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3669,
"name": "tokenOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3554,
"src": "24840:8:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 3670,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6552,
"src": "24850:3:6",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3671,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "24850:10:6",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"id": 3672,
"name": "tokenAmountOut",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3556,
"src": "24862:14:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3668,
"name": "_pushUnderlying",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3731,
"src": "24824:15:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 3673,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "24824:53:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3674,
"nodeType": "ExpressionStatement",
"src": "24824:53:6"
},
{
"expression": {
"argumentTypes": null,
"id": 3675,
"name": "poolAmountIn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3565,
"src": "24903:12:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 3566,
"id": 3676,
"nodeType": "Return",
"src": "24896:19:6"
}
]
},
"documentation": null,
"id": 3678,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 3561,
"modifierName": {
"argumentTypes": null,
"id": 3560,
"name": "_logs_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1488,
"src": "23768:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "23768:6:6"
},
{
"arguments": null,
"id": 3563,
"modifierName": {
"argumentTypes": null,
"id": 3562,
"name": "_lock_",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1506,
"src": "23783:6:6",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "23783:6:6"
}
],
"name": "exitswapExternAmountOut",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3559,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3554,
"name": "tokenOut",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23659:16:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3553,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "23659:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3556,
"name": "tokenAmountOut",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23686:19:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3555,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23686:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3558,
"name": "maxPoolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23716:20:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3557,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23716:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "23649:93:6"
},
"returnParameters": {
"id": 3566,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3565,
"name": "poolAmountIn",
"nodeType": "VariableDeclaration",
"scope": 3678,
"src": "23807:17:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3564,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "23807:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "23806:19:6"
},
"scope": 3778,
"src": "23617:1305:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": {
"id": 3705,
"nodeType": "Block",
"src": "25176:126:6",
"statements": [
{
"assignments": [
3688
],
"declarations": [
{
"constant": false,
"id": 3688,
"name": "xfer",
"nodeType": "VariableDeclaration",
"scope": 3705,
"src": "25186:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3687,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "25186:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3699,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3693,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3682,
"src": "25225:4:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3695,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6586,
"src": "25239:4:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_BPool_$3778",
"typeString": "contract BPool"
}
],
"id": 3694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "25231:7:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 3696,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25231:13:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3697,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3684,
"src": "25246:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3690,
"name": "erc20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3680,
"src": "25205:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3689,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "25198:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 3691,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25198:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 3692,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transferFrom",
"nodeType": "MemberAccess",
"referencedDeclaration": 6520,
"src": "25198:26:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,address,uint256) external returns (bool)"
}
},
"id": 3698,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25198:55:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "25186:67:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3701,
"name": "xfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3688,
"src": "25271:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f45524332305f46414c5345",
"id": 3702,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "25277:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
},
"value": "ERR_ERC20_FALSE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
}
],
"id": 3700,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "25263:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3703,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25263:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3704,
"nodeType": "ExpressionStatement",
"src": "25263:32:6"
}
]
},
"documentation": null,
"id": 3706,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pullUnderlying",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3685,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3680,
"name": "erc20",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25113:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3679,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25113:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3682,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25128:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3681,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25128:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3684,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3706,
"src": "25142:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3683,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25142:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25112:42:6"
},
"returnParameters": {
"id": 3686,
"nodeType": "ParameterList",
"parameters": [],
"src": "25176:0:6"
},
"scope": 3778,
"src": "25088:214:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3730,
"nodeType": "Block",
"src": "25394:105:6",
"statements": [
{
"assignments": [
3716
],
"declarations": [
{
"constant": false,
"id": 3716,
"name": "xfer",
"nodeType": "VariableDeclaration",
"scope": 3730,
"src": "25404:9:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 3715,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "25404:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 3724,
"initialValue": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3721,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3710,
"src": "25439:2:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3722,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3712,
"src": "25443:6:6",
"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": 3718,
"name": "erc20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3708,
"src": "25423:5:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 3717,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6537,
"src": "25416:6:6",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$6537_$",
"typeString": "type(contract IERC20)"
}
},
"id": 3719,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25416:13:6",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$6537",
"typeString": "contract IERC20"
}
},
"id": 3720,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 6491,
"src": "25416:22:6",
"typeDescriptions": {
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function (address,uint256) external returns (bool)"
}
},
"id": 3723,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25416:34:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "25404:46:6"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3726,
"name": "xfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3716,
"src": "25468:4:6",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4552525f45524332305f46414c5345",
"id": 3727,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "25474:17:6",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
},
"value": "ERR_ERC20_FALSE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_cfe847c677cf42c21ce03ee8e7625272fdefc571a2ce6d0eacad2e7c6f42fc3f",
"typeString": "literal_string \"ERR_ERC20_FALSE\""
}
],
"id": 3725,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
6555,
6556
],
"referencedDeclaration": 6556,
"src": "25460:7:6",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 3728,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25460:32:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3729,
"nodeType": "ExpressionStatement",
"src": "25460:32:6"
}
]
},
"documentation": null,
"id": 3731,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pushUnderlying",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3713,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3708,
"name": "erc20",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25333:13:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3707,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25333:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3710,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25348:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3709,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25348:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3712,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3731,
"src": "25360:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3711,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25360:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25332:40:6"
},
"returnParameters": {
"id": 3714,
"nodeType": "ParameterList",
"parameters": [],
"src": "25394:0:6"
},
"scope": 3778,
"src": "25308:191:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3743,
"nodeType": "Block",
"src": "25577:36:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3739,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3733,
"src": "25593:4:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3740,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3735,
"src": "25599:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3738,
"name": "_pull",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3978,
"src": "25587:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3741,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25587:19:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3742,
"nodeType": "ExpressionStatement",
"src": "25587:19:6"
}
]
},
"documentation": null,
"id": 3744,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pullPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3736,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3733,
"name": "from",
"nodeType": "VariableDeclaration",
"scope": 3744,
"src": "25529:12:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3732,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25529:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3735,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3744,
"src": "25543:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3734,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25543:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25528:27:6"
},
"returnParameters": {
"id": 3737,
"nodeType": "ParameterList",
"parameters": [],
"src": "25577:0:6"
},
"scope": 3778,
"src": "25505:108:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3756,
"nodeType": "Block",
"src": "25689:34:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3752,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3746,
"src": "25705:2:6",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 3753,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3748,
"src": "25709:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3751,
"name": "_push",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3962,
"src": "25699:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,uint256)"
}
},
"id": 3754,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25699:17:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3755,
"nodeType": "ExpressionStatement",
"src": "25699:17:6"
}
]
},
"documentation": null,
"id": 3757,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_pushPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3749,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3746,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 3757,
"src": "25643:10:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3745,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25643:7:6",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 3748,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3757,
"src": "25655:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3747,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25655:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25642:25:6"
},
"returnParameters": {
"id": 3750,
"nodeType": "ParameterList",
"parameters": [],
"src": "25689:0:6"
},
"scope": 3778,
"src": "25619:104:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3766,
"nodeType": "Block",
"src": "25787:30:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3763,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3759,
"src": "25803:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3762,
"name": "_mint",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3850,
"src": "25797:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3764,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25797:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3765,
"nodeType": "ExpressionStatement",
"src": "25797:13:6"
}
]
},
"documentation": null,
"id": 3767,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_mintPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3760,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3759,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3767,
"src": "25753:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3758,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25753:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25752:13:6"
},
"returnParameters": {
"id": 3761,
"nodeType": "ParameterList",
"parameters": [],
"src": "25787:0:6"
},
"scope": 3778,
"src": "25729:88:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
},
{
"body": {
"id": 3776,
"nodeType": "Block",
"src": "25881:30:6",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 3773,
"name": "amount",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3769,
"src": "25897:6:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 3772,
"name": "_burn",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3899,
"src": "25891:5:6",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$",
"typeString": "function (uint256)"
}
},
"id": 3774,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "25891:13:6",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3775,
"nodeType": "ExpressionStatement",
"src": "25891:13:6"
}
]
},
"documentation": null,
"id": 3777,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_burnPoolShare",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3769,
"name": "amount",
"nodeType": "VariableDeclaration",
"scope": 3777,
"src": "25847:11:6",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 3768,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25847:4:6",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "25846:13:6"
},
"returnParameters": {
"id": 3771,
"nodeType": "ParameterList",
"parameters": [],
"src": "25881:0:6"
},
"scope": 3778,
"src": "25823:88:6",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 3779,
"src": "854:25060:6"
}
],
"src": "0:25915:6"
},
"compiler": {
"name": "solc",
"version": "0.5.7+commit.6da8b019.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.2.4",
"updatedAt": "2020-10-22T12:03:05.087Z",
"devdoc": {
"details": "Used by the (Ocean version) BFactory contract as a bytecode reference to deploy new BPools. * This contract is is nearly identical to the BPool.sol contract at [1] The only difference is the \"Proxy contract functionality\" section given below. We'd inherit from BPool if we could, for simplicity. But we can't, because the proxy section needs to access private variables declared in BPool, and Solidity disallows this. Therefore the best we can do for now is clearly demarcate the proxy section. * [1] https://github.com/balancer-labs/balancer-core/contracts/.",
"methods": {},
"title": "BPool "
},
"userdoc": {
"methods": {
"calcInGivenOut(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \\ (wO / wI) \\ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \\ \\ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee //*********************************************************************************************"
},
"calcOutGivenIn(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \\ (wI / wO) \\ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \\ \\ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************"
},
"calcPoolInGivenSingleOut(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\\\ / wO \\ \\ // // bO = tokenBalanceOut // | bO - -------------------------- |\\ | ---- | \\ // // tAo = tokenAmountOut pS - || \\ 1 - ((1 - (tO / tW)) * sF)/ | ^ \\ tW / * pS | // // ps = poolSupply \\\\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\\\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee ( 1 - eF ) // // eF = exitFee //*********************************************************************************************"
},
"calcPoolOutGivenSingleIn(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \\ // // tAi = tokenAmountIn /// / // wI \\ \\\\ \\ wI \\ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \\ -- \\ // // tW = totalWeight pAo=|| \\ \\ \\\\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\\\ ------------------------------------- / / // // pS = poolSupply \\\\ tBi / / // // sF = swapFee \\ / //*********************************************************************************************"
},
"calcSingleInGivenPoolOut(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\\ / 1 \\\\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\\\ pS / \\(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \\ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee \\ tW / //*********************************************************************************************"
},
"calcSingleOutGivenPoolIn(uint256,uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\\\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \\ / 1 \\ \\\\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \\ \\\\ pS / \\(wO / tW)/ // // // wI = tokenWeightIn tAo = \\ \\ // // // tW = totalWeight / / wO \\ \\ // // sF = swapFee * | 1 - | 1 - ---- | * sF | // // eF = exitFee \\ \\ tW / / //*********************************************************************************************"
},
"calcSpotPrice(uint256,uint256,uint256,uint256,uint256)": {
"notice": "******************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee //*********************************************************************************************"
}
}
}
}